summaryrefslogtreecommitdiff
path: root/test/forloop2.lm
diff options
context:
space:
mode:
Diffstat (limited to 'test/forloop2.lm')
-rw-r--r--test/forloop2.lm19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/forloop2.lm b/test/forloop2.lm
new file mode 100644
index 0000000..7d54f8a
--- /dev/null
+++ b/test/forloop2.lm
@@ -0,0 +1,19 @@
+##### LM #####
+lex
+ token id / 'a' .. 'z' /
+ ignore / '\n' | '\t' | ' ' /
+end
+
+def start
+ [id*]
+
+parse P: start[stdin]
+Start: start = P
+for Id: id in triter(Start)
+ print( ^Id '\n' )
+##### IN #####
+d e f
+##### EXP #####
+d
+e
+f