[antlr-interest] simple novice grammar question
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.
ANTLR & Java Consultant -- http://www.codetransform.com
ANSI C/GCC transformation toolkit --
Embrace the Decay -- http://www.codetransform.com/EmbraceDecay.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
More information about the antlr-interest