| « Prev 4.6 on_tree_node statement - custom initialization of a token tree node | Table of Contents | Next » 4.8 ptype statement - specifying parser value types |
prefix statement - specifying the generated API prefixBy default the public API (types, constants, and functions) of the generated
lexer and parser uses a prefix of p_.
This prefix can be changed with the prefix statement.
Example:
prefix myparser_;
With a parser generated with this prefix statement, instead of calling
p_context_new() you would call myparser_context_new().
The prefix statement can be optionally used if you would like to change the
prefix used by your generated lexer and parser to something other than the
default.
It can also be used when generating multiple lexers/parsers to be used in the same program to avoid symbol collisions.
| « Prev 4.6 on_tree_node statement - custom initialization of a token tree node | Table of Contents | Next » 4.8 ptype statement - specifying parser value types |