|
| CSyntax (CBuilder &, CSemantic &) |
|
virtual void | configure (Config &) |
| Configure the syntactic analysis object.
|
|
virtual Grammar | grammar () const |
|
virtual bool | typedef_name () |
|
virtual bool | private_name () |
|
virtual bool | identifier () |
|
virtual bool | literal () |
|
virtual bool | cmpd_str () |
|
virtual bool | str_literal () |
|
virtual bool | trans_unit () |
| Top parse rule to be reimplemented for a specific grammar.
|
|
virtual bool | prim_expr () |
|
virtual bool | id_expr () |
|
virtual bool | cmpd_literal () |
|
virtual bool | postfix_expr () |
|
virtual bool | postfix_expr1 () |
|
virtual bool | expr_list () |
|
virtual bool | unary_expr () |
|
virtual bool | unary_expr1 () |
|
virtual bool | cast_expr () |
|
virtual bool | cast_expr1 () |
|
virtual bool | cast_expr2 () |
|
virtual bool | offsetof_expr () |
|
virtual bool | memb_designator () |
|
virtual bool | mul_expr () |
|
virtual bool | add_expr () |
|
virtual bool | shift_expr () |
|
virtual bool | rel_expr () |
|
virtual bool | equ_expr () |
|
virtual bool | and_expr () |
|
virtual bool | excl_or_expr () |
|
virtual bool | incl_or_expr () |
|
virtual bool | log_and_expr () |
|
virtual bool | log_or_expr () |
|
virtual bool | cond_expr () |
|
virtual bool | ass_expr () |
|
virtual bool | ass_expr1 () |
|
virtual bool | expr () |
|
virtual bool | const_expr () |
|
virtual bool | stmt () |
|
virtual bool | label_stmt () |
|
virtual bool | expr_stmt () |
|
virtual bool | cmpd_stmt () |
|
virtual bool | stmt_seq () |
|
virtual bool | select_stmt () |
|
virtual bool | sub_stmt () |
|
virtual bool | condition () |
|
virtual bool | iter_stmt () |
|
virtual bool | for_init_stmt () |
|
virtual bool | jump_stmt () |
|
virtual bool | decl_seq () |
|
virtual bool | decl () |
|
virtual bool | decl_check () |
|
virtual bool | block_decl () |
|
virtual bool | simple_decl () |
|
virtual bool | decl_spec () |
|
virtual bool | decl_spec_seq () |
|
virtual bool | decl_spec_seq1 () |
|
virtual bool | misc_spec () |
|
virtual bool | storage_class_spec () |
|
virtual bool | fct_spec () |
|
virtual bool | type_spec () |
|
virtual bool | simple_type_spec () |
|
virtual bool | type_name () |
|
virtual bool | elaborated_type_spec () |
|
virtual bool | enum_key () |
|
virtual bool | enum_spec () |
|
virtual bool | enum_spec1 () |
|
virtual bool | enumerator_list () |
|
virtual bool | enumerator_def () |
|
virtual bool | enumerator () |
|
virtual bool | asm_def () |
|
virtual bool | init_declarator_list () |
|
virtual bool | init_declarator () |
|
virtual bool | init_declarator1 () |
|
virtual bool | declarator () |
|
virtual bool | direct_declarator () |
|
virtual bool | direct_declarator1 () |
|
virtual bool | identifier_list () |
|
virtual bool | array_delim () |
|
virtual bool | ptr_operator () |
|
virtual bool | cv_qual_seq () |
|
virtual bool | cv_qual () |
|
virtual bool | declarator_id () |
|
virtual bool | type_id () |
|
virtual bool | type_spec_seq () |
|
virtual bool | type_spec_seq1 () |
|
virtual bool | abst_declarator () |
|
virtual bool | direct_abst_declarator () |
|
virtual bool | direct_abst_declarator1 () |
|
virtual bool | param_decl_clause () |
|
virtual bool | param_decl_list () |
|
CTree * | rule_param_decl () |
|
virtual bool | param_decl () |
|
virtual bool | param_decl1 () |
|
CTree * | rule_fct_def () |
|
virtual bool | fct_def () |
|
CTree * | rule_arg_decl_seq () |
|
virtual bool | arg_decl_seq () |
|
CTree * | rule_fct_body () |
|
virtual bool | fct_body () |
|
CTree * | rule_init () |
|
virtual bool | init () |
|
CTree * | rule_init_clause () |
|
virtual bool | init_clause () |
|
CTree * | rule_init_list () |
|
virtual bool | init_list () |
|
CTree * | rule_init_list_item () |
|
virtual bool | init_list_item () |
|
CTree * | rule_designation () |
|
virtual bool | designation () |
|
CTree * | rule_designator () |
|
virtual bool | designator () |
|
CTree * | rule_class_spec () |
|
virtual bool | class_spec () |
|
virtual bool | class_head () |
|
virtual bool | class_key () |
|
CTree * | rule_member_spec () |
|
virtual bool | member_spec () |
|
CTree * | rule_member_decl () |
|
virtual bool | member_decl () |
|
CTree * | rule_member_declarator_list () |
|
virtual bool | member_declarator_list () |
|
CTree * | rule_member_declarator () |
|
virtual bool | member_declarator () |
|
pointcut | parse_fct () |
| Interface for aspects that affect the syntax and parsing process.
|
|
pointcut | check_fct () |
|
pointcut | in_syntax () |
|
pointcut | rule_exec () |
|
pointcut | rule_call () |
|
pointcut | rule_check () |
|
CTree * | run (TokenProvider &tp) |
| Start the parse process.
|
|
template<class T > |
CTree * | run (TokenProvider &tp, bool(T::*rule)()) |
| Start the parse process at a specific grammar rule.
|
|
TokenProvider * | provider () const |
| Get the token provider from which the parsed tokens are read.
|
|
Token * | problem () const |
| Get the last token that could not be parsed.
|
|
bool | error () const |
| Check if errors occured during the parse process.
|
|
bool | look_ahead (int token_type, unsigned n=1) |
| Look-ahead n core language tokens and check if the n-th token has the given type.
|
|
bool | look_ahead (int *token_types, unsigned n=1) |
| Look-ahead n core language tokens and check if the n-th token has one of the given types.
|
|
int | look_ahead (unsigned n=1) |
| Look-ahead one core language token.
|
|
bool | consume () |
| Consume all tokens until the next core language token.
|
|
bool | predict_1 (const tokenset &ts) |
|
template<class T > |
bool | parse (CTree *(T::*rule)()) |
| Parse the given grammar rule.
|
|
template<class T > |
bool | seq (CTree *(T::*rule)()) |
| Parse a sequence of the given grammar rule.
|
|
template<class T > |
bool | seq (bool(T::*rule)()) |
| Parse a sequence of the given grammar rule.
|
|
template<class T > |
bool | list (CTree *(T::*rule)(), int separator, bool trailing_separator=false) |
| Parse a sequence of rule-separator pairs.
|
|
template<class T > |
bool | list (CTree *(T::*rule)(), int *separators, bool trailing_separator=false) |
| Parse a sequence of rule-separator pairs.
|
|
template<class T > |
bool | list (bool(T::*rule)(), int separator, bool trailing_separator=false) |
| Parse a sequence of rule-separator pairs.
|
|
template<class T > |
bool | list (bool(T::*rule)(), int *separators, bool trailing_separator=false) |
| Parse a sequence of rule-separator pairs.
|
|
template<class T > |
bool | catch_error (bool(T::*rule)(), const char *msg, int *finish_tokens, int *skip_tokens) |
| Parse a grammar rule automatically catching parse errors.
|
|
bool | parse (int token_type) |
| Parse a token with the given type.
|
|
bool | parse (int *token_types) |
| Parse a token with one of the given types.
|
|
bool | parse_token (int token_type) |
| Parse a token with the given type.
|
|
bool | opt (bool dummy) const |
| Optional rule parsing.
|
|
Builder & | builder () const |
| Get the syntax tree builder.
|
|
Semantic & | semantic () const |
| Get the semantic analysis object.
|
|
State | save_state () |
| Save the current parser state.
|
|
void | forget_state () |
| Forget the saved parser state.
|
|
void | restore_state () |
| Restore the saved parser state.
|
|
void | restore_state (State state) |
| Restore the saved parser state to the given state.
|
|
void | set_state (State state) |
| Overwrite the parser state with the given state.
|
|
bool | accept (CTree *tree, State state) |
| Accept the given syntax tree node.
|
|
CTree * | accept (CTree *tree) |
| Accept the given syntax tree node.
|
|
Token * | locate_token () |
| Skip all non-core language tokens until the next core-language token is read.
|
|
void | skip () |
| Skip the current token.
|
|
void | skip_block (int start, int end, bool inclusive=true) |
| Skip all tokens between start and end, including start and end token.
|
|
void | skip_curly_block () |
| Skip all tokens between '{' and '}', including '{' and '}'.
|
|
void | skip_round_block () |
| Skip all tokens between '(' and ')', including '(' and ')'.
|
|
bool | parse_block (int start, int end) |
| Parse all tokens between start and end, including start and end token.
|
|
bool | parse_curly_block () |
| Parse all tokens between '{' and '}', including '{' and '}'.
|
|
bool | parse_round_block () |
| Parse all tokens between '(' and ')', including '(' and ')'.
|
|
bool | skip (int stop_token, bool inclusive=true) |
| Skip all tokens until a token with the given type is read.
|
|
bool | skip (int *stop_tokens, bool inclusive=true) |
| Skip all tokens until a token with one of the given types is read.
|
|
bool | is_in (int token_type, int *token_types) const |
| Check if the given token type is in the set of given token types.
|
|
|
template<typename SYNTAX , typename RULE > |
static bool | seq (SYNTAX &s) |
| Parse a sequence of the given grammar rule by calling RULE::check() in a loop.
|
|
template<typename SYNTAX , typename RULE > |
static bool | list (SYNTAX &s, int sep, bool trailing_sep=false) |
| Parse a sequence of rule-separator pairs by calling RULE::check() in a loop.
|
|
template<typename SYNTAX , typename RULE > |
static bool | list (SYNTAX &s, int *separators, bool trailing_sep=false) |
| Parse a sequence of rule-separator pairs by calling RULE::check() in a loop.
|
|
template<class SYNTAX , class RULE > |
static bool | catch_error (SYNTAX &s, const char *msg, int *finish_tokens, int *skip_tokens) |
| Parse a grammar rule automatically catching parse errors.
|
|
template<class RULE1 , class RULE2 , class SYNTAX > |
static bool | ambiguous (SYNTAX &s) |
| First parse rule1 and if that rule fails discard all errors and parse the rule2.
|
|
TokenProvider * | token_provider |
| Token provider for getting the tokens to parse.
|
|