d808f98fd3Add code to return early in CMakeLists to prevent being included again.Danila Fedorin2017-03-18 17:36:13 -0700
2f65eda7bdTry to fix reading freed memory in eval.c. This occurred when the null term was reached - the token was freed, but no error was thrown (it's just the end of the string), so the program attempted to increment the index using freed token data.Danila Fedorin2017-02-26 22:35:45 -0800
eb4204fe76Fix two bugs. One was caused by the previous commit. The other was created by using invalid memory.Danila Fedorin2017-02-25 22:38:13 -0800
c629be5d68Merge branch 'master' of dev.danilafe.com:Experiments/liblexDanila Fedorin2017-02-25 22:26:06 -0800
a0f51d441eChange the way best match is picked to the one with the "largest" id.Danila Fedorin2017-02-05 15:46:43 -0800
5be88a2856Fix bug(s) in pattern compilation that added the '[' pr ']' chars.Danila Fedorin2017-02-04 00:29:20 -0800
0b6d73ebdfWrite initial code for matching the patterns to a single string. The code is limited in two aspects, at the moment: * It's not very well tested * The current "best" match is just the one that occurred last. While this is just fine in terms of length, this leaves open to chance which pattern type will be returned if multiple patterns of the same length match.Danila Fedorin2017-02-04 00:28:36 -0800
01d49eb397Implement 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.Danila Fedorin2017-01-27 22:16:31 -0800
19ca43d8e4Add 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.Danila Fedorin2017-01-21 21:18:09 -0800