How to get rid of the following multiple alternatives warnings in my ANTLR3 grammar?
- by Jarrod Roberson
[11:45:19] warning(200): mygrammar.g:14:57: Decision can match input such as "','" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
[11:45:19] warning(200): C:\Users\Jarrod Roberson\mygrammar.g:14:57: Decision can match input such as "','" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
I want to be able to nest functions inside other functions.
myfunction(x) ->
sqr(a) -> a * a,
y = sqr(x).
here is the line it is complaining about
function : ID '(' args ')' '->' statement (',' statement)* ;
and here is what it is considering the alternative
statement : ATOM
| expression
| assignment
| function
;
Here is what the synatx diagram looks like in ANTLRWorks
I really like things to compile/work without any warnings. How do I resolve this warning condition?