From 510b10b96b546fcc6c6b6be85050305ddd192a41 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Sat, 5 Feb 2022 17:30:11 +0800 Subject: 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. --- src/Makefile.am | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/Makefile.am') diff --git a/src/Makefile.am b/src/Makefile.am index b897ec0..2b2d7d8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,10 +1,10 @@ -AM_CFLAGS = -Wall -Wextra +AM_CFLAGS = -Wall -Wextra -Wno-missing-field-initializers noinst_LIBRARIES = libeps.a libeps_a_SOURCES = grammar.c list.c util.c reader.c str.c \ -utf8.c dfa.c ht.c bsr.c crf.c cnp.c \ +utf8.c dfa.c ht.c bsr.c tuple.c crf.c cnp.c \ grammar.h list.h util.h reader.h str_partial.h \ -str.h utf8.h dfa.h ht.h bsr.h crf.h cnp.h +str.h utf8.h dfa.h ht.h bsr.h crf.h cnp.h tuple.h pair.h libeps_a_CFLAGS = $(AM_CFLAGS) --pedantic @@ -22,7 +22,8 @@ CLEANFILES = TAGS # tests check_PROGRAMS = check_list check_grammar check_reader check_dfa \ -check_ht check_bsr check_crf check_cnp check_pred +check_ht check_pred check_tuple check_bsr check_crf \ +check_cnp check_list_SOURCES = test/check_list.c list.c @@ -37,19 +38,21 @@ check_dfa_SOURCES = test/check_dfa.c dfa.c list.c str.c utf8.c check_ht_SOURCES = test/check_ht.c ht.c check_bsr_SOURCES = test/check_bsr.c bsr.c grammar.c list.c util.c \ -ht.c utf8.c str.c dfa.c +ht.c utf8.c str.c dfa.c tuple.c check_crf_SOURCES = test/check_crf.c crf.c grammar.c list.c util.c \ -ht.c utf8.c str.c dfa.c +ht.c utf8.c str.c dfa.c tuple.c + +# check_splist_SOURCES = test/check_splist.c splist.c list.c check_cnp_SOURCES = test/check_cnp.c crf.c cnp.c grammar.c list.c \ -util.c ht.c utf8.c str.c dfa.c bsr.c +util.c ht.c utf8.c str.c dfa.c bsr.c tuple.c check_pred_SOURCES = test/check_pred.c dfa.c list.c str.c utf8.c \ grammar.c util.c ht.c +check_tuple_SOURCES = test/check_tuple.c tuple.c util.c + TESTS = $(check_PROGRAMS) AM_COLOR_TESTS = always - - -- cgit v1.2.3-18-g5258