Antlr left recursive problem
问题 I have a left recursive issue in my Antlr grammar. While I think I understand why there is a problem I am unable to think of a solution. The issue is with the last line for my datatype rule. I have included the entire grammar for you to see: grammar Test; options {output=AST;ASTLabelType=CommonTree;} tokens {FUNCTION; ATTRIBUTES; CHILDREN; COMPOSITE;} program : function ; function : ID (OPEN_BRACKET (attribute (COMMA? attribute)*)? CLOSE_BRACKET)? (OPEN_BRACE function* CLOSE_BRACE)? SEMICOLON