[antlr-interest] empty right hand side

Edwards, Waverly Waverly.Edwards at genesys.com
Fri Jun 27 11:49:51 PDT 2008


Aaaaah, I understand.


Thank you,


W. 

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Terence Parr
Sent: Friday, June 27, 2008 2:33 PM
To: antlr-interest Interest
Subject: Re: [antlr-interest] empty right hand side

x? is same as (x|).  As a rule, you see:

r : x
   |
   ;

Use nothing to represent "nothing" :)
Ter
On Jun 27, 2008, at 11:13 AM, Edwards, Waverly wrote:

>
> What would and empty right hand side look like in an ANTLR grammar?
>
> While I've been desperately attempting to stand on my own two feet and

> be able to determine a first and follow set from a grammar, I've read 
> and have been told that determining these sets only become difficult 
> when you have an empty production.  What would that look like?  It may

> sound a bit silly but at no time have I ever seen an empty right-hand 
> sides (conventionally written using the Greek letter epsilon) in an 
> ANTLR grammar.
>
>
> Thank you very much for your time,
>
>
> W.
>
> (if you see this message twice, I apologize.)



More information about the antlr-interest mailing list