[antlr-interest] ANTLR 3.0.1: invalid character column in a mismatch character error message.

Gerald Rosenberg gerald at certiv.net
Thu Aug 14 17:12:18 PDT 2008


At 03:59 PM 8/14/2008, Kay Röpke wrote:

>>Could add an grammar option to define tab size -- increase the
>>likelihood of being right, but still no guarantee.  Better solution
>>is to use an Antlr-aware editor.
>
>ANTLR's Tool messages are only part of the problem.  Your point gets
>even more relevant when talking about the error message of the
>_generated_ recognizers. At best tab-expansion can be used to print
>out an annotated portion of the faulty input, but it's equally
>"wrong" (compared to the current behavior) to use it to calculate a
>column, like you point out.

Intended that the option value would also be used 
to generate a run-time value as well.

If only a BaseRecognizer modification is made, 
then the value would not be available to the Tool 
during generation, right?  To be consistent, the 
solution needs to cover development-time as well.

>I'd hate another grammar option, btw.

Agreed.  The alternative would be to provide a 
Tool level parameter or method call, but that is 
not so plainly visible as a grammar option.




More information about the antlr-interest mailing list