Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to get rid of the following multiple alternatives warnings in my ANTLR3 grammar?
- [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:UsersJarrod Robersonmygrammar.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
- myfunction(x) ->
- sqr(a) -> a * a,
- y -> sqr(x).
- function : ID '(' args ')' '->' statement (',' statement)* ;
- statement : ATOM
- | expression
- | assignment
- | function
- ;
- program : (statement'.')*;
- f(x)-> g(y)-> y*y, x=y
- function
- : ID '(' args ')' '->' statement ((',' statement)=> ',' statement)*
- ;
- myfunction(x) ->
- sqr(a) -> a * a,
- y = sqr(x).
- function
- : ID '(' args ')' '->' statement (',' statement)* '.'
- ;
Add Comment
Please, Sign In to add comment