[antlr-interest] Lazy load of CommonTokenStream??

Vitaliy Vitaliy at dbsophic.com
Mon Aug 18 10:19:01 PDT 2008


Hi,

IMHO it is not detailed enough,
and lacks sufficient explanations about most of the functions specifically,
and of how it all 'works together' in general.

For instance, below is a quote out of the docs regarding LA:
-------------------------------------------------------------------------------
org.antlr.runtime.CommonTokenStream.LA  ( int  i   )

Get int at current input pointer + i ahead where i=1 is next int. Negative indexes are allowed. LA(-1) is previous token (token just matched). LA(-i) where i is before first token should yield -1, invalid char / EOF.

Implements org.antlr.runtime.IntStream.

Definition at line 299 of file CommonTokenStream.java.
-------------------------------------------------------------------------------

It says nothing about LA(0), or the NullPointerException behavior Kay had mentioned before,
And that I think is one of the better documented functions.

We of course can dig in the code, and find out,
But I believe It would have been much more convenient if it were better documented.

But again, that's spoiled me :)

Vitaliy

-----Original Message-----
From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Johannes Luber
Sent: Monday, August 18, 2008 18:03
To: Kay Röpke
Cc: ANTLR-Interest Interest; Terence Parr
Subject: Re: [antlr-interest] Lazy load of CommonTokenStream??

Kay Röpke schrieb:
>
> On Aug 18, 2008, at 5:35 PM, Ron Hunter-Duvar wrote:
>
>> Javadoc? As far as I can see, there isn't any in the source
>> distribution (and frankly, I was wondering why, but didn't get to
>> asking). Is it supposed to be there and somehow got missed? Or are we
>> supposed to roll our own?
>
>
> Oh. I guess it isn't generated then. Didn't even notice that, because I
> always use an IDE and it apparently computes that automatically from the
> source attachment I configured.
> I think it should be generated, it's trivial to do so, isn't it?
>
> Ter?

Look here: <http://antlr.org/api/Java/index.html>

Johannes
>
> cheers,
> -k






__________ Information from ESET NOD32 Antivirus, version of virus signature database 3365 (20080818) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature database 3365 (20080818) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



More information about the antlr-interest mailing list