diff options
author | Adrian Thurston <thurston@complang.org> | 2013-03-19 23:08:21 +0000 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2013-03-19 23:08:21 +0000 |
commit | 391530abf5e11d2327c15f09f728517ff6a7715a (patch) | |
tree | 9f8c28c7168dda2c302b47e07f85a30c58703447 /test/forloop3.lm | |
parent | 59055f0b3a9060ea30496212ea856b8beaeaa0aa (diff) | |
download | colm-391530abf5e11d2327c15f09f728517ff6a7715a.tar.gz |
implemented {} scope blocks and iter_call, testing with for loops
Diffstat (limited to 'test/forloop3.lm')
-rw-r--r-- | test/forloop3.lm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/forloop3.lm b/test/forloop3.lm new file mode 100644 index 00000000..e1a1fa3e --- /dev/null +++ b/test/forloop3.lm @@ -0,0 +1,21 @@ +##### LM ##### +lex + token id / 'a' .. 'z' / + ignore / '\n' | '\t' | ' ' / +end + +def start + [id*] + +parse P: start[stdin] +Start: start = P.tree +for Id: id in triter(Start) { + print( Id ) + print( '\n' ) +} +##### IN ##### +d e f +##### EXP ##### +d +e +f |