summaryrefslogtreecommitdiff
path: root/src/crf.c
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2022-02-08 00:29:10 +0800
committerJSDurand <mmemmew@gmail.com>2022-02-08 12:33:05 +0800
commit5426d9e2a6b820e34809d639838b26643df9ab17 (patch)
tree111f2b478b671092e3f2e64a6171970b8a5cdf99 /src/crf.c
parentaaa12504c6095b2cdfa213a3d4b269bbd5e7038a (diff)
fix errorsHEADmaster
There are multiple subtle errors in the previous version, both in the codes and in the description of the BNF format. This version should fix some problems now. This version can successfully parse the grammar of its own grammar format, which is quite nice. See test/check_reader.c for parsing this format.
Diffstat (limited to 'src/crf.c')
-rw-r--r--src/crf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/crf.c b/src/crf.c
index 1c9fea9..5dba8bf 100644
--- a/src/crf.c
+++ b/src/crf.c
@@ -95,8 +95,10 @@ crf_add_edge(crf *crfp, pair2 source, pair4 label)
label.u
};
- /* fleprintf("adding (%ld, %ld, %ld, %ld, %ld, %ld)\n",
- * p6.x, p6.y, p6.z, p6.u, p6.v, p6.w); */
+#ifdef DEBUG
+ fleprintf("adding (%ld, %ld, %ld, %ld, %ld, %ld)\n",
+ p6.x, p6.y, p6.z, p6.u, p6.v, p6.w);
+#endif
NUM *find_result = luple6_find(crfp->lup, p6);
@@ -118,7 +120,9 @@ crf_add_edge(crf *crfp, pair2 source, pair4 label)
void
destroy_crf(crf *crfp)
{
+ /* fleprintf0("hi\n"); */
destroy_luple6(crfp->lup);
+ /* fleprintf0("hi\n"); */
free(crfp);
}