[antlr-interest] newbie rewrite error messages

ali azimi aliaazimi at yahoo.com
Sat Jul 7 11:00:57 PDT 2007


Hi,
   
  When I try to generate code from my grammar the following rewrite rule produces some errors.
  priorityinputbody
              :(virtuality)? stimulus(','stimulus)*->^(virtuality? stimulus+)
              ;
  But when I try the following there is no error produced. 
  priorityinputbody
              :(virtuality)? stimulus(','stimulus)*->^(VIR virtuality? stimulus+)
              ; 
  VIR:
  ;
   
  1)So I deduce that I am not allowed to use ‘?’ at root node. Is that correct?
  2) So if I opt for the second rewrite rule, I need to define VIR. How should I define it?
   
  Thanking you in advance. I am very grateful.
   
  Best wishes,
   
  Al

       
---------------------------------
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070707/13888243/attachment.html 


More information about the antlr-interest mailing list