diff options
author | JSDurand <mmemmew@gmail.com> | 2022-02-01 12:22:34 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2022-02-01 12:22:34 +0800 |
commit | 3fb5430080199a6d92a63f8259fe4a88df9b83ba (patch) | |
tree | 767c3266b59566e98234ec81b228cf8115096939 /src/bsr.h | |
parent | eb007d554251456a2a508849edf91b15aab1333e (diff) |
need to stop abusing hash tables
Hash tables take too much space!
If I use hash tables, the length of the input will be severely
limited, to an unacceptable extent. So we have to use arrays
instead.
Diffstat (limited to 'src/bsr.h')
-rw-r--r-- | src/bsr.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -25,6 +25,8 @@ hash-table's almost constant-time look-up feature to implement this. */ +/* FIXME: Don't use hash-tables, as that uses too much space! */ + /* A BSR set has two types. The first type is of the form @@ -99,6 +101,10 @@ BOOL bsr_find(CCR_MOD(bsr *) b, CCR_MOD(Grammar *) g, BOOL * const restrict errorp, NUM X, NUM a, NUM c, NUM i, NUM k, NUM j); +/* if not found return NULL */ +ht *bsr_lookup(CCR_MOD(bsr *) b, BOOL * const restrict errorp, + NUM X, NUM i, NUM j); + /* Change to new line after LINE_LEN many elements. */ void bsr_print(CCR_MOD(bsr *) b, CCR_MOD(Grammar *) g, NUM line_len); |