yacc samples?

"Daniel G. Hyams" <dgh2@Ra.MsState.Edu>
4 May 1998 22:57:31 -0400

          From comp.compilers

Related articles
yacc samples? dgh2@Ra.MsState.Edu (Daniel G. Hyams) (1998-05-04)
Re: yacc samples? janaki@csa.iisc.ernet.in (Janaki. S) (1998-05-15)
| List of all articles for this month |

From: "Daniel G. Hyams" <dgh2@Ra.MsState.Edu>
Newsgroups: comp.compilers
Date: 4 May 1998 22:57:31 -0400
Organization: Mississippi State University
Keywords: yacc, question, comment

I have recently begun to work with Berkeley yacc, and have
a grammar put together for a small mathemtical language for
my application.


I need to add two particular things to the grammar, which I
am not sure how to do properly. Are there repositories of
sample grammars around for me to examine? I have found a
C grammar on the web, but couldn't tell much from it.


Specifically, I need to
    1) allow for an if/endif and if/else/endif construct.
    2) allow lists in a declaration, i.e, instead of allowing
          only a declaration like
                double a;
          also allow
                double a,b,c,d;


If anyone knows of some good yacc samples, I would really
appreciate any pointers!


Cheers,


-----------------------------------------------------------
Daniel G. Hyams
email: dhyams@ebicom.net
phone: (601) 323-4198
[There's the sample code from my book, at ftp://ftp.iecc.com/pub.file/lyprg.zip
-John]
--


Post a followup to this message

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