Commit Graph

16 Commits

Author SHA1 Message Date
Danila Fedorin 17ab9beb71 Implement exclusion operator matching. 2018-02-08 18:41:36 -08:00
Danila Fedorin eecfe653e3 Fix incorrect deletion code. 2018-02-08 18:40:56 -08:00
Danila Fedorin 945426e245 Add code to de-register patterns. 2018-02-05 22:42:02 -08:00
Danila Fedorin 3b72569b33 Store information about tokens when they are added. 2018-02-05 22:09:12 -08:00
Danila Fedorin 32af31d14a Ensure codebase is C90. 2018-02-04 00:21:03 -08:00
Danila Fedorin 600f169b5b Use const variables in eval as much as possible. 2017-07-20 22:09:42 -07:00
Danila Fedorin 1399934a24 Switch indices in strings to size_t. 2017-07-20 21:46:39 -07:00
Danila Fedorin bf85cdeca9 Fix incorrect enum comparisons. 2017-06-22 14:40:37 -07:00
Danila Fedorin f83f0a1bcc Make eval_all exit when largest match is empty. 2017-03-18 21:23:32 -07:00
Danila Fedorin adcc97ef0b Fix eval.c to use return code from eval_step. 2017-03-18 21:22:21 -07:00
Danila Fedorin 2f65eda7bd Try 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.
2017-02-26 22:35:45 -08:00
Danila Fedorin 140b727cc7 Make foreach_free public and fix a few bugs. 2017-02-14 19:10:44 -08:00
Danila Fedorin 97933c4ce9 Tentatively implement lexing multiple words. 2017-02-05 16:29:44 -08:00
Danila Fedorin 8ff435b7b5 Add underscores to local functions. 2017-02-05 15:49:06 -08:00
Danila Fedorin a0f51d441e Change the way best match is picked to the one with the "largest" id. 2017-02-05 15:46:43 -08:00
Danila Fedorin 0b6d73ebdf Write 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.
2017-02-04 00:28:36 -08:00