[antlr-interest] am I doing something wrong?
Terence Parr
parrt at cs.usfca.edu
Tue Jun 20 10:50:47 PDT 2006
On Jun 20, 2006, at 7:42 AM, Johnicholas Hines wrote:
> I'm trying to create a AST node with text from a variable, like this:
> #expr = #([THING, "THING"], x, [INTEGER, os.str().c_str()]);
>
> I get this:
> mygrammar.g:66:76: Syntax error in action: mygrammar.g:66:76:
> unexpected char: '.'
>
> Is there a proper, idiomatic way to do this?
The action translator in 2.x is fragile...try yanking out the os.str
().c_str() expr into a variable.
Ter
More information about the antlr-interest
mailing list