aboutsummaryrefslogtreecommitdiff
path: root/parts
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2025-07-02 22:55:08 +0300
committerkartofen <mladenovnasko0@gmail.com>2025-07-02 22:55:08 +0300
commit5064a7ebce75a26d0405c92040f1a40187fcc7e3 (patch)
tree7a41182cf329e77ebb760969e3f220f60079c187 /parts
parenta67266ff72280b85fed7ec498967a855a5735639 (diff)
turn clr into lalr and first steps for generating a parser
Diffstat (limited to 'parts')
-rw-r--r--parts/symbol.h2
-rw-r--r--parts/table.h2
-rw-r--r--parts/toklist.h2
-rw-r--r--parts/util-tables.h3
4 files changed, 6 insertions, 3 deletions
diff --git a/parts/symbol.h b/parts/symbol.h
index d3cb5cd..5f865ec 100644
--- a/parts/symbol.h
+++ b/parts/symbol.h
@@ -2,7 +2,7 @@
#define SYMBOL_H
typedef unsigned int symbol;
-extern const size_t total_symbols;
+extern size_t total_symbols;
// extern char *symbol_to_str[] ...
extern int symbol_is_terminal(symbol s);
diff --git a/parts/table.h b/parts/table.h
index 3b54312..23c61dc 100644
--- a/parts/table.h
+++ b/parts/table.h
@@ -8,7 +8,7 @@ extern struct action {
ACTION_ACCEPT
} type;
size_t arg;
-} *table[];
+} **table;
extern size_t table_states;
diff --git a/parts/toklist.h b/parts/toklist.h
index b6fd10d..9a7b8ce 100644
--- a/parts/toklist.h
+++ b/parts/toklist.h
@@ -5,5 +5,5 @@
extern symbol toklist_eat();
extern symbol toklist_peek();
-
+
#endif
diff --git a/parts/util-tables.h b/parts/util-tables.h
index a6d788a..66ecab5 100644
--- a/parts/util-tables.h
+++ b/parts/util-tables.h
@@ -5,4 +5,7 @@
extern int **follow;
extern int **first;
+extern void util_tables_fill();
+extern void util_tables_free();
+
#endif