[antlr-interest] (newbie question) Rewrite rule error message

Kay Roepke kroepke at classdump.org
Mon Jul 9 07:18:15 PDT 2007


On Jul 9, 2007, at 4:12 PM, ali azimi wrote:

>   servicetypedefinition
>               :(virtuality)?
>               'service type'(qualifier)?servicetypename
>               (formalcontextparameters)?
>               (virtualityconstraint)?
>               (specialisation)?end
>               (validinputsignalset)?
>           gatedefinition*
>               entityinservice*
>               (servicetypebody)?
>               'endservice type'(qualifier)?servicetypename end
>
>               ->^(SLIST[$lc.start](virtuality)?
>               'service type'(qualifier)?servicetypename
>               (formalcontextparameters)?
>               (virtualityconstraint)?
>               (specialisation)?end
>               (validinputsignalset)?
>           gatedefinition*
>               entityinservice*
>               (servicetypebody)?
>               'endservice type'name end ^(SLIST[$lc.start] 
> (qualifier)?servicetypename))
>               ;


What's 'name' in the last line of the rewrite? ANTLR is trying to  
tell you that you reference something in a rewrite that's not part of  
the rule.
Also, the label $lc seems not to be defined anywhere, that should  
give you an error, too.

HTH,

-k
-- 
Kay Röpke
http://classdump.org/






More information about the antlr-interest mailing list