summaryrefslogtreecommitdiffstats
path: root/txr.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-11-10 17:24:14 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-11-10 17:24:14 -0800
commit959b2af05ba8b7907a74407f0f8e187e4ae8ca4c (patch)
tree2dd4519823b830b84dce126ff2db5a87948b78d8 /txr.c
parent8bef574c2fc8d99301f2ebbbaad2acc6e9e8891a (diff)
downloadtxr-959b2af05ba8b7907a74407f0f8e187e4ae8ca4c.tar.gz
txr-959b2af05ba8b7907a74407f0f8e187e4ae8ca4c.tar.bz2
txr-959b2af05ba8b7907a74407f0f8e187e4ae8ca4c.zip
* match.c (opt_nobindings, opt_arraydims): Global
variables moved from parser.l. (opt_lisp_bindings): New variable. (dump_bindings): Dump Lisp syntax bindings on standard output if opt_lisp_bindings is set. (v_cat): Do not complain about trailing material; this is not compatible with horizontal cat. * parser.l (opt_nobindings, opt_arraydims): Moved to match.c. * txr.c (txr_main): New options, --lisp-bindings and the equivalent -l. * txr.h: opt_lisp_bindings declared.
Diffstat (limited to 'txr.c')
-rw-r--r--txr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/txr.c b/txr.c
index 4c471e68..8f71f91e 100644
--- a/txr.c
+++ b/txr.c
@@ -286,8 +286,13 @@ int txr_main(int argc, char **argv)
opt_derivative_regex = 1;
argv++, argc--;
continue;
+ } else if (!strcmp(*argv, "--lisp-bindings")) {
+ opt_lisp_bindings = 1;
+ argv++, argc--;
+ continue;
}
+
{
char *popt;
for (popt = (*argv)+1; *popt != 0; popt++) {
@@ -301,6 +306,9 @@ int txr_main(int argc, char **argv)
case 'b':
opt_nobindings = 1;
break;
+ case 'l':
+ opt_lisp_bindings = 1;
+ break;
case 'a':
case 'c':
case 'D':