neonumeric - C++ arbitrary precision arithmetic library

Mirko mirkok.lists at googlemail.com
Mon Mar 8 03:29:31 EST 2021


Am 07.03.2021 um 21:52 schrieb Avi Gross via Python-list:
> The precedence example used below made a strange assumption that the
> imaginary program would not be told up-front what computer language it was
> being asked to convert from. That is not the scenario being discussed as we
> have described. In any particular language, there usually is a well-known
> precedence order such as "*" coming before "+" unless you use something like
> parentheses to make your intent clear and over-ride it.

Well, no I did not assume some kind of magical universal translator
ala Star Trek. ;-)

The OP seems to claim, that he could compile any language by just
providing a JSON schema file which describes the language. I assumed
that those who tried this before did something similar. And that is
what sounds logically impossible (or at least unfeasible) to me. How
can one write a comparatively small descriptive schema that covers
all of a language's subtleties in syntax, grammar, semantics and
behavior?

I agree that my example wasn't good, since it would be just a matter
of specifying operator precedence. But there are numerous little and
large aspects to cover for any language. In the end, one would have
to write a more or less full blown parser. Or at least a schema that
is so long, that all advantages of this approach go away.


More information about the Python-list mailing list