Next: A Complete C++ Example, Previous: C++ Parser Interface, Up: C++ Parsers [Contents][Index]
The parser invokes the scanner by calling yylex
. Contrary to C
parsers, C++ parsers are always pure: there is no point in using the
%define api.pure full
directive. Therefore the interface is as follows.
Return the next token. Its type is the return value, its semantic value and location being yylval and yylloc. Invocations of ‘%lex-param {type1 arg1}’ yield additional arguments.