[antlr-interest] [V3] error report request - include grammar name
in message text.
John B. Brodie
jbb at acm.org
Wed Aug 9 13:28:45 PDT 2006
Sorry, I was imprecise.
>On Aug 9, 2006, at 12:58 PM, John B. Brodie wrote:
>> for this version of antlr:
>> ANTLR Parser Generator Early Access Version 3.0b3 (July 21, 2006) 1989-2006
>> when it prints an error message, it does not identify from which
>> grammar the error arose.
>It does for me:
>duh.g:5:14: Decision can match input such as "<EOT>" using multiple
>alternatives: 1, 2
>what error did you get?
I meant messages produced by generated parsers, not messages from the Tool.
I am playing with an example expression parser. ',' is not legal in that
toy grammar. When I run the generated parser and a subsequent tree walker
on an input containing just a ',' I get:
[program, expression, simple_expr, short_circuit, comparand, signed_term]: line 1:0 state 0 (decision=6) no viable alt; token=[@0,0:0=',',<52>,1:0]
[program]: line 0:0 mismatched tree node: EOF; expecting type <DOWN>
the first message is from the parser and the second from the tree walker, i
think. it would be nice to know for sure which generated parser issued each
(of course i should not execute the tree walker when the parser has
found an error - but i am not that sophisticated ;-)
More information about the antlr-interest