diff options
author | kartofen <mladenovnasko0@gmail.com> | 2025-07-08 18:25:29 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2025-07-08 18:25:29 +0300 |
commit | d028cc9c04cf46256166434bdea68d5f5c6d310f (patch) | |
tree | 28420104516e446a06172687eae16e3bf4dfd5bd /parts | |
parent | 919611902c39fd70afe1162883ee6bfd34f2642e (diff) |
simple calculator example
Diffstat (limited to 'parts')
-rw-r--r-- | parts/table.h | 2 | ||||
-rw-r--r-- | parts/toklist.h | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/parts/table.h b/parts/table.h index 486466f..fc63488 100644 --- a/parts/table.h +++ b/parts/table.h @@ -12,7 +12,7 @@ extern struct action { extern size_t table_states; -extern int (*table_fill)(); +extern int (*table_fill)(); // non-zero on fail extern void (*table_free)(); void table_print(); diff --git a/parts/toklist.h b/parts/toklist.h index f32cd25..760846f 100644 --- a/parts/toklist.h +++ b/parts/toklist.h @@ -5,10 +5,10 @@ struct token; -// /*extern*/ struct token *toklist_eat(); -// /*extern*/ struct token *toklist_peek(); +symbol token_sym(struct token *t); // UB for NULL +int token_val(struct token *t); // UB for NULL -symbol toklist_eat(); -symbol toklist_peek(); +struct token *toklist_eat(); // always non-NULL +struct token *toklist_peek(); // always non-NULL #endif |