[antlr-interest] Concatenating variable number of tokens into a single string in an action?

Dejas Ninethousand dejas9000 at gmail.com
Mon Jul 18 13:35:43 PDT 2011


Hello,

If I have the rule:

        text : t=(UNQUOTED_ALPHA_TEXT | DECIMAL_NUMBER)+ {
stack.pushUnquotedText(...); };

Is there any way for me to gather the text of all the ALPHA_TEXT and
DECIMAL_NUMBER tokens in this production into a single string and shove that
string as an argument in my action?

Thanks.


More information about the antlr-interest mailing list