[antlr-interest] ANTLR 3.0.1: invalid character column in a mismatch character error message.
kroepke at classdump.org
Sun Aug 10 13:13:17 PDT 2008
On Aug 10, 2008, at 9:14 PM, Francis ANDRE wrote:
> This is incoherent.... The reported erroneous line starts at 1
> while column starts at 0!!
well. call it convention.
> BTW, the common user (the one not scientist but simply middle
> average Cobol programmer) start each column at 1. So how can this
> could be changed??
off the top of my head, i know two languages that start counting at 1:
pascal and lua. since i've forced myself to forget all the cobol i
ever knew, i simply accept that cobol is among those.
changing it: you can override the error reporting methods in your
generated parser and simply add 1 to the column (charPositionInLine).
does that sound helpful?
More information about the antlr-interest