diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2010-01-14 12:55:03 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2010-01-14 12:55:03 -0800 |
commit | c0e5177880892c9ef93ec8e1248742a4af522c48 (patch) | |
tree | 6f83f1fe975793ac9a12c2562d6c77684ef99e40 | |
parent | f50d67df2057c2cd1d26668f47bc604338ce33f0 (diff) | |
download | txr-c0e5177880892c9ef93ec8e1248742a4af522c48.tar.gz txr-c0e5177880892c9ef93ec8e1248742a4af522c48.tar.bz2 txr-c0e5177880892c9ef93ec8e1248742a4af522c48.zip |
* regex.c (reg_derivative): Bugfix: remove invalid
algebraic reductions in the derivative for the operator.
-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; |