Hi everyone, I really need my parser to emit something like this for unary values:
unary: ^(NOT unary) | ^(NEGATE unary); because I need to deal with recursive unary constructs like !!17 but I'm having difficulty with the parser. Currently I have a parser rule like: unary: ((NOT | NEGATE)^)? term; but clearly this won't handled nested unary operators. Given that for the input: !!17 I need to produce ^(NOT ^(NOT INTEGER)) Can someone point me in the correct direction? Thanks in advance! Andy -- 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.
