summaryrefslogtreecommitdiff
path: root/src/list.h
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2021-11-09 20:03:23 +0800
committerJSDurand <mmemmew@gmail.com>2021-11-09 20:03:23 +0800
commit53b8b6ffab5a968db75e9babddf4e2dbb2c688a3 (patch)
tree4ff55ae0027544b06702d24ec4840a2011f724e9 /src/list.h
parent87b6bad500702b0fcd708ee5b1d99f61a29ec7e6 (diff)
save point: representation of grammar might be too rough.
The current representation of the grammar is the most primitive BNF. This is the simplest to implement, but is difficult to cope with user requirements. Moreover, I find another paper describing the GLR algorithm, so I need to think about the representation of the grammar more. In particular, I would like the generation of the grammar to be incremental, so per chance its data type should be adapted accordingly.
Diffstat (limited to 'src/list.h')
-rw-r--r--src/list.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/list.h b/src/list.h
index d774f96..b710aa2 100644
--- a/src/list.h
+++ b/src/list.h
@@ -28,8 +28,12 @@ typedef void (*printer)(void *);
typedef printer acter; /* a type that can act on list
elements */
+typedef void (*doer)(void);
+
void map_list(List *ls, acter f);
+void map_list_between(List *ls, acter f, doer d);
+
void print_list(List *ls, printer prt);
/* COPYER is expected to return NULL when it fails to copy. */