manpagez: man pages & more
info bison
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.1.1 C++ Bison Interface

The C++ deterministic parser is selected using the skeleton directive, ‘%skeleton ""’, or the synonymous command-line option ‘’. See section Bison Declaration Summary.

When run, bison will create several entities in the ‘yy’ namespace. Use the ‘%define api.namespace’ directive to change the namespace name, see api.namespace. The various classes are generated in the following files:


The definition of the classes position and location, used for location tracking when enabled. These files are not generated if the %define variable api.location.type is defined. See section C++ Location Values.


An auxiliary class stack used by the parser.


(Assuming the extension of the grammar file was ‘.yy’.) The declaration and implementation of the C++ parser class. The basename and extension of these two files follow the same rules as with regular C parsers (see section Invoking Bison).

The header is mandatory; you must either pass ‘-d’/‘--defines’ to bison, or use the ‘%defines’ directive.

All these files are documented using Doxygen; run doxygen for a complete and accurate documentation.

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on December 1, 2013 using texi2html 5.0.

© 2000-2023
Individual documents may contain additional copyright information.