summaryrefslogtreecommitdiff
path: root/src/util.c
AgeCommit message (Collapse)Author
2022-01-12Implement a simple hash table.JSDurand
It is a very basic and simple hash table. It is so simple that I hesitate to call it a hash table. Anyways, I think it suffices for my purposes here. * Makefile.am: Add necessary files. * grammar.c (new_tnt_string): Formatting. * ht.c (new_ht): Constructor (destroy_ht): Destructor (ht_expand): Rehash (ht_insert, ht_delete, ht_find): Main functions. * list.c (add_to_list, list_assure_size): Modify the use of realloc. * test/check_ht.c: Ensure this is working correctly. * util.c (read_entire_file): Modify the use of realloc.
2022-01-11Add the framework for character classes.JSDurand
Now we have the potential to recognize character classes. But the most important task for us now is to experiment with ((B)RN)GLR algorithms, so we leave the character classes at the present state for a moment.
2022-01-04Fix problemsJSDurand
Now some problems are fixed. It can now read grammar correctly (hopefully) from a file, in the BNF format. And strings (terminals) are handled fine as well. So glad that there are no leak problems now.
2022-01-04temporary commitJSDurand
Now we can read grammars from a file. But we need to check if it works for reading strings still.