[antlr-interest] ANTLR 3.0.1: invalid character column in a mismatch character error message.
Kay Röpke
kroepke at classdump.org
Mon Aug 11 08:41:25 PDT 2008
Hi!
On Aug 11, 2008, at 3:22 PM, Francis ANDRE wrote:
> >>Enough babbling, however.
> >> This is an argument neither side can "win", simply because
> there's no correct answer.
> Think so... the correct answer is the closest to the common sense
> and natural location: that is the (1,1) based coordinate...
This is a statement of opinion, not truth. Like my statement was one
of opinion, not truth.
> BTW, in PL/1, you can declare an vector/array with fixed lower bound
> and higher bound as
>
> DECLARE FOO (10::20) FIXED BIN(15);
>
> and while the FOO vector is allocated from address 0 up to address
> 9, all the references as FOO(NO) will be checked against 10 <= NO <=
> 20)
And I see the value in that, don't get me wrong. IIRC Pascal has
something similar (the index set could be of some specific type, if my
memory doesn't fail me). OTOH many languages don't have it and that's
for a reason as well.
> >>For the reason given above, I think ANTLR should not change its
> behavior at this point.
> ANTLR has already changed... ANTLR v2 column/line is (1,1) based...
> (so think about all people moving their grammar from V2 to V3...) So
> I would like ANTLR v3 to use also the (1,1) coordinate...
So many things changed from v2 to v3 (syntax, capabilities, runtime
library API). And this changed, too, we've had a final release and
number of beta releases so far, so I think it should not change back
all of a sudden, especially given that it is so simple to change back
to 1 in user code (and quite frankly that's probably just a couple of
lines to write once).
I think we should put this to rest, unless Ter wants to chime in and
make a decision.
cheers,
-k
--
Kay Röpke
http://classdump.org/
More information about the antlr-interest
mailing list