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
bison's orginal manual is included in both PostScript and (converted
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.
The complete list of affected names is:
DebugMode_, ErrorRecovery_, Return_, Tag_, Tokens_
PARSE_ABORT_, PARSE_ACCEPT_, UNEXPECTED_TOKEN_, sizeofTag_
Meta_, PI_, STYPE_
clearin_, errorRecovery_, errorVerbose_, executeAction_, lex_, lookup_, nextCycle_, nextToken_, popToken_, pop_, print_, pushToken_, push_, recovery_, redoToken_, reduce_, savedToken_, shift_, stackSize_, startRecovery_, state_, token_, top_, vs_,
d_acceptedTokens_, d_actionCases_, d_debug_, d_nErrors_, d_requiredTokens_, d_val_, idOfTag_, s_nErrors_
parse()-related members in the generated parser class were modified. The names of all accessible members in
parser.hnow end in a trailing underscore character. Predefined members in
parser.ihno longer have trailing underscores, and can be redefined (but must be available). The traditional
error(char const *)member in fact never uses its argument (and bisonc++ only passes the default "Syntax error" argument). Its prototype now no longer defines a parameter. Here's an overview of modified member names/signatures:
Before 6.00.00 Starting with 6.00.00
void error(char const *)
When re-generating parsers generated by bisonc++ before version 6.00.00, the signatures of the above functions in the file parser.h must be hand-modified to reflect the above changes. In addition, the implementations of error and exceptionHandler (default implementations were provided in parser.ih) must be adapted to their new signatures.
skeletons/binsonc++.hthat until the
#undefinstruction the parser class name will be read as the parser's base class name.
%prompt): when debug-code is active, the generated parser shows a ?-prompt at each cycle when processing its input (which should not be provided on the standard input stream).
--thread-safecan now also be specified as a directive (