[type] Parser [grammar] grammar T; s @init {} @after {} : '{' stat* '}' ; stat: 'if' ID 'then' stat ('else' ID)? | 'return' ; ID : 'a'..'z'+ ; WS : (' '|'\t'|'\n')+ -> skip ; [start] s [input] { if x then if y then return else foo } [output] Decision 1: s0-'}'->:s2=>2 s0-'else'->:s1^=>1 [errors] line 1:29 reportAttemptingFullContext d=1 (stat), input='else' line 1:38 reportAmbiguity d=1 (stat): ambigAlts={1, 2}, input='elsefoo}' [flags] showDiagnosticErrors