diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | regex.c | 10 |
2 files changed, 6 insertions, 9 deletions
@@ -1,3 +1,8 @@ +2010-01-14 Kaz Kylheku <kkylheku@gmail.com> + + * regex.c (reg_derivative): Bugfix: remove invalid + algebraic reductions in the derivative for the operator. + 2010-01-13 Kaz Kylheku <kkylheku@gmail.com> Bugfix: allow unescaped / to be used in regex character classes. @@ -1279,15 +1279,7 @@ static val reg_derivative(val exp, val ch) return cons(sym, cons(reg_derivative(first(args), ch), nil)); } else if (sym == or_s) { val d_arg1 = reg_derivative(first(args), ch); - val d_arg2 = nil; - - if (d_arg1 == nil) - return nil; - - d_arg2 = reg_derivative(second(args), ch); - - if (d_arg2 == nil) - return nil; + val d_arg2 = reg_derivative(second(args), ch); if (d_arg1 == t) return d_arg2; |