[antlr-interest] Re: circular token buffer and overriding nextToken()

lgcraymer lgc at mail1.jpl.nasa.gov
Sun Oct 12 00:08:46 PDT 2003


--- In antlr-interest at yahoogroups.com, "micheal_jor" <open.zone at v...> 
wrote:
> The TokenStream interface itself has a single method - nextToken(). 
It
> is called repeatedly until it returns an EOF token. Simple enough. 
The
> implementation of nextToken() in generated lexers is non-virtual for
> C++ & C# (also for Java I think). Which suggests it isn't [really]

No, not for Java.  In Java, all methods are "virtual" (see 8.6.4.1 in 
the language spec).

> intended/expected to be overridden.

In ANTLR 1, all generated C++ methods were virtual so that they could 
be overridden.  I think that's more the expectation still.

Ter--maybe you want to comment?




 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list