[antlr-interest] return LTR values

Brian Lavender brian at brie.com
Thu Aug 19 08:56:34 PDT 2010


So, I have a parser rule that grabs 10 LTR lexer values. I would like to have the parser
rule set its $text value to be the concatonation of these LTR values and put an
XML tag around it. 

How do I do that?

author	:	l=LTR l=LTR l=LTR l=LTR l=LTR l=LTR l=LTR l=LTR l=LTR l=LTR 
{ <Author>$l+</Author> };

LTR  :   . ;
-- 
Brian Lavender
http://www.brie.com/brian/

"There are two ways of constructing a software design. One way is to
make it so simple that there are obviously no deficiencies. And the other
way is to make it so complicated that there are no obvious deficiencies."

Professor C. A. R. Hoare
The 1980 Turing award lecture


More information about the antlr-interest mailing list