bisonc++api(3)

bisonc++ API
(bisonc++.6.02.00.tar.gz)

2005-2018

NAME

bisonc++ - Application programmer's interface of bisonc++ generated classes

DESCRIPTION

Bisonc++ derives from bison++(1), originally derived from bison(1). Like these programs bisonc++ generates a parser for an LALR(1) grammar. Bisonc++ generates C++ code: an expandable C++ class.

Refer to bisonc++(1) for a general overview. This manual page covers the application programmer's interface of classes generated by bisonc++. It contains the following sections:

All identifiers ending in an underscore character are reserved for bisonc++. Member functions ending in an underscore character must not be redefined. Data members ending in an underscore character are available in the generated parser class, and may be modified by user-defined members of the parser class. Some members like (error, exceptionHandler, lex) are defined in the parser class and must remain present, but their implementations may be altered by the user. Members for which no default implementation is provided in the parser's internal header file (e.g., Parser.ih) may not be redefined or masked by user-provided code.

UNDERSCORES

Starting with version 6.02.00 bisonc++ reserved identifiers no longer end in two underscore characters, but in one. This modification was necessary because according to the C++ standard identifiers having two or more consecutive underscore characters are reserved by the language. In practice this could require some minor modifications of existing source files using bisonc++'s facilities, most likely limited to changing Tokens__ into Tokens_ and changing Meta__ into Meta_.

The complete list of affected names is:

Enums:
DebugMode_, ErrorRecovery_, Return_, Tag_, Tokens_
Enums values:
PARSE_ABORT_, PARSE_ACCEPT_, UNEXPECTED_TOKEN_, sizeofTag_
Type / namespace designators:
Meta_, PI_, STYPE_
Member functions:
clearin_, errorRecovery_, errorVerbose_, executeAction_, lex_, lookup_, nextCycle_, nextToken_, popToken_, pop_, print_, pushToken_, push_, recovery_, redoToken_, reduce_, savedToken_, shift_, stackSize_, startRecovery_, state_, token_, top_, vs_,
Protected data members:
d_acceptedTokens_, d_actionCases_, d_debug_, d_nErrors_, d_requiredTokens_, d_val_, idOfTag_, s_nErrors_

PUBLIC SYMBOLS

Parser classes generated by bisonc++ offer the following public constructor, enums, members and types (in the following overview parser class-name prefixes (e.g., Parser::) prefixes were omitted):

When the %polymorphic directive is used:

PRIVATE ENUMS AND -TYPES

The following enumerations and types can be used by members of parser classes generated by bisonc++. They are actually protected members inherited from the parser's base class.

When the %polymorphic directive is used:

PRIVATE MEMBER FUNCTIONS

The following members can be used by members of parser classes generated by bisonc++. When prefixed by Base:: they are actually protected members inherited from the parser's base class. These members are shown below. Following the description of those members several more are listed: those members are used during the parsing process, andshould not be modified or masked by user-defined code.

The following members are required during the parsing process. They should not be modified or masked by user-defined code:

PRIVATE DATA MEMBERS

The following data members can be used by members of parser classes generated by bisonc++. All data members are actually protected members inherited from the parser's base class.

BUGS

With bisonc++ version 6.00.00 the following members were modified. Where necessary alternatives are mentioned:

TYPES AND VARIABLES IN THE ANONYMOUS NAMESPACE

In the file defining the parse function the following types and variables are defined in the anonymous namespace. These are mentioned here for the sake of completeness, and are not normally accessible to other parts of the parser.

SEE ALSO

bison(1), bison++(1), bisonc++(1), bisonc++input(7), bison.info (using texinfo), flexc++(1), https://fbb-git.github.io/bisoncpp/

Lakos, J. (2001) Large Scale C++ Software Design, Addison Wesley.
Aho, A.V., Sethi, R., Ullman, J.D. (1986) Compilers, Addison Wesley.

AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).