Hi, I have grammar like this:
expr : andExpr ( OR^ andExpr )* ; andExpr : relExpr ( AND^ relExpr )* ; relExpr : aexpr ( (EQUAL ^|NOTEQUAL ^| LESSTHANEQUAL ^| LESSTHAN ^| GREATERTHANEQUAL ^| GREATERTHAN ^ ) aexpr )* ; aexpr : mexpr ( ( PLUS^ | MINUS^ ) mexpr)* ; mexpr : unaryExpr ( ( MULT ^ | DIVIDE^ )unaryExpr)* ; unaryOperator : PLUS | MINUS | NOT ; unaryExpr : unaryOperator? atom -> ^(ATOM unaryOperator? atom? ) ; atom :UINT | DBL | ID | STRING | BOOL | function | LEFT_PAREN expr RIGHT_PAREN -> expr ; If I try a long nested expression using the above binary operands, I get a StackOverflowError exception. How can I avoid StackOverflowError due to long nested expressions? Any ideas? Thanks 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.
