diff options
Diffstat (limited to 'slr-table.c')
-rw-r--r-- | slr-table.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/slr-table.c b/slr-table.c index 76399d7..d5f4505 100644 --- a/slr-table.c +++ b/slr-table.c @@ -17,7 +17,8 @@ extern void *xcalloc(size_t n, size_t size); #include "parts/table.h" #define TABLE_CAP 64 -struct action *table[TABLE_CAP]; +static struct action *__table[TABLE_CAP]; +struct action **table = __table; size_t table_states = 0; int table_fill(); @@ -224,7 +225,7 @@ enum symbol { SYMBOLS_END, }; -const size_t total_symbols = SYMBOLS_END; +size_t total_symbols = SYMBOLS_END; int symbol_is_terminal(symbol s) { return s < EP; } int symbol_is_input_end(symbol s) { return s == END_INPUT; } @@ -251,9 +252,9 @@ int main(void) { util_tables_fill(); table_fill(); - + table_print(); - + table_free(); util_tables_free(); } |