dlinear
0.0.1
Delta-complete SMT solver for linear programming
|
Smt2Scanner is a derived class to add some extra function to the scanner class. More...
#include <scanner.h>
Public Member Functions | |
Smt2Scanner (std::istream *arg_yyin=nullptr, std::ostream *arg_yyout=nullptr) | |
Create a new scanner object. | |
~Smt2Scanner () override | |
Required for virtual functions. | |
virtual Smt2Parser::token_type | lex (Smt2Parser::semantic_type *yylval, Smt2Parser::location_type *yylloc) |
This is the main lexing function. | |
void | set_debug (bool b) |
Enable debug output (via arg_yyout) if compiled into the scanner. | |
Smt2Scanner is a derived class to add some extra function to the scanner class.
Flex itself creates a class named yyFlexLexer, which is renamed using macros to ExampleFlexLexer. However we change the context of the generated yylex() function to be contained within the Smt2Scanner class. This is required because the yylex() defined in ExampleFlexLexer has no parameters.
|
explicit |
Create a new scanner object.
The streams arg_yyin and arg_yyout default to cin and cout, but that assignment is only made when initializing in yylex().
|
virtual |
This is the main lexing function.
It is generated by flex according to the macro declaration YY_DECL above. The generated bison parser then calls this virtual function to fetch new tokens.