[antlr-interest] (v3) Header names

Sean Walton swalton at cs.utah.edu
Sat Aug 5 08:37:17 PDT 2006


When I am rewriting some data, I would like to give some header nodes a 
string name, e.g., 'newnode':

    ... -> ^('newnode' $blah $bleah)

I also create a token for 'newnode' and give it a symbolic name:

    tokens {... NEWNODE='newnode';...}

But, when I look at the generated tree, a number appears instead (unlike 
other head nodes that use scanned token strings), and the *Lexer lists 
NEWNODE with the number but has lost the string.
Is there a way to get the original string?

-Sean


More information about the antlr-interest mailing list