Commit Graph

16 Commits

Author SHA1 Message Date
d753bbe1ab Fix the macro to allow it to return something. 2017-02-03 21:02:07 -08:00
01d49eb397 Implement a few "pair map" functions, mostly used for hash tables.
In order to efficiently check if nodes are contained within a
given set, without knowing exactly how many nodes there are and
allocating a ton of memory, it's probably best to use a hash table
(sparse sets would be more efficient but would require to allocate
all of their space at once). It's also pointless to reimplement most
of the hash table functionality from libds just to get it to work
with pairs (pattern id + node id), so pairmap.h provides a few
defaults that can be plugged into the default ht_s, as well as a
few macros to facilitate some hash table operations.
2017-01-27 22:16:31 -08:00
da48537f3c Update libds. 2017-01-27 22:04:16 -08:00
bae15027c3 Add a pattern id variable to all nodes. 2017-01-26 15:02:44 -08:00
ee40622ceb Implement pattern compilation and freeing. 2017-01-21 21:19:12 -08:00
d8ddaa8b45 Fix a few more bugs in helper functions. 2017-01-21 21:18:55 -08:00
16832e98a9 Fix create functions not setting node type. 2017-01-21 21:18:34 -08:00
19ca43d8e4 Add a pattern struct to encompass a pattern NFA and its size.
The size is necessary in free operations - unlike vectors and linked
lists, sparse sets in libds are not dynamically resizable.
2017-01-21 21:18:09 -08:00
fbba562eb7 Update libds to latest version. 2017-01-21 20:32:39 -08:00
89d2c84c39 Update libds to newest version. 2017-01-21 16:48:28 -08:00
54670a1f32 Change the return type of pattern_free. 2017-01-20 23:40:51 -08:00
961136a41b Add internal function, mostly for memory allocation and concatenation. 2017-01-19 23:32:09 -08:00
e86518b716 Write a general header file and a header file for regular expressions. 2017-01-19 20:17:55 -08:00
41d4d98678 Create CMakeLists.txt file. 2017-01-19 19:33:59 -08:00
b211362f62 Add libds dependency. 2017-01-19 15:30:11 -08:00
05c93bdfc6 Initial commit. Setup gitignore. 2017-01-19 15:29:50 -08:00