[antlr-interest] simple novice grammar question
Monty Zukowski
monty at codetransform.com
Wed May 26 08:12:59 PDT 2004
On May 25, 2004, at 12:45 PM, Greg Gimler wrote:
>> 1) Generally there is no need to make the LPAREN the head of the tree
>> in the filter (or factor) rule. The tree implicitly has the correct
>> order of operations in it and doesn't need grouping operators.
>
> Got rid of that. Seems OK.
If you are doing source to source translation then eliminating the
LPAREN means that you will loose all extraneous parenthesis used for
ease of reading the program. You will also need to implement an
algorithm to insert parenthesis into the output source where they are
implied by the tree structure.
Monty Zukowski
ANTLR & Java Consultant -- http://www.codetransform.com
ANSI C/GCC transformation toolkit --
http://www.codetransform.com/gcc.html
Embrace the Decay -- http://www.codetransform.com/EmbraceDecay.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list