librostlab-blast  1.0.1
Classes | Public Types | Public Member Functions | List of all members
rostlab::blast::parser Class Reference

A Bison parser. More...

#include <blast-parser-parser.h>

Classes

struct  basic_symbol
 
struct  by_type
 Type access provider for token (enum) based symbols. More...
 
union  semantic_type
 Symbol semantic values. More...
 
struct  symbol_type
 "External" symbols: returned by the scanner. More...
 
struct  syntax_error
 Syntax errors thrown from user actions. More...
 
struct  token
 Tokens. More...
 

Public Types

enum  { empty_symbol = -2 }
 The symbol type number to denote an empty symbol. More...
 
typedef location location_type
 Symbol locations. More...
 
typedef token::yytokentype token_type
 (External) token type, as returned by yylex. More...
 
typedef int symbol_number_type
 Symbol type: an internal symbol number. More...
 
typedef unsigned char token_number_type
 Internal symbol number for tokens (subsumed by symbol_number_type). More...
 
typedef int debug_level_type
 Type for debugging levels. More...
 

Public Member Functions

 parser (rostlab::blast::parser_driver &drv_yyarg, void *yyscanner_yyarg)
 Build a parser object. More...
 
virtual ~parser ()
 
int operator() ()
 
virtual int parse ()
 
std::ostream & debug_stream () const YY_ATTRIBUTE_PURE
 The current debugging stream. More...
 
void set_debug_stream (std::ostream &)
 Set the current debugging stream. More...
 
debug_level_type debug_level () const YY_ATTRIBUTE_PURE
 The current debugging level. More...
 
void set_debug_level (debug_level_type l)
 Set the current debugging level. More...
 
virtual void error (const location_type &loc, const std::string &msg)
 
void error (const syntax_error &err)
 Report a syntax error. More...
 

Detailed Description

A Bison parser.

Definition at line 169 of file blast-parser-parser.h.

Member Typedef Documentation

◆ debug_level_type

Type for debugging levels.

Definition at line 381 of file blast-parser-parser.h.

◆ location_type

Symbol locations.

Definition at line 188 of file blast-parser-parser.h.

◆ symbol_number_type

Symbol type: an internal symbol number.

Definition at line 246 of file blast-parser-parser.h.

◆ token_number_type

Internal symbol number for tokens (subsumed by symbol_number_type).

Definition at line 252 of file blast-parser-parser.h.

◆ token_type

(External) token type, as returned by yylex.

Definition at line 243 of file blast-parser-parser.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

The symbol type number to denote an empty symbol.

Enumerator
empty_symbol 

Definition at line 249 of file blast-parser-parser.h.

Constructor & Destructor Documentation

◆ parser()

rostlab::blast::parser::parser ( rostlab::blast::parser_driver drv_yyarg,
void *  yyscanner_yyarg 
)

Build a parser object.

◆ ~parser()

virtual rostlab::blast::parser::~parser ( )
virtual

Member Function Documentation

◆ debug_level()

debug_level_type rostlab::blast::parser::debug_level ( ) const

The current debugging level.

◆ debug_stream()

std::ostream& rostlab::blast::parser::debug_stream ( ) const

The current debugging stream.

◆ error() [1/2]

virtual void rostlab::blast::parser::error ( const location_type loc,
const std::string &  msg 
)
virtual

Report a syntax error.

Parameters
locwhere the syntax error is found.
msga description of the syntax error.

◆ error() [2/2]

void rostlab::blast::parser::error ( const syntax_error err)

Report a syntax error.

◆ operator()()

int rostlab::blast::parser::operator() ( )

Parse. An alias for parse ().

Returns
0 iff parsing succeeded.

◆ parse()

virtual int rostlab::blast::parser::parse ( )
virtual

Parse.

Returns
0 iff parsing succeeded.

◆ set_debug_level()

void rostlab::blast::parser::set_debug_level ( debug_level_type  l)

Set the current debugging level.

◆ set_debug_stream()

void rostlab::blast::parser::set_debug_stream ( std::ostream &  )

Set the current debugging stream.


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