diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2010-01-13 12:24:00 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2010-01-13 12:24:00 -0800 |
commit | b839b5a212fdd77c5dc95b684d7e6790292bb3dc (patch) | |
tree | 12aa13021e6af8b1a276e6bc00f712b76ee1631a /match.c | |
parent | c017faf62d69d43219f7d1d651f7a46083f8a6a4 (diff) | |
download | txr-b839b5a212fdd77c5dc95b684d7e6790292bb3dc.tar.gz txr-b839b5a212fdd77c5dc95b684d7e6790292bb3dc.tar.bz2 txr-b839b5a212fdd77c5dc95b684d7e6790292bb3dc.zip |
Impelement derivative-based regular expressions.
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -368,7 +368,7 @@ static val match_line(val bindings, val specline, val dataline, LOG_MATCH("var delimiting string", find); bindings = acons_new(bindings, sym, sub_str(dataline, pos, find)); pos = plus(find, length_str(pat)); - } else if (consp(pat) && typeof(first(pat)) == regex_s) { + } else if (consp(pat) && regexp(first(pat))) { val find = search_regex(dataline, first(pat), pos, modifier); val fpos = car(find); val flen = cdr(find); @@ -412,7 +412,7 @@ static val match_line(val bindings, val specline, val dataline, sem_error(spec_lineno, lit("variable followed by invalid element"), nao); } - } else if (typeof(directive) == regex_s) { + } else if (regexp(directive)) { val past = match_regex(dataline, directive, pos); if (nullp(past)) { LOG_MISMATCH("regex"); |