summaryrefslogtreecommitdiff
path: root/language/l2.ott
diff options
context:
space:
mode:
Diffstat (limited to 'language/l2.ott')
-rw-r--r--language/l2.ott9
1 files changed, 5 insertions, 4 deletions
diff --git a/language/l2.ott b/language/l2.ott
index b760ca75..8cbacf0d 100644
--- a/language/l2.ott
+++ b/language/l2.ott
@@ -545,10 +545,11 @@ exp :: 'E_' ::=
| if exp1 then exp2 :: S :: ifnoelse {{ ichlo [[ if exp1 then exp2 else ( ) ]] }}
- | foreach id from exp1 to exp2 by exp3 exp4 :: :: for {{ com loop }}
- | foreach id from exp1 to exp2 exp3 :: S :: forbyone {{ ichlo [[ foreach id from exp1 to exp2 by 1 exp4 ]] }}
- | foreach id from exp1 downto exp2 by exp3 exp4 :: S :: fordown {{ ichlo [[ foreach id from exp1 to exp2 by ( - exp3 ) exp4 ]] }}
- | foreach id from exp1 downto exp2 exp3 :: S :: fordownbyone {{ ichlo [[ foreach id from exp1 downto exp2 by 1 exp4 ]] }}
+ | foreach ( id from exp1 to exp2 by exp3 in order ) exp4 :: :: for {{ com loop }}
+ | foreach ( id from exp1 to exp2 by exp3 ) exp4 :: S :: forup {{ ichlo [[ foreach id from exp1 to exp2 by exp3 in inc exp4 ]] }}
+ | foreach ( id from exp1 to exp2 ) exp3 :: S :: forupbyone {{ ichlo [[ foreach id from exp1 to exp2 by 1 in inc exp4 ]] }}
+ | foreach ( id from exp1 downto exp2 by exp3 ) exp4 :: S :: fordown {{ ichlo [[ foreach id from exp1 to exp2 by exp3 in dec exp4 ]] }}
+ | foreach ( id from exp1 downto exp2 ) exp3 :: S :: fordownbyone {{ ichlo [[ foreach id from exp1 downto exp2 by 1 in dec exp4 ]] }}
% vectors
| [ exp1 , ... , expn ] :: :: vector {{ com vector (indexed from 0) }}