epsilon productions in Java CUP?

"Smith, Doug" <smith@sjfc.edu>
15 Dec 2001 00:42:08 -0500

          From comp.compilers

Related articles
epsilon productions in Java CUP? smith@sjfc.edu (Smith, Doug) (2001-12-15)
Re: epsilon productions in Java CUP? lee_lau@hotmail.com (2001-12-20)
| List of all articles for this month |
From: "Smith, Doug" <smith@sjfc.edu>
Newsgroups: comp.compilers
Date: 15 Dec 2001 00:42:08 -0500
Organization: Compilers Central
Keywords: Java, parse, question
Posted-Date: 15 Dec 2001 00:42:08 EST

I'm looking for information on how to specify epsilon productions in Java
CUP. For example if one wanted to specify the grammar of valid balanced
parenthesis they would use the production:


  S -> (S)S | p


where "|" means alternation and p is an epsilon or null production.


In CUP one would specify the terminals and non-terminals, the precedence and
then the grammar as above. But how does CUP understand the concept or
meaning of a null production?


I've searched every web page with every search engine I could find on Java
CUP and while there are one or two good tutorials out there I don't seem to
be able to find what I'm looking for. This is needed as part of a larger
grammar specification so any help would be greatly appreciated.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.