summaryrefslogtreecommitdiff
path: root/src/grammar.c
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2022-02-05 17:30:11 +0800
committerJSDurand <mmemmew@gmail.com>2022-02-05 17:30:11 +0800
commit510b10b96b546fcc6c6b6be85050305ddd192a41 (patch)
tree997d6c3f2c0a1ad6e27127d54a94655527e57864 /src/grammar.c
parent3fb5430080199a6d92a63f8259fe4a88df9b83ba (diff)
replace some hash table usage by tuples
Previously I used hash tables, which consume too much memory. Now the critical parts are replaced by a new hand-written library called "tuple.h". Now we can easily parse larger inputs. I haven't tested its limits, though.
Diffstat (limited to 'src/grammar.c')
-rw-r--r--src/grammar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/grammar.c b/src/grammar.c
index 5ed0b96..0b2be8d 100644
--- a/src/grammar.c
+++ b/src/grammar.c
@@ -222,7 +222,7 @@ build_grammar(Grammar *g, const List *rules,
CC_MOD(List *) names, CC_MOD(List *) predicates)
{
g->names = (List *) names;
- g->predicates = predicates;
+ g->predicates = (List *) predicates;
NUM len = list_length(names);
NUM rule_len = list_length(rules);