g2o
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SlamParser::Scanner Class Reference

#include <scanner.h>

Inheritance diagram for SlamParser::Scanner:
Inheritance graph
[legend]
Collaboration diagram for SlamParser::Scanner:
Collaboration graph
[legend]

Public Member Functions

 Scanner (std::istream *arg_yyin=0, std::ostream *arg_yyout=0)
 
virtual ~Scanner ()
 
virtual Parser::token_type lex (Parser::semantic_type *yylval, Parser::location_type *yylloc)
 
void set_debug (bool b)
 

Detailed Description

Definition at line 22 of file scanner.h.

Constructor & Destructor Documentation

◆ Scanner()

SlamParser::Scanner::Scanner ( std::istream *  arg_yyin = 0,
std::ostream *  arg_yyout = 0 
)

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().

Definition at line 1621 of file flex_scanner.cpp.

1622 : SlamFlexLexer(in, out) {}
std::ostream * out
Definition scanner.l:138

◆ ~Scanner()

SlamParser::Scanner::~Scanner ( )
virtual

Required for virtual functions

Definition at line 1624 of file flex_scanner.cpp.

1624{}

Member Function Documentation

◆ lex()

virtual Parser::token_type SlamParser::Scanner::lex ( Parser::semantic_type yylval,
Parser::location_type yylloc 
)
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.

◆ set_debug()

void SlamParser::Scanner::set_debug ( bool  b)

Enable debug output (via arg_yyout) if compiled into the scanner.

Definition at line 1626 of file flex_scanner.cpp.

1626{ yy_flex_debug = b; }
std::ostream out yy_flex_debug
Definition scanner.l:148

References yy_flex_debug.

Referenced by SlamParser::Driver::parse_stream().


The documentation for this class was generated from the following files: