diff options
| author | kartofen <kartofen.mail.0@protonmail.com> | 2025-07-03 19:11:36 +0300 |
|---|---|---|
| committer | kartofen <kartofen.mail.0@protonmail.com> | 2025-07-03 19:11:36 +0300 |
| commit | 98254bbeb96e1c868d761e81f39f59744a6837c6 (patch) | |
| tree | 94de181d7dae1d35310e1e9bfbf761b0fc536adf /parts/table.h | |
| parent | 67447ebd3a51a9af29d18a53a38aba038a0c039e (diff) | |
working more or less parser generator (no semantic action, so pretty much useless
Diffstat (limited to 'parts/table.h')
| -rw-r--r-- | parts/table.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/parts/table.h b/parts/table.h index 23c61dc..44d1e12 100644 --- a/parts/table.h +++ b/parts/table.h @@ -12,12 +12,13 @@ extern struct action { extern size_t table_states; -extern int table_fill(); -extern void table_free(); +/*extern*/ int table_fill(); +/*extern*/ void table_free(); void table_print(); void table_print_cstyle(); #include "symbol.h" + void table_print() { printf(" "); @@ -40,7 +41,7 @@ void table_print() void table_print_cstyle() { for(size_t i = 0; i < table_states; i++) { - printf("{"); + printf("(struct action[]){"); for(size_t sym = 0; sym < total_symbols; sym++) printf("{%d, %zu},", table[i][sym].type, table[i][sym].arg); printf("},\n"); |
