On 25 Oct 2006, at 00:27, Joel E. Denny wrote:

CVS Bison has two directives for writing verbatim code to the parser
header file.  However, they are still experimental, so I can't promise
what they'll look like in the next stable release:

1. %requires {CODE} inserts CODE that YYSTYPE and YYLTYPE depend upon.
That is, it inserts CODE near the top of the parser header file.

2. %provides {CODE} is what you probably want.  It exposes additional
definitions/declarations in the parser header file.  They could
potentially depend upon YYSTYPE and YYLTYPE since it inserts CODE near the
bottom of the parser header file.

What is the state about a more general construct like
  %define <name> {code}
- there appeared to be something to that effect in the Bison-Patches list, but I haven't tried it.

  Hans Aberg




_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to