[antlr-interest] A basic question!

ali azimi aliaazimi at yahoo.com
Wed Jun 20 12:16:36 PDT 2007


Hello,
   
  I know this question is very basic for all of you. But I really appreciate if you tell me what is it that I do wrong. 
   
  I get an error message when I try to generate Lexer and Parser from a grammar which includes the following:
   
  prog: stat+ ;
  stat: expr NEWLINE {System.out.println($expr.value);}
  | ID '=' expr NEWLINE{memory.put($ID.text, new Integer($expr.value));}
  | NEWLINE
  ;
   
  The error message is as follows:
   
  Check Grammer failed:
  (116): C:\Documents and 
|Expr.g:11:20: unknown attribute for rule expr: value 
  Consult the console for more information.
  (116): C:\Documents and 
|Expr.g:12:20: unknown attribute for rule expr: value 
  Consult the console for more information.
   
  Thank you in advance for any advice.
   
  Al

       
---------------------------------
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070620/14f5a850/attachment.html 


More information about the antlr-interest mailing list