hi, you'd have to return multiple ST manually with returns [...].
T
On Feb 5, 2010, at 2:31 AM, Gustaf Johansson wrote:

> Hi,
> 
> I have a antlr parser that is using stringtemplates to "translate" the input.
> Im having problems when i want to reorder the output from the input,
> when this spans multiple rules down.
> 
> Simplified example: (this is what i have, but its obviously not working)
> 
> prog: a b=ID -> progTempl(a={$a.st}, b={$b.text});
> a: x=ID y=ID -> aTempl(x={$x.text}, y={$y.text});
> 
> 
> I would like the output to be:
> 
> "a.y b a.x"
> 
> So the question is basically, how do i return multiple string from a
> stringtemplate?
> Since im using $a.st in the prog rule i get the entire text, but i
> would want it in 2 chunks. So i can insert b "between" the 2 chunks.
> 
> Best Regards Gustaf
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: 
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to