Dominic Tardif wrote:
OK, I've tried what you suggested and, for the most part, it works. There's just a little problem with this: the WS as an operator, if there is one, is not present in the AST. How can I put it in the AST? Better yet, how can I rewrite the rule so that I can see it as a '*' operator in the AST? Thanks again for all your help!!! ^_^ multExpr: phase (multop^ phase)* ; multop : m=MULT -> $m | -> MULT ; // Use lexer rules and not embedded strings in the parser // MULT : '*' ; Or if you need ot know the difference: multop : m=MULT -> $m | -> MULTSPACE ; // Use lexer rules and not embedded strings in the parser // MULT : '*' ; fragment MULTSPACE : ; Jim --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~--- |
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
