[antlr-interest] ANTLR 3.0.1: invalid character column in a mismatch character error message.
Raphael Reitzig
r_reitzi at cs.uni-kl.de
Mon Aug 11 14:57:57 PDT 2008
I don't get why you insist on your point "for COBOL programers it's
like that...". Man, who cares? This tool is written in Java, it's main
target language is Java. So, personally, I would expect it to be
consistent with Java conventions, not any other language. Java
conventions are even documented by SUN, unlike those of other languages.
Is there even a COBOL target for ANTLR?
This argument does, of course, not disturb rest of discussion about
error message style.
Regards
Raphael
"Francis ANDRE" <francis.andre.kampbell at orange.fr> wrote (Mon Aug 11
22:52:37 2008):
> Ter
>
> The point is how do you interpret this error message :line 1:3
> mismatched character '-' expecting set null
> on parsing the text below that starts at line 1, column 1.
> 222-AAA = .2 + +3.4.
>
> Cobol programmer's are used to think in term of line/column (the
> indicator is in column 7 for example) and thus 'line1:3' will be
> interpreted as line 1, column 3 and not line 1, pos 3(with the C
> indexing convention)
>
> So my request is to just to make the error message not subject to
> misinterpretation(even for non cobol error messages)...
> and from my point of view: line1:col 4 is better than line 1:pos 3.
> This does not require any change in the indexing or
> whatsoever...just in the message..
>
>
>
>
> Gavin Lambert a écrit :
>>
>> 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.
>>
>>
>>
>
>
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: PGP Digital Signature
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080811/b43d31bf/attachment-0001.bin
More information about the antlr-interest
mailing list