Bisonc++ is highly comparable to the program bison++, written by Alain Coetmeur: all properly-written bison++ grammars ought to be convertible to bisonc++ grammars requiring very little or no modifications. Anyone familiar with bison++ or its precursor, bison, should quickly be able to use bisonc++ as well. Bisonc++ generates C++ code, rather than C code, and so a fair knowledge of the C++ programming language is required before bisonc++ can profitably be used.
This manual closely resembles bison(1)'s userguide. In fact, many sections
of that manual were copied straight into this manual. With bisonc++ distributions
(both the full source distribution and the binary .deb
distributions)
bison's orginal manual is included in both PostScript and (converted
from the texi
format) HTML
format. Where necessary sections of the
original manual were adapted to bisonc++'s characteristics. Some sections were
removed, and some new sections were added to the current manual. Expect
upgrades of the manual to appear without further notice. Upgrades will be
announced in the manual's title.
The current manual starts with tutorial chapters that explain the basic concepts of using bisonc++ and use three examples illustrating some of the core issues of LALR(1) grammars, each example building on the previous example (where available). If you don't know bisonc++, bison++ or bison, start by reading these chapters. Reference chapters follow describing specific aspects of bisonc++ in detail.
Bisonc++ was designed and built by Frank B. Brokken. The program's first version was constructed between November 2004 and May 2005.
stack_expansion
defining the number of
elements which are added to the semantic value stack when it's completely
full. By default room for 10 new elements are added.
STYPE__
objects,
privately derived from std::unique_ptr<Base>
objects. Inside the parser,
semantic values are not copied but only moved.
$$ = std::move($1)
, thus preventing needless copies. In
combination with polymorphic values, however, default actions can frequently
be suppressed, slightly improving the efficency of the generated parser.