Loading...
Searching...
No Matches
rostlab::blast::parser Class Reference

A Bison parser. More...

`#include <blast-parser-parser.h>`

## Classes

union | value_type
| Symbol semantic values. More...
struct | syntax_error
| Syntax errors thrown from user actions. More...
struct | token
| Token kinds. More...
struct | symbol_kind
| Symbol kinds. More...
struct | basic_symbol
struct | by_kind
| Type access provider for token (enum) based symbols. More...
struct | symbol_type
| "External" symbols: returned by the scanner. More...
class | context

## Public Types

typedef value_type | semantic_type
| Backward compatibility (Bison 3.8).
typedef location | location_type
| Symbol locations.
typedef token::token_kind_type | token_kind_type
| Token kind, as returned by yylex.
typedef token_kind_type | token_type
| Backward compatibility alias (Bison 3.6).
typedef symbol_kind::symbol_kind_type | symbol_kind_type
| (Internal) symbol kind.
typedef by_kind | by_type
| Backward compatibility for a private implementation detail (Bison 3.6).
typedef int | debug_level_type
| Type for debugging levels.

## Public Member Functions

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

## Static Public Member Functions

static std::string | symbol_name (symbol_kind_type yysymbol)

## Static Public Attributes

static const symbol_kind_type | YYNTOKENS = symbol_kind::YYNTOKENS
| The number of tokens.

## Detailed Description

A Bison parser.

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

## Member Typedef Documentation

## by_type

typedef by_kind rostlab::blast::parser::by_type

Backward compatibility for a private implementation detail (Bison 3.6).

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

## debug_level_type

typedef int rostlab::blast::parser::debug_level_type

Type for debugging levels.

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

## location_type

typedef location rostlab::blast::parser::location_type

Symbol locations.

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

## semantic_type

typedef value_type rostlab::blast::parser::semantic_type

Backward compatibility (Bison 3.8).

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

## symbol_kind_type

typedef symbol_kind::symbol_kind_type rostlab::blast::parser::symbol_kind_type

(Internal) symbol kind.

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

## token_kind_type

typedef token::token_kind_type rostlab::blast::parser::token_kind_type

Token kind, as returned by yylex.

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

## token_type

typedef token_kind_type rostlab::blast::parser::token_type

Backward compatibility alias (Bison 3.6).

Definition at line 285 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

  loc | where the syntax error is found.
  msg | a 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.

## symbol_name()

std::string rostlab::blast::parser::symbol_name | ( | symbol_kind_type | yysymbol | ) |

static

The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking.

## Member Data Documentation

## YYNTOKENS

const symbol_kind_type rostlab::blast::parser::YYNTOKENS = symbol_kind::YYNTOKENS

static

The number of tokens.

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

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

- rostlab/blast-parser-parser.h