manpagez: man pages & more
info bison
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.1.5 C++ Scanner Interface

The parser invokes the scanner by calling yylex. Contrary to C parsers, C++ parsers are always pure: there is no point in using the %pure-parser directive. Therefore the interface is as follows.

Method on parser: int yylex (semantic_value_type& yylval, location_type& yylloc, type1 arg1, ...)

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.


© manpagez.com 2000-2024
Individual documents may contain additional copyright information.