Boris Koprinarov wrote:
Do this instead: logicalAndExpression ( OR^ logicalAndExpression )* ; And make your 'or' a lexer token (and all the other 'literals'). You don't need a BINOP node, just the operator. Repeat at all other levels and download say the Java grammar and crib from that. When operators are the same precedence, do this (there are other forms but this is as neat as any): : conExpression (ops^ conExpression)* ; ops : LESS | MORE| EQ .... etc. ; Again, read through the Java grammar and trace out the _expression_ rule. 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
