summaryrefslogtreecommitdiffstats
path: root/match.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-10-01 09:15:16 -0700
committerKaz Kylheku <kaz@kylheku.com>2011-10-01 09:15:16 -0700
commitfb552521dfeca5bb1e36d5d0f85ed8e7585caffb (patch)
tree815b1609331c027514cc1efacef5f2eda0fcd114 /match.h
parentd0416083b2672d431d9b29be300bf690ed246962 (diff)
downloadtxr-fb552521dfeca5bb1e36d5d0f85ed8e7585caffb.tar.gz
txr-fb552521dfeca5bb1e36d5d0f85ed8e7585caffb.tar.bz2
txr-fb552521dfeca5bb1e36d5d0f85ed8e7585caffb.zip
New directive: choose.
* match.c (choose_s, longest_k, shortest_k): New variables. (match_line, match_files): Introduced choose directive. (match_init): Initialize new variables. * match.h (choose_s): Declared. * parser.l (yybadtoken): Handle CHOOSE. (CHOOSE): Clause added for returning this token. * parser.y: Added #include "match.h". (CHOOSE): New token symbol. (choose_clause): New nonterminal symbol. (clause): choose_clause added. (all_clause, some_clause, none_clause, maybe_clause, cases_clause): Abstract syntax tree tweaked. (choose_clause): New syntax. (elem): Abstract syntax trees tweaked for many clauses. New CHOOSE clauses. (out_clause): New error case for choose_clause.
Diffstat (limited to 'match.h')
-rw-r--r--match.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/match.h b/match.h
index f343e654..a6d30510 100644
--- a/match.h
+++ b/match.h
@@ -26,3 +26,4 @@
void match_init(void);
int extract(val spec, val filenames, val bindings);
+extern val choose_s;