bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] more on prologue alternatives


From: Joel E. Denny
Subject: Re: [PATCH] more on prologue alternatives
Date: Wed, 4 Oct 2006 03:57:09 -0400 (EDT)

On Wed, 4 Oct 2006, Paolo Bonzini wrote:

> 
> > 1. %code{...} is the most common place for parser implementation code.  In
> > C/C++, it goes in the code file.  In Java, it goes in the parser class.
> > 
> > 2. %requires{...} is a place to put dependency code for externally exposed
> > definitions required by Bison.  In C/C++, it's for dependencies of YYSTYPE
> > and YYLTYPE.  In Java, it's for import directives.
> > 
> > 3. %provides{...} is a place for additional externally exposed definitions.
> > In C/C++, it goes at the bottom of the header file so that it can depend on
> > YYSTYPE, YYLTYPE, and yytokentype.  In Java, I suppose it could be used to
> > define other package-visible classes in the same java file.
> >   
> This would be completely ok.

Great.  Paul?  Akim?

> For Java, %provides and the epilogue would be
> synonyms.

Given that Java draws no distinction between a header file and a code 
file, that result seems intuitive, so I think it's ok.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]