[antlr-interest] antlr3 C-Target ever used in reality?
Christian Hoffmann
Sanus at gmx.de
Sat Nov 29 05:06:53 PST 2008
What's wrong below????
antlr error: reference to rewrite element unaryExpression1 without reference on left of ->
unaryExpression1 // (level 1)
: a=INC -> ^(TOK_PREINC[$a]) unaryExpression1
| a=DEC -> ^(TOK_PREDEC[$a]) unaryExpression1
| unaryExpression2
;
rewriting rules doesn't work, if you write something like:
rule : expr -> ^(TOK_SLIST (statement)*)
{ pVMCompiler->m_Symbols.PopScope(); }
;
cause C-Target code results in:
ADAPTOR->addChild(ADAPTOR, root_0, pVMCompiler->m_Symbols.PopScope(); );
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the inlined code is inside the addChild(...) call
It seems the c-target is developped without beeing used in reality.
I'll go back to antlr2, at this stage, antlr3 is nonviable...
---
Christian Hoffmann
D-38118 Braunschweig
More information about the antlr-interest
mailing list