[antlr-interest] newbie problem)reference to rewrite element name without reference on left of ->.

ali azimi aliaazimi at yahoo.com
Mon Jul 9 16:04:35 PDT 2007


Hi,
   
  I have a problem regarding rewrite error messages. The Rule1 produces Error1 when I try to generate code from it. But when I enclose the parser grammar(before ->) in parenthesis (Rule2), there is no error message.
   
    
     Why is that?
  
     Could you also tell me if referencing of  SLIST[$signallistitem.start] is ok? 

  Rule1 signallistitem
              :signalidentifier|signallistidentifier|timeridentifier
              ->^(SLIST[$signallistitem.start] signalidentifier signallistidentifier timeridentifier)
              ;
  Error1:
  Check grammar failed:
   (136):C:\Documents and Settings\...\FinalProjectSim.g:875:13:reference to rewrite element name without reference on left of ->.
   
   
  Rule2 signallistitem
              : ( signalidentifier|signallistidentifier|timeridentifier )
              ->^(SLIST[$signallistitem.start ]signalidentifier signallistidentifier timeridentifier)
              ;
  Thank you so much in advance.
   
  Best wishes,
   
  Al

       
---------------------------------
Shape Yahoo! in your own image.  Join our Network Research Panel today!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070709/382826a0/attachment.html 


More information about the antlr-interest mailing list