[antlr-interest] antlr-interest Digest, Vol 42, Issue 37

Joey Hurst jhurstus at gmail.com
Mon May 19 17:37:54 PDT 2008


Hi Jeff,
Ben is probably correct here.  All ES3 numbers are actually floating point,
which means that the interpreter has to cast the number to a 32 bit int and
then back to a floating point to do any bitwise arithmetic.

Also, I'm nearly done with a JavaScript target for ANTLR 3.  I would be
interested in syncing our code at some point to minimize duplicated effort.
Is your code ready to be shared?

Thanks,
Joey

Message: 2
> Date: Mon, 19 May 2008 20:55:32 +0200
> From: "Benjamin Niemann" <pink at odahoda.de>
> Subject: Re: [antlr-interest] BitSets and 64bit Longs
> To: "Jeff Saremi" <jeffsaremi at yahoo.com>
> Cc: antlr-interest at antlr.org
> Message-ID:
>        <543531490805191155y1f235499q48b485ab3855a2fe at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Jeff,
>
> the BitSet class is just an internal implementation detail of the Java
> runtime - probably because Java has poor or slow support for real
> sets.
> For Python I use the set() class to store token types. Use whatever is
> most appropriate in JS to manage sets and supports the basic set
> operations required by ANTLR. My guess is (but that's a pure guess)
> that in such a high level language as JS the overhead of fiddling with
> bits is bigger than the use of a less memory efficient, but more
> native implementation.
>
> -Ben
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080519/55ca94af/attachment.html 


More information about the antlr-interest mailing list