From db1b9c8dcb0d115217a33c2fe8e0760d49143e11 Mon Sep 17 00:00:00 2001 From: kartofen Date: Sat, 13 Sep 2025 15:24:28 +0300 Subject: ast nearly build and proper errors --- demos/sample-files/calc-defs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'demos/sample-files/calc-defs.c') 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);", -- cgit v1.2.3