[antlr-interest] v3: Example of using tokens and $type?
Mark Mandel
mark.mandel at gmail.com
Thu Mar 1 22:29:07 PST 2007
Hey all,
I've got a situation in my grammar in which I want to be able to change the
type of the Node depending on certain parser conditions.
I had thought it was going to be as simple as defining a token within a
tokens{} block, and then writing a small piece of { $type=mynewToken } and I
would be okay, but it looks like my assumptions were poorly based on fact.
Is there anywhere I can look that gives a clear explanation / example of how
to correctly use tokens and the usage of $type. I want to make sure I'm not
barking up the wrong tree here.
(I'm going to get the strange feeling that I'm going to get a repsonse of
'grab a copy of the book')
Thanks in Advance,
Mark
--
E: mark.mandel at gmail.com
W: www.compoundtheory.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070302/fe58ff4d/attachment.html
More information about the antlr-interest
mailing list