[antlr-interest] combining tokens in rewrite rule

Manu manunews at gmail.com
Sun Jan 21 03:04:56 PST 2007


Hi,

I want to combine tokens when generating the AST.

For example, for a rule like this:

namespaceSpec:	(ID) ('.' ID)*;

i want to generate a tree rule that returns a new tree with only one
ID token, that is the result of all ID and '.' concatenation. Is there
a way to do this?

Thanks.


More information about the antlr-interest mailing list