libsapling  0.8.0
goto_table.h
Go to the documentation of this file.
1 #ifndef _LIBSAPLING_PARSER_GOTO_TABLE_H_
2 #define _LIBSAPLING_PARSER_GOTO_TABLE_H_
3 
9 #include "libsapling/dm/graph.h"
11 
12 
13 typedef struct goto_table *goto_table_t;
14 
21 goto_table_t goto_table__build(grammar_t g, node_t *C);
22 
31 int goto_table__get_state(goto_table_t tbl, grammar_t g, int state, int sym);
32 
41 goto_table_t new_goto_table(grammar_t g, node_t *C);
42 
53 void goto_table__set_state(goto_table_t tbl, grammar_t g, int state, int sym,
54  int go_to_state);
55 
56 #endif
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.
goto_table_t new_goto_table(grammar_t g, node_t *C)
Allocates memory for a goto table on the heap.
goto_table_t goto_table__build(grammar_t g, node_t *C)
Builds the goto table.
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.
Grammar implementation.
Graph implementation.