[antlr-interest] Token enumeration values
hero_onethousand
ebell at edgeofreality.com
Wed Sep 29 15:31:17 PDT 2004
I apologize in advance for the newbie question:
Is there an easy way to change the final value of a token declared in the
tokens section of the parser definition?
Example:
tokens {
RW_VECTOR="vector"
...
}
Output in C++:
struct ExampleTokenTypes {
enum {
EOF_ = 1,
RW_VECTOR = 4,
...
};
};
I want to set the enumeration value of RW_VECTOR explicitly, not have
it set based on the order it appears in the tokens section. I
understand that values less than 4 are reserved by ANTLR.
Thanks,
Evan A. Bell
Game Programmer
www.edgeofreality.com
ebell at edgeofreality.com
(512)637-9150 x283
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list