Hi, I have been reading on the wiki, and I already fixed two of my
larger issues in my grammar (hopefully correctly). Now I've run into a
new set of rules that need fixing, and I would like to verify I'm
going about this correctly. I will take a guess, and can someone tell
me if it's correct?
The problem snippet:
timesExp: (timesExp | divExp | modExp | andExp | factor) '*' factor;
divExp : (timesExp | divExp | modExp | andExp | factor) 'div' factor;
modExp : (timesExp | divExp | modExp | andExp | factor) 'mod' factor;
andExp : (timesExp | divExp | modExp | andExp | factor) 'and' factor;
factor : '#'; // this rule is itself broken, but I will get to this
later, so I'm pretending it's something harmless
My guess is to change them like this, using timesExp as an example
timesExp: ((divExp | modExp | andExp | factor) '*' factor) ('*' factor)*
Is this correct?
Thanks in anticipation,
Kyle Robson
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.