[antlr-interest] Java, apps

Robert Colquhoun rjc at trump.net.au
Sat Oct 6 21:56:49 PDT 2001


At 12:00 PM 10/4/01 +0200, Ric Klaren wrote:
>Hi,
>
>I didn't say thanks yet did I? Shame on me =)
>
>Thanks!!

I was looking at the current classes used internally for bitsets in antlr - 
the java BitSet class i wrote is going to need some additional methods to 
replace the current implementation.

I am not sure what to do here - from the eratosthenes sieve benchmark 
included shows only a marginal difference in performance(less than 10%) 
between antlr's current BitSet class,  the BitSet i wrote and the standard 
java.util.BitSet.  It might be better long term for maintainability to just 
use the standard java.util.BitSet plus some utility routines to feed in the 
raw data(the long int arrays).  For C++ just write something(perhaps 
adapting my current code) to look like the equivalent java class.

On the other hand maybe i need a better test.  The way bitsets are used in 
the lexer you are usually only looking for a handful of characters in the 
whole unicode range.   The idea behind the bitset i did was to use an 
offset so that largely empty int arrays covering the whole unicode range 
were not constructed.

- Robert


 

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



More information about the antlr-interest mailing list