Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
step::parser Class Reference

A Bison parser. More...

#include <step.tab.hxx>

Data Structures

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

Public Types

typedef int semantic_type
 Symbol semantic values.
 
typedef token::yytokentype 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).
 

Public Member Functions

 parser (step::scanner *scanner_yyarg)
 Build a parser object.
 
virtual ~parser ()
 
int operator() ()
 Parse. An alias for parse ().
 
virtual int parse ()
 Parse.
 
virtual void error (const std::string &msg)
 Report a syntax error.
 
void error (const syntax_error &err)
 Report a syntax error.
 

Static Public Member Functions

static std::string symbol_name (symbol_kind_type yysymbol)
 The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking.
 

Static Public Attributes

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

Detailed Description

A Bison parser.

Member Typedef Documentation

◆ by_type

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

◆ semantic_type

Symbol semantic values.

◆ symbol_kind_type

(Internal) symbol kind.

◆ token_kind_type

Token kind, as returned by yylex.

◆ token_type

Backward compatibility alias (Bison 3.6).

Constructor & Destructor Documentation

◆ parser()

step::parser::parser ( step::scanner * scanner_yyarg)

Build a parser object.

◆ ~parser()

virtual step::parser::~parser ( )
virtual

Member Function Documentation

◆ error() [1/2]

virtual void step::parser::error ( const std::string & msg)
virtual

Report a syntax error.

Parameters
msga description of the syntax error.

◆ error() [2/2]

void step::parser::error ( const syntax_error & err)

Report a syntax error.

◆ operator()()

int step::parser::operator() ( )

Parse. An alias for parse ().

Returns
0 iff parsing succeeded.

◆ parse()

virtual int step::parser::parse ( )
virtual

Parse.

Returns
0 iff parsing succeeded.

◆ symbol_name()

static std::string step::parser::symbol_name ( symbol_kind_type yysymbol)
static

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

Field Documentation

◆ YYNTOKENS

const symbol_kind_type step::parser::YYNTOKENS = symbol_kind::YYNTOKENS
static

The number of tokens.


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