summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2010-01-20 14:57:06 +0000
committerAdrian Thurston <thurston@complang.org>2010-01-20 14:57:06 +0000
commitc1a6b3da29da2f661530cae1461682fcc7e91b6e (patch)
tree489fb5b2799596ad58aea85618809c965f9b0877 /test
parent84bbf8a2d3f8cba0b0be625e99864620a5858984 (diff)
downloadcolm-c1a6b3da29da2f661530cae1461682fcc7e91b6e.tar.gz
Disabled constructing of ignore tokens. Needs to be modified to use the new
method with the bit in flags to indicate chains of pre and post ignores are present.
Diffstat (limited to 'test')
-rw-r--r--test/construct1.exp6
-rw-r--r--test/construct1.lm16
-rwxr-xr-xtest/runtests2
3 files changed, 23 insertions, 1 deletions
diff --git a/test/construct1.exp b/test/construct1.exp
new file mode 100644
index 00000000..ef08a9b4
--- /dev/null
+++ b/test/construct1.exp
@@ -0,0 +1,6 @@
+<four_ids>
+ <id>a</id>
+ <id>b</id>
+ <id>c</id>
+ <id>d</id>
+</four_ids>
diff --git a/test/construct1.lm b/test/construct1.lm
new file mode 100644
index 00000000..f16cd48a
--- /dev/null
+++ b/test/construct1.lm
@@ -0,0 +1,16 @@
+rl ident_pattern /[a-zA-Z_][a-zA-Z_0-9]*/
+rl number_pattern /[0-9]+/
+
+lex start
+{
+ ignore /[ \t\n]+/
+ token id /ident_pattern/
+ token number /number_pattern/
+}
+
+def four_ids
+ [id id id id]
+
+four_ids Constructed = construct four_ids "a b c d"
+print_xml( Constructed )
+
diff --git a/test/runtests b/test/runtests
index bb919b43..502fe0c6 100755
--- a/test/runtests
+++ b/test/runtests
@@ -5,7 +5,7 @@ COLM="../colm/colm"
TESTS="
backtrack1.lm backtrack2.lm dns.lm accum.lm
mutualrec.lm argv1.lm argv2.lm exit.lm rubyhere.lm
- translate1.lm
+ translate1.lm construct1.lm
"
for t in $TESTS; do