Hi Bryan, you need to define rule expr. :)
Ter
On Jul 22, 2009, at 5:27 PM, Bryan S Follins wrote:

> Chap 3, page 45:
>
> There is a snippet of code that reads:
>
> prog: stat+
>
> stat: expr NEWLINE
>    |  ID '=' expr NEWLINE
>    | NEWLINE
>    ;
>
> If I attempt to make a small grammar to test this, like the following:
>
> Grammar P;
>
> prog: stat+
>
> stat: expr NEWLINE
>    |  ID '=' expr NEWLINE
>    | NEWLINE
>    ;
>
> Will the grammar work in ANTLR Works?  When I try, I get "reference to
> undefined rule: expr."  How do I
> correct that error?
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: 
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to