[antlr-interest] Ways to specify tokens
Peter Kronenberg
PKronenberg at technicacorp.com
Thu Apr 7 08:19:29 PDT 2005
There appear to be 2 ways to specify tokens and I'm not sure of the
difference. The manual says it's:
Tokenspec: tokens { token1; token2; token3;... }
But Tokenspec doesn't seem to be allowed. It only allows the keyword
'tokens' followed by a list of tokens in curly braces.
But in some sample code, I've seen this:
defTokenTypes
: ID INT ASSIGN PLUS ;
This just looks like a parser rule to me, although the tokens haven't
been defined.
What does this mean and what is the difference between the two?
Peter
Peter Kronenberg
Software Engineer
(703) 885-1222
pkronenberg at technicacorp.com
The information contained in this transmission may contain privileged and confidential information. It is intended only for the use of the person(s) named above. If you are not the intended recipient, you are hereby notified that any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Technica Corporation does not represent this e-mail to be free from any virus, fault or defect and it is therefore the responsibility of the recipient to first scan it for viruses, faults and defects. To reply to our e-mail administrator directly, please send an e-mail to postmaster at technicacorp.com. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20050407/6a907da6/attachment.html
More information about the antlr-interest
mailing list