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.
default-actions
controlling the addition of a
$$ = $1
action blocks to non-empty production rules that do not themselves
define final action blocks. Option/directive no-default-action-return
is
not supported anymore.
tag-mismatches
issuing a warning if no
$$
assignment was detected in the last (action block) elements of
production rules.
DebugMode__
and a new member
setDebug(DebugMode__ mode)
that can be used to control debug output and to
show case label numbers of the parser's executeAction
member just before
execution. This is useful in cases where a run-time mismatch between tags of
polymorphic semantic values are observed.
SType::data
member functions are obsolete and were removed
from SType's
class's interface (section 4.6.1 fully covers the
use and characteristics of polymorphic semantic values).
SType::operator bool
member was replaced by a new member
function bool SType::valid()
.
SType::emplace
was replaced by
SType::assign
: it should be used to assign values to SType
objects. If
only one argument is required, operatpr=
can also be used (but may require
casting).
$$(...), _$$, _$i
are new, while
$<tag>$
and $<tag>i
(for positive values of i) are no longer
supported. See section 4.6.2 for a full overview.
At the implementation level polymorphic semantic values are not implemented
using std::shared_ptr
objects. Moreover, polymorphic semantic value types
do not have to be default constructible anymore.