
Data Structures | |
| struct | asmrp_sym_t |
| struct | asmrp_t |
Defines | |
| #define | ASMRP_SYM_NONE 0 |
| #define | ASMRP_SYM_EOF 1 |
| #define | ASMRP_SYM_NUM 2 |
| #define | ASMRP_SYM_ID 3 |
| #define | ASMRP_SYM_STRING 4 |
| #define | ASMRP_SYM_HASH 10 |
| #define | ASMRP_SYM_SEMICOLON 11 |
| #define | ASMRP_SYM_COMMA 12 |
| #define | ASMRP_SYM_EQUALS 13 |
| #define | ASMRP_SYM_AND 14 |
| #define | ASMRP_SYM_OR 15 |
| #define | ASMRP_SYM_LESS 16 |
| #define | ASMRP_SYM_LEQ 17 |
| #define | ASMRP_SYM_GEQ 18 |
| #define | ASMRP_SYM_GREATER 19 |
| #define | ASMRP_SYM_DOLLAR 20 |
| #define | ASMRP_SYM_LPAREN 21 |
| #define | ASMRP_SYM_RPAREN 22 |
| #define | ASMRP_MAX_ID 1024 |
| #define | ASMRP_MAX_SYMTAB 10 |
Functions | |
| static asmrp_t * | asmrp_new (void) |
| static void | asmrp_dispose (asmrp_t *p) |
| static void | asmrp_getch (asmrp_t *p) |
| static void | asmrp_init (asmrp_t *p, const char *str) |
| static void | asmrp_number (asmrp_t *p) |
| static void | asmrp_string (asmrp_t *p) |
| static void | asmrp_identifier (asmrp_t *p) |
| static void | asmrp_get_sym (asmrp_t *p) |
| static int | asmrp_find_id (asmrp_t *p, const char *s) |
| static int | asmrp_set_id (asmrp_t *p, const char *s, int v) |
| static int | asmrp_condition (asmrp_t *p) |
| static int | asmrp_operand (asmrp_t *p) |
| static int | asmrp_comp_expression (asmrp_t *p) |
| static void | asmrp_assignment (asmrp_t *p) |
| static int | asmrp_rule (asmrp_t *p) |
| static int | asmrp_eval (asmrp_t *p, int *matches, int matchsize) |
| int | asmrp_match (const char *rules, int bandwidth, int *matches, int matchsize) |
| #define ASMRP_MAX_ID 1024 |
| #define ASMRP_MAX_SYMTAB 10 |
| #define ASMRP_SYM_AND 14 |
Referenced by asmrp_condition(), and asmrp_get_sym().
| #define ASMRP_SYM_COMMA 12 |
Referenced by asmrp_assignment(), asmrp_get_sym(), and asmrp_rule().
| #define ASMRP_SYM_DOLLAR 20 |
Referenced by asmrp_get_sym(), and asmrp_operand().
| #define ASMRP_SYM_EOF 1 |
Referenced by asmrp_eval(), and asmrp_get_sym().
| #define ASMRP_SYM_EQUALS 13 |
Referenced by asmrp_assignment(), asmrp_comp_expression(), and asmrp_get_sym().
| #define ASMRP_SYM_GEQ 18 |
Referenced by asmrp_comp_expression(), and asmrp_get_sym().
| #define ASMRP_SYM_GREATER 19 |
Referenced by asmrp_comp_expression(), and asmrp_get_sym().
| #define ASMRP_SYM_HASH 10 |
Referenced by asmrp_get_sym(), and asmrp_rule().
| #define ASMRP_SYM_ID 3 |
Referenced by asmrp_assignment(), asmrp_identifier(), and asmrp_operand().
| #define ASMRP_SYM_LEQ 17 |
Referenced by asmrp_comp_expression(), and asmrp_get_sym().
| #define ASMRP_SYM_LESS 16 |
Referenced by asmrp_comp_expression(), and asmrp_get_sym().
| #define ASMRP_SYM_LPAREN 21 |
Referenced by asmrp_get_sym(), and asmrp_operand().
| #define ASMRP_SYM_NONE 0 |
Referenced by asmrp_new().
| #define ASMRP_SYM_NUM 2 |
Referenced by asmrp_assignment(), asmrp_number(), and asmrp_operand().
| #define ASMRP_SYM_OR 15 |
Referenced by asmrp_condition(), and asmrp_get_sym().
| #define ASMRP_SYM_RPAREN 22 |
Referenced by asmrp_get_sym(), and asmrp_operand().
| #define ASMRP_SYM_SEMICOLON 11 |
Referenced by asmrp_assignment(), asmrp_get_sym(), and asmrp_rule().
| #define ASMRP_SYM_STRING 4 |
Referenced by asmrp_assignment(), and asmrp_string().
| static void asmrp_assignment | ( | asmrp_t * | p | ) | [static] |
References asmrp_get_sym(), ASMRP_SYM_COMMA, ASMRP_SYM_EQUALS, ASMRP_SYM_ID, ASMRP_SYM_NUM, ASMRP_SYM_SEMICOLON, ASMRP_SYM_STRING, lprintf(), and asmrp_t::sym.
Referenced by asmrp_rule().
| static int asmrp_comp_expression | ( | asmrp_t * | p | ) | [static] |
References a, asmrp_get_sym(), asmrp_operand(), ASMRP_SYM_EQUALS, ASMRP_SYM_GEQ, ASMRP_SYM_GREATER, ASMRP_SYM_LEQ, ASMRP_SYM_LESS, b, lprintf(), and asmrp_t::sym.
Referenced by asmrp_condition().
| static int asmrp_condition | ( | asmrp_t * | p | ) | [static] |
References a, asmrp_comp_expression(), asmrp_get_sym(), ASMRP_SYM_AND, ASMRP_SYM_OR, b, lprintf(), and asmrp_t::sym.
Referenced by asmrp_operand(), and asmrp_rule().
| static void asmrp_dispose | ( | asmrp_t * | p | ) | [static] |
References asmrp_t::buf, i, asmrp_sym_t::id, asmrp_t::sym_tab, and asmrp_t::sym_tab_num.
Referenced by asmrp_match().
| static int asmrp_eval | ( | asmrp_t * | p, | |
| int * | matches, | |||
| int | matchsize | |||
| ) | [static] |
References asmrp_get_sym(), asmrp_rule(), ASMRP_SYM_EOF, lprintf(), and asmrp_t::sym.
Referenced by asmrp_match().
| static int asmrp_find_id | ( | asmrp_t * | p, | |
| const char * | s | |||
| ) | [static] |
References i, asmrp_sym_t::id, asmrp_t::sym_tab, and asmrp_t::sym_tab_num.
Referenced by asmrp_operand(), and asmrp_set_id().
| static void asmrp_get_sym | ( | asmrp_t * | p | ) | [static] |
References asmrp_getch(), asmrp_identifier(), asmrp_number(), asmrp_string(), ASMRP_SYM_AND, ASMRP_SYM_COMMA, ASMRP_SYM_DOLLAR, ASMRP_SYM_EOF, ASMRP_SYM_EQUALS, ASMRP_SYM_GEQ, ASMRP_SYM_GREATER, ASMRP_SYM_HASH, ASMRP_SYM_LEQ, ASMRP_SYM_LESS, ASMRP_SYM_LPAREN, ASMRP_SYM_OR, ASMRP_SYM_RPAREN, ASMRP_SYM_SEMICOLON, asmrp_t::ch, and asmrp_t::sym.
Referenced by asmrp_assignment(), asmrp_comp_expression(), asmrp_condition(), asmrp_eval(), asmrp_operand(), and asmrp_rule().
| static void asmrp_getch | ( | asmrp_t * | p | ) | [static] |
References asmrp_t::buf, asmrp_t::ch, lprintf(), and asmrp_t::pos.
Referenced by asmrp_get_sym(), asmrp_identifier(), asmrp_init(), asmrp_number(), and asmrp_string().
| static void asmrp_identifier | ( | asmrp_t * | p | ) | [static] |
References asmrp_getch(), ASMRP_SYM_ID, asmrp_t::ch, asmrp_t::str, and asmrp_t::sym.
Referenced by asmrp_get_sym().
| static void asmrp_init | ( | asmrp_t * | p, | |
| const char * | str | |||
| ) | [static] |
| int asmrp_match | ( | const char * | rules, | |
| int | bandwidth, | |||
| int * | matches, | |||
| int | matchsize | |||
| ) |
References asmrp_dispose(), asmrp_eval(), asmrp_init(), asmrp_new(), and asmrp_set_id().
Referenced by real_parse_sdp().
| static asmrp_t* asmrp_new | ( | void | ) | [static] |
References ASMRP_SYM_NONE, asmrp_t::buf, asmrp_t::sym, and asmrp_t::sym_tab_num.
Referenced by asmrp_match().
| static void asmrp_number | ( | asmrp_t * | p | ) | [static] |
References asmrp_getch(), ASMRP_SYM_NUM, asmrp_t::ch, asmrp_t::num, and asmrp_t::sym.
Referenced by asmrp_get_sym().
| static int asmrp_operand | ( | asmrp_t * | p | ) | [static] |
References asmrp_condition(), asmrp_find_id(), asmrp_get_sym(), ASMRP_SYM_DOLLAR, ASMRP_SYM_ID, ASMRP_SYM_LPAREN, ASMRP_SYM_NUM, ASMRP_SYM_RPAREN, i, lprintf(), asmrp_t::num, asmrp_t::str, asmrp_t::sym, asmrp_t::sym_tab, and asmrp_sym_t::v.
Referenced by asmrp_comp_expression().
| static int asmrp_rule | ( | asmrp_t * | p | ) | [static] |
References asmrp_assignment(), asmrp_condition(), asmrp_get_sym(), ASMRP_SYM_COMMA, ASMRP_SYM_HASH, ASMRP_SYM_SEMICOLON, lprintf(), and asmrp_t::sym.
Referenced by asmrp_eval().
| static int asmrp_set_id | ( | asmrp_t * | p, | |
| const char * | s, | |||
| int | v | |||
| ) | [static] |
References asmrp_find_id(), i, asmrp_sym_t::id, lprintf(), strdup(), asmrp_t::sym_tab, asmrp_t::sym_tab_num, and asmrp_sym_t::v.
Referenced by asmrp_match().
| static void asmrp_string | ( | asmrp_t * | p | ) | [static] |
References asmrp_getch(), ASMRP_SYM_STRING, asmrp_t::ch, asmrp_t::str, and asmrp_t::sym.
Referenced by asmrp_get_sym().
1.5.6