#include <Syntax.h>
Public Member Functions | |
CTree * | run (TokenProvider &) |
template<class T> | |
CTree * | run (TokenProvider &, CTree *(T::*)()) |
virtual void | configure (Config &) |
TokenProvider * | provider () const |
Token * | problem () const |
bool | error () const |
bool | look_ahead (int, unsigned=1) |
bool | look_ahead (int *, unsigned=1) |
int | look_ahead () const |
bool | consume () |
template<class T> | |
CTree * | run (TokenProvider &tp, CTree *(T::*rule)()) |
template<class T> | |
bool | parse (CTree *(T::*rule)()) |
template<class T> | |
bool | seq (CTree *(T::*rule)()) |
template<class T> | |
bool | list (CTree *(T::*rule)(), int token_type, bool end_sep) |
template<class T> | |
bool | list (CTree *(T::*rule)(), int *token_type_set, bool end_sep) |
template<class T> | |
bool | catch_error (CTree *(T::*rule)(), const char *msg, int *finish_tokens, int *skip_tokens) |
Public Attributes | |
TokenProvider * | token_provider |
Protected Member Functions | |
Syntax (Builder &, Semantic &) | |
virtual | ~Syntax () |
template<class T> | |
bool | parse (CTree *(T::*)()) |
template<class T> | |
bool | seq (CTree *(T::*)()) |
template<class T> | |
bool | seq (bool(T::*)()) |
template<class T> | |
bool | list (CTree *(T::*)(), int, bool=false) |
template<class T> | |
bool | list (CTree *(T::*)(), int *, bool=false) |
template<class T> | |
bool | list (bool(T::*)(), int, bool=false) |
template<class T> | |
bool | list (bool(T::*)(), int *, bool=false) |
template<class T> | |
bool | catch_error (CTree *(T::*)(), const char *, int *, int *) |
bool | parse (int) |
bool | parse (int *) |
bool | parse_token (int) |
bool | opt (bool) const |
Builder & | builder () const |
Semantic & | semantic () const |
virtual CTree * | trans_unit () |
virtual void | handle_directive () |
State | save_state () |
void | forget_state () |
void | restore_state () |
void | restore_state (State) |
void | set_state (State) |
bool | accept (CTree *, State) |
Token * | locate_token () |
void | skip () |
void | skip_block (int, int) |
void | skip_curly_block () |
void | skip_round_block () |
void | parse_block (int, int) |
void | parse_curly_block () |
void | parse_round_block () |
bool | skip (int, bool=true) |
bool | skip (int *, bool=true) |
bool | is_in (int, int *) const |
Classes | |
struct | State |
virtual Puma::Syntax::~Syntax | ( | ) | [inline, protected, virtual] |
CTree* Puma::Syntax::run | ( | TokenProvider & | ) |
CTree* Puma::Syntax::run | ( | TokenProvider & | , | |
CTree * | T::*)( | |||
) | [inline] |
virtual void Puma::Syntax::configure | ( | Config & | ) | [inline, virtual] |
Reimplemented in Puma::CCSyntax, and Puma::CSyntax.
TokenProvider* Puma::Syntax::provider | ( | ) | const [inline] |
Token * Puma::Syntax::problem | ( | ) | const [inline] |
bool Puma::Syntax::error | ( | ) | const [inline] |
bool Puma::Syntax::look_ahead | ( | int | , | |
unsigned | = 1 | |||
) |
bool Puma::Syntax::look_ahead | ( | int * | , | |
unsigned | = 1 | |||
) |
int Puma::Syntax::look_ahead | ( | ) | const [inline] |
bool Puma::Syntax::consume | ( | ) | [inline] |
bool Puma::Syntax::parse | ( | CTree * | T::*)( | ) | [inline, protected] |
bool Puma::Syntax::seq | ( | CTree * | T::*)( | ) | [inline, protected] |
bool Puma::Syntax::seq | ( | bool(T::*)() | rule | ) | [inline, protected] |
bool Puma::Syntax::list | ( | CTree * | T::*)(, | |
int | , | |||
bool | = false | |||
) | [inline, protected] |
bool Puma::Syntax::list | ( | CTree * | T::*)(, | |
int * | , | |||
bool | = false | |||
) | [inline, protected] |
bool Puma::Syntax::list | ( | bool(T::*)() | rule, | |
int | token_type, | |||
bool | end_sep = false | |||
) | [inline, protected] |
bool Puma::Syntax::list | ( | bool(T::*)() | rule, | |
int * | token_type_set, | |||
bool | end_sep = false | |||
) | [inline, protected] |
bool Puma::Syntax::catch_error | ( | CTree * | T::*)(, | |
const char * | , | |||
int * | , | |||
int * | ||||
) | [inline, protected] |
bool Puma::Syntax::parse | ( | int | token_type | ) | [inline, protected] |
bool Puma::Syntax::parse | ( | int * | ) | [protected] |
bool Puma::Syntax::parse_token | ( | int | ) | [protected] |
bool Puma::Syntax::opt | ( | bool | ) | const [inline, protected] |
Builder & Puma::Syntax::builder | ( | ) | const [inline, protected] |
Reimplemented in Puma::CCSyntax.
Semantic & Puma::Syntax::semantic | ( | ) | const [inline, protected] |
Reimplemented in Puma::CCSyntax.
CTree * Puma::Syntax::trans_unit | ( | ) | [inline, protected, virtual] |
Reimplemented in Puma::CSyntax.
void Puma::Syntax::handle_directive | ( | ) | [inline, protected, virtual] |
Reimplemented in Puma::CSyntax.
State Puma::Syntax::save_state | ( | ) | [protected] |
void Puma::Syntax::forget_state | ( | ) | [protected] |
void Puma::Syntax::restore_state | ( | ) | [protected] |
void Puma::Syntax::restore_state | ( | State | ) | [protected] |
void Puma::Syntax::set_state | ( | State | ) | [protected] |
Token* Puma::Syntax::locate_token | ( | ) | [protected] |
void Puma::Syntax::skip | ( | ) | [protected] |
void Puma::Syntax::skip_block | ( | int | , | |
int | ||||
) | [protected] |
void Puma::Syntax::skip_curly_block | ( | ) | [protected] |
void Puma::Syntax::skip_round_block | ( | ) | [protected] |
void Puma::Syntax::parse_block | ( | int | , | |
int | ||||
) | [protected] |
void Puma::Syntax::parse_curly_block | ( | ) | [protected] |
void Puma::Syntax::parse_round_block | ( | ) | [protected] |
bool Puma::Syntax::skip | ( | int | , | |
bool | = true | |||
) | [protected] |
bool Puma::Syntax::skip | ( | int * | , | |
bool | = true | |||
) | [protected] |
bool Puma::Syntax::is_in | ( | int | , | |
int * | ||||
) | const [protected] |
CTree* Puma::Syntax::run | ( | TokenProvider & | tp, | |
CTree *(T::*)() | rule | |||
) | [inline] |
bool Puma::Syntax::parse | ( | CTree *(T::*)() | rule | ) | [inline] |
bool Puma::Syntax::seq | ( | CTree *(T::*)() | rule | ) | [inline] |
bool Puma::Syntax::list | ( | CTree *(T::*)() | rule, | |
int | token_type, | |||
bool | end_sep | |||
) | [inline] |
bool Puma::Syntax::list | ( | CTree *(T::*)() | rule, | |
int * | token_type_set, | |||
bool | end_sep | |||
) | [inline] |
bool Puma::Syntax::catch_error | ( | CTree *(T::*)() | rule, | |
const char * | msg, | |||
int * | finish_tokens, | |||
int * | skip_tokens | |||
) | [inline] |