summaryrefslogtreecommitdiff
path: root/src/dfa.h
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2022-01-31 09:23:20 +0800
committerJSDurand <mmemmew@gmail.com>2022-01-31 09:23:20 +0800
commita8bd5e9d85ac9928bd29add82e887f82642af893 (patch)
tree74e377f9fccffc2779ff97fa0bd8ad180b9c865c /src/dfa.h
parente555c88b8107caf886da229444c2bed1aaef6c2c (diff)
test/check_cnp: working algorithm
I now have a working algorithm in test/check_cnp. It can correctly parse the grammar for an esoteric language called "Brainfuck". This language does not matter. What matters is that it contains parentheses. So this shows that at least for grammars as complex as parentheses, this parser works well. Haha.
Diffstat (limited to 'src/dfa.h')
-rw-r--r--src/dfa.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dfa.h b/src/dfa.h
index a22409f..70c8bf6 100644
--- a/src/dfa.h
+++ b/src/dfa.h
@@ -32,18 +32,18 @@ dfa *new_dfa();
void destroy_dfa(dfa *table);
-void print_dfa(const dfa * const restrict table);
+void print_dfa(CCR_MOD(dfa *) table);
dfa *dfa_from_bytes(int sequence_size,
- const NUM * const restrict data);
+ CCR_MOD(NUM *) data);
dfa *dfa_from_bytes_neg(int sequence_size,
- const NUM * const restrict data);
+ CCR_MOD(NUM *) data);
dfa *dfa_from_bytes_both(int sequence_size,
- const NUM * const restrict data,
+ CCR_MOD(NUM *) data,
int neg_sequence_size,
- const NUM * const restrict negdata);
+ CCR_MOD(NUM *) negdata);
/* TODO: Reject character bytes from a given DFA. */
@@ -59,6 +59,6 @@ dfa *dfa_from_bytes_both(int sequence_size,
inline BOOL dfa_any_fun(const NUM UNUSED code) { return 1; }
-BOOL run_dfa(const dfa * const restrict table, const NUM code);
+BOOL run_dfa(CCR_MOD(dfa *) table, const NUM code);
#endif