[antlr-interest] Concatenating child nodes into one

Elnur Cabarov elnur.j at gmail.com
Wed Aug 19 05:12:55 PDT 2009


Hi, I'm trying to get custom AST from Java grammar

importDeclaration
    :   'import' 'static'? qualifiedName ('.' '*')? ';' -> qualifiedName
    ;

qualifiedName
    :   Identifier ('.' Identifier)*
    ;

How can I get single tree node for the whole import statement?

For example
org.antlr.runtime.ANTLRFileStream  instead of

org
.
antlr
.
runtime
.
ANTLRFileStream


-- 
Elnur Cabarov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090819/16b58b37/attachment.html 


More information about the antlr-interest mailing list