[antlr-interest] tokens not working in rewrite rules

edA-qa mort-ora-y e.mortoray at ecircle.com
Wed Sep 24 23:00:37 PDT 2008


Using antlr3 I have the following rule:

searchSortExpr
    :    SORT id ( ',' id )* order=(ASC|DESC) ENDEXPR -> ^(SORT {$order}
id*  );

Where 'id' is basically a string, SORT='sort', ENDEXPR=';', ASC='ASC',
DESC='DESC'.  This can match such productions as:

    sort column ASC;

But in rewriting the {$order} part is simply gone: it is lost from the tree.

What am I doing wrong? Or how do I  use such named tokens correctly in
the rewriting rules?

-- 
edA-qa mort-ora-y
Director Quality Assurance
______________________________________________________
eCircle AG - Inside Digital Marketing
Nymphenburger Str. 86
80636 München

Tel    +49-89-12009-773
Fax    +49-89-12009-750

E-Mail mailto:e.mort-ora-y at ecircle.com
Web    http://www.ecircle.com

______________________________________________________
Aktuelles
"Inside Digital Marketing" - der Newsletter für die
Online-Branche von eCircle. Jeden Monat neu & voll
mit aktuellen Fallstudien und hilfreichen Tipps!
Jetzt kostenlos abonnieren:

http://www.ecircle.com/de/newsletter
______________________________________________________

eCircle AG, HRB 136 334, Handelsregister München
Vorstand:  Lothar Lanz, Volker Wiewer (Vorsitzende), 
Thomas Wilke, Lars Wössner, Alexander Meyer
Vorsitzender des Aufsichtsrates: Dr. Mark Wössner



More information about the antlr-interest mailing list