summaryrefslogtreecommitdiffstats
path: root/txr.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2010-01-13 15:25:11 -0800
committerKaz Kylheku <kaz@kylheku.com>2010-01-13 15:25:11 -0800
commit56cfdc348955495dbd11fc70fb7ac04a8bba1f71 (patch)
treeee7f0d7c44782243800dafc7605d588216d46755 /txr.c
parent5c111d0e415db7bc0bfa236b08ae6d620e898e92 (diff)
downloadtxr-56cfdc348955495dbd11fc70fb7ac04a8bba1f71.tar.gz
txr-56cfdc348955495dbd11fc70fb7ac04a8bba1f71.tar.bz2
txr-56cfdc348955495dbd11fc70fb7ac04a8bba1f71.zip
Dynamically determine which regex implementation to use:
NFA or derivatives. The default behavior is NFA, with derivatives used if the regular expression contains uses of complement or intersection. The --dv-regex option forces derivatives always.
Diffstat (limited to 'txr.c')
-rw-r--r--txr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/txr.c b/txr.c
index 16faa19a..ff1397f7 100644
--- a/txr.c
+++ b/txr.c
@@ -281,6 +281,10 @@ int txr_main(int argc, char **argv)
prog_string, string_utf8(*argv), nao);
return EXIT_FAILURE;
#endif
+ } else if (!strcmp(*argv, "--dv-regex")) {
+ opt_derivative_regex = 1;
+ argv++, argc--;
+ continue;
}
{