summaryrefslogtreecommitdiffstats
path: root/tests/008/configfile.txr
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-10-01 20:26:51 -0700
committerKaz Kylheku <kaz@kylheku.com>2011-10-01 20:26:51 -0700
commitf913686407f54b66a4ae13f7361f45ef66423781 (patch)
tree8a351596de202c301212b2d7154342382f0e3234 /tests/008/configfile.txr
parent10cda159132822dd9c77199409fe09ff9f4d7417 (diff)
downloadtxr-f913686407f54b66a4ae13f7361f45ef66423781.tar.gz
txr-f913686407f54b66a4ae13f7361f45ef66423781.tar.bz2
txr-f913686407f54b66a4ae13f7361f45ef66423781.zip
New test case under tests/008.
* Makefile: Made previous TXR_ARGS for 008 specific to tokenizing test case, and introduced separate TXR_ARGS for this test case. * tests/008/configfile: New file. * tests/008/configfile.expected: New file. * tests/008/configfile.txr: New file.
Diffstat (limited to 'tests/008/configfile.txr')
-rw-r--r--tests/008/configfile.txr24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/008/configfile.txr b/tests/008/configfile.txr
new file mode 100644
index 00000000..257fdc07
--- /dev/null
+++ b/tests/008/configfile.txr
@@ -0,0 +1,24 @@
+@(collect)
+@ (cases)
+#@/.*/
+@ (or)
+;@/.*/
+@ (or)
+@{IDENT /[A-Z_][A-Z_0-9]+/}@/ */
+@(bind VAL ("true"))
+@ (or)
+@{IDENT /[A-Z_][A-Z_0-9]+/}@(coll)@/ */@{VAL /[^,]+/}@/ */@(end)
+@ (or)
+@{IDENT /[A-Z_][A-Z_0-9]+/}@(coll)@/ */@{VAL /[^, ]+/}@/,? */@(end)
+@(flatten VAL)
+@ (or)
+@/ */
+@ (or)
+@ (throw error "bad configuration syntax")
+@ (end)
+@(end)
+@(output)
+@ (repeat)
+@IDENT = @(rep)@VAL, @(first){ @VAL, @(last)@VAL };@(single)@VAL;@(end)
+@ (end)
+@(end)