[antlr-interest] A question about token bit sets
Hensley, Richard
richard.hensley at mckesson.com
Fri Sep 13 08:31:56 PDT 2002
Rick,
Thanks for the tip about token sets.
I'm using 2.7.2a2, and I found the syntax predicate bug, so I don't
think the fix is there.
Richard
-----Original Message-----
From: Ric Klaren [ mailto:klaren at cs.utwente.nl
<mailto:klaren at cs.utwente.nl> ]
Sent: Friday, September 13, 2002 1:28 AM
To: antlr-interest at yahoogroups.com
Subject: Re: [antlr-interest] A question about token bit sets
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/
<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/ <http://docs.yahoo.com/info/terms/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20020913/e30f02dc/attachment.html
More information about the antlr-interest
mailing list