diff options
Diffstat (limited to 'test/forloop1.lm')
-rw-r--r-- | test/forloop1.lm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/forloop1.lm b/test/forloop1.lm new file mode 100644 index 0000000..31e37fd --- /dev/null +++ b/test/forloop1.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 Start + print( ^Id '\n' ) +##### IN ##### +a b c +##### EXP ##### +a +b +c |