[antlr-interest] Rewriting to Flat Tree Nodes for Associative Multiary Operators
Randall R Schulz
rschulz at sonic.net
Thu Oct 2 14:48:30 PDT 2008
On Thursday 02 October 2008 14:33, Jim Idle wrote:
> ...
>
> I should add that this won't be as useful a tree for processing
> unless this is a translator and you want to spit this stuff out in
> that kind of arrangement.
>
> Jim
Well, in fact I am just writing a transliterator, and since AND and OR
are each associative-commutative, and since the target language does
support them as multiary connectives, it's all perfectly fine.
It's perhaps worth mentioning, though certainly tangential, that at
least in certain circles of logic and theorem proving, the generalized
form of AND and OR are assumed (and that includes nullary and unary
forms, as well as those with more than two subformulas) and so the
strictly binary form is _not_ the most useful one for the kind of
processing that I have to do.
Infix notation is an illusion...
Randall Schulz
More information about the antlr-interest
mailing list