libsapling
0.8.0
|
Parser goto table implementation. More...
Go to the source code of this file.
Typedefs | |
typedef struct goto_table * | goto_table_t |
Functions | |
goto_table_t | goto_table__build (grammar_t g, node_t *C) |
Builds the goto table. More... | |
int | goto_table__get_state (goto_table_t tbl, grammar_t g, int state, int sym) |
Returns the state to go to after reducing a production. More... | |
goto_table_t | new_goto_table (grammar_t g, node_t *C) |
Allocates memory for a goto table on the heap. More... | |
void | goto_table__set_state (goto_table_t tbl, grammar_t g, int state, int sym, int go_to_state) |
Sets the state to go to after reducing a production. More... | |
Parser goto table implementation.
goto_table_t goto_table__build | ( | grammar_t | g, |
node_t * | C | ||
) |
Builds the goto table.
g | A grammar |
C | A set of sets of LR(0) item |
int goto_table__get_state | ( | goto_table_t | tbl, |
grammar_t | g, | ||
int | state, | ||
int | sym | ||
) |
Returns the state to go to after reducing a production.
tbl | The goto table |
g | The grammar that was used to build the table |
state | The state |
sym | The nonterminal symbol |
void goto_table__set_state | ( | goto_table_t | tbl, |
grammar_t | g, | ||
int | state, | ||
int | sym, | ||
int | go_to_state | ||
) |
Sets the state to go to after reducing a production.
tbl | The goto table |
g | The grammar that was used to build the table |
state | The state |
sym | The nonterminal symbol |
goto_table_t new_goto_table | ( | grammar_t | g, |
node_t * | C | ||
) |
Allocates memory for a goto table on the heap.
g | A grammar |
C | A set of sets of LR(0) item |