diff options
| author | kartofen <kartofen.mail.0@protonmail.com> | 2025-09-13 15:24:28 +0300 |
|---|---|---|
| committer | kartofen <kartofen.mail.0@protonmail.com> | 2025-09-13 15:24:28 +0300 |
| commit | db1b9c8dcb0d115217a33c2fe8e0760d49143e11 (patch) | |
| tree | c93743adff3d78ea066c14879b7d2bfeb3ce42fb /demos/sample-files/calc-defs.c | |
| parent | 46e786db9d1b48b8fbc3502e36f093b755f3e09f (diff) | |
ast nearly build and proper errors
Diffstat (limited to 'demos/sample-files/calc-defs.c')
| -rw-r--r-- | demos/sample-files/calc-defs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/demos/sample-files/calc-defs.c b/demos/sample-files/calc-defs.c index b9d1788..9385a02 100644 --- a/demos/sample-files/calc-defs.c +++ b/demos/sample-files/calc-defs.c @@ -12,7 +12,7 @@ enum symbol { SYMBOLS(X_TO_ENUM) }; size_t total_symbols = SYMBOLS_END; -extern char **symbol_to_str = (char *([])){ SYMBOLS(X_TO_STR) }; +char **symbol_to_str = (char *([])){ SYMBOLS(X_TO_STR) }; IMPLEMENT_FUNCPTR(int, symbol_is_terminal, (symbol s)) { return s < EP; } IMPLEMENT_FUNCPTR(int, symbol_is_input_end, (symbol s)) { return s == END_INPUT; } @@ -38,6 +38,8 @@ static struct production _grammar[] = { struct production *grammar = _grammar; size_t total_productions = sizeof(_grammar)/sizeof(*_grammar); +char *stack_item_type = "int"; + // #include "???.h" char **semantic_action_str = (char *([])){ "v = A(0);", |
