[antlr-interest] A question about token bit sets

Ric Klaren klaren at cs.utwente.nl
Fri Sep 13 01:28:13 PDT 2002


Hi,

On Thu, Sep 12, 2002 at 11:26:42PM -0000, richardhensley99 wrote:
> I see the following code generated in my Parser classes:
> 
>     private static final long[] mk_tokenSet_0() {
>         long[] data = { 32754L, 0L, 0L, 0L };
>         return data;
>     }
>     public static final BitSet _tokenSet_0 =
>         new BitSet(mk_tokenSet_0());
> 
> 
> What is the best way to tell what tokens are memebers of _tokenSet_0?

antlr -diagnostic <yourgrammarfile>

Should give you those I think (in a text file)

Or alternatively you can turn on C++ codegen, ok it makes no sense but the
C++ codegenerator dumps out comments with the contents of the tokensets in
these definitions.

Cheers,

Ric

PS I think that predicate bug you stumbled on is fixed in the 2.7.2a series
and also in the bugfix devel version on
http://wwwhome.cs.utwente.nl/~klaren/antlr/
-- 
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- klaren at cs.utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
  "You know how to use that thing?" [pointing to the sword]
  "Sure.. The pointy end goes into the other guy."
  --- The Mask of Zorro


 

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



More information about the antlr-interest mailing list