[antlr-interest] Flagging better errors
chintan rao
chintanraoh at gmail.com
Mon Jun 25 21:57:38 PDT 2007
Hi,
The code genrated by antlr currently gives errors like
line 0:1 : expected token WS found WHATEVER
or some thing similar
suppose antlr grammar allows one to describe what WS tokes is
would it not be better
it is better to get warnings like
line 0:1:expected whitespace found whatever
can't the grammar have a facility to provide the decription of the token
some thing like
WS
description
{
return "whitespace";
}
:
(' '|'\t') ;
now while flaggng errors WS would be replaced by description :)
I dont whether antlr has this already
cheers,
Chintan
More information about the antlr-interest
mailing list