diff options
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..7f4faff --- /dev/null +++ b/ChangeLog @@ -0,0 +1,30 @@ +2014-03-17 Kaz Kylheku <kaz@kylheku.com> + + Fix in {m,n} syntax. + + The issue is that the parser partially consumes broken {m,n} + syntax. The eat_rep_notation function must backtrack fully, + and its caller must detect it has done so. + + Improved driver code. + + * awkreg.awk (dbg): New function, handy for debugging. + Prints its argument, and then returns it. + (match_and_eat_else): New function. Similar to match_and_eat, + except that if there si no match, it returns the new third + argument, rather than the rejected string itself. + This simplifies the expression of some backtracking logic. + (eat_rep_notation): If any of the notation doesn't match, + then backtrack all the way and return the original input unconsumed. + For this, a new local variable o ("original") retains the input. + (eat_factor): When matching a parenthesized regex, if matching closing + parens after the regex fails, then backtrack all the way, + returning the whole factor unconsumed. + (regex_check): New function: contains most of the logic of + the original is_regex. Basically it is like eat_regex, but with support + for ^ and $. + (is_regex): Basically now just reports whether regex_check fully + consumes the string or not. + (driver): The driver action is improved, showing the non-matching + suffix of the regex. + |