[type]
Parser

[grammar]
grammar T;
prog
@init {<LL_EXACT_AMBIG_DETECTION()>}
   : expr expr {<writeln("\"alt 1\"")>}
   | expr
   ;
expr: '@'
   | ID '@'
   | ID
   ;
ID  : [a-z]+ ;
WS  : [ \r\n\t]+ -> skip ;

[start]
prog

[input]
a@

[output]
"""alt 1
"""

[errors]
line 1:2 reportAttemptingFullContext d=0 (prog), input='a@'
line 1:2 reportAmbiguity d=0 (prog): ambigAlts={1, 2}, input='a@'
line 1:2 reportAttemptingFullContext d=1 (expr), input='a@'
line 1:2 reportContextSensitivity d=1 (expr), input='a@'

[flags]
showDiagnosticErrors

