I'm using ANTRL and this is my some grammar which give error to me.
statement
: (name)(
| BECOMES expression
| LPAREN (expression (COMMA expression)*)? RPAREN
| SHIFTLEFT name LPAREN (expression ( COMMA expression )*)? RPAREN
)
| OUTPUT LPAREN expression ( COMMA expression)* RPAREN
| IF expression THEN statement (ELSE statement)?
| FOR name BECOMES expression TO expression DO statement
| REPEAT statement UNTIL expression
| WHILE expression DO statement
| body
|
;
This is error " Decision can match input such as "ELSE" using multiple alternatives ".
How can I fix it ?