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

Gavin Lambert antlr at mirality.co.nz
Mon Aug 11 12:56:39 PDT 2008


At 03:44 12/08/2008, Terence Parr wrote:
 >Havent seen the thread but are we talking about lines 1... and
 >char position 0... ?  If so, char position is not column so I
 >went with C-derivative language indexing as it is the relative
 >position from start of line not the column.  Columns start with 
1.

Yes, and the issue being discussed is that when printing error 
messages ANTLR seems to display the char position in a format 
where you're expecting to see the column.

Contrary to some other dissenting votes on the list, I think this 
does need to be changed -- however, if you're worried about 
breaking uses of it (which I doubt will affect anyone, except 
possibly ANTLRworks) then maybe it could be deferred until 3.2.



More information about the antlr-interest mailing list