[antlr-interest] Antlr 2.7.2a2 Report

Terence Parr parrt at jguru.com
Sat Sep 14 20:21:10 PDT 2002

On Wednesday, February 6, 2002, at 03:25  AM, Robert Colquhoun wrote:

> Hi,
> I have been using 2.7.2a2 for the last couple of weeks, overall it has 
> been
> working well.  antlr.Tool seems to parse grammar files much faster,
> generated code all seems to be working just fine.
> Anyway 3 kindof small points:
> 1) This is a totally trivial thing, but when generating bitsets in the 
> lexer:
>    private static final long[] mk_tokenSet_1() {
>          long[] data = new long[8];
>          data[0]=-576460752303432712L;
>          for (int i = 1; i<=3; i++) { data[i]=-1L; }
>          for (int i = 4; i<=7; i++) { data[i]=0L; }
>          return data;
>      }
> Initializing the array to 0L is not needed as java does this
> automatically(only matters for unicode with lots of bitsets, and even 
> then
> not much).

Just fixed in latest 2.7.2a3; no longer generates the unnecessary loop.

> 2) Exception constructor prototypes have changed.  I am not sure if i 
> was
> supposed to be using these but in my grammar in a couple of places i 
> needed
> to throw SemanticException's which now have a different prototype that
> includes the column number....i was wondering if for backwards
> compatibility could the old prototype(perhaps with @deprecated) so that
> 2.7.2 is binary compatible with 2.7.1

Added the Ctor back in that didn't ask for column.

> 3) In the BASIC parser i have been working on it is quite common for 
> the
> BASIC programs to have a variable 'EOF'....this does not work at all 
> with
> antlr which internally automatically defines the text for EOF token to
> "EOF" which causes an automatic match when looking up keywords.....i 
> think
> this would also affect other languages.
> ie  could the java grammar parse something like:
> 	class Test {
> 		public final static int EOF = -1;
> 	}

I have asked Ric what he thinks the ramifications are.

PS	And you thought that I didn't track bug reports ;)
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org


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

More information about the antlr-interest mailing list