fix: use R-values but not only S-Expr
This commit is contained in:
parent
0fb6c19e34
commit
9346a85884
|
|
@ -228,9 +228,9 @@ S-Expr-if
|
|||
;
|
||||
|
||||
S-Expr-loop
|
||||
: LOOP S-Exprs { std::printf("Parsed S-Expr-loop -> LOOP S-Exprs\n"); }
|
||||
| LOOP FOR IDENTIFIER FROM S-Expr TO S-Expr DO S-Exprs { std::printf("Parsed S-Expr-loop -> LOOP FOR IDENTIFIER FROM S-Expr TO S-Expr DO S-Exprs\n"); }
|
||||
| DOTIMES LPAREN IDENTIFIER S-Expr RPAREN S-Exprs { std::printf("Parsed S-Expr-loop -> DOTIMES ( IDENTIFIER S-Expr ) S-Exprs\n"); }
|
||||
: LOOP S-Exprs { std::printf("Parsed S-Expr-loop -> LOOP S-Exprs\n"); }
|
||||
| LOOP FOR IDENTIFIER FROM R-Value TO R-Value DO S-Exprs { std::printf("Parsed S-Expr-loop -> LOOP FOR IDENTIFIER FROM R-Value TO R-Value DO S-Exprs\n"); }
|
||||
| DOTIMES LPAREN IDENTIFIER R-Value RPAREN S-Exprs { std::printf("Parsed S-Expr-loop -> DOTIMES LPAREN IDENTIFIER R-Value RPAREN S-Exprs\n"); }
|
||||
;
|
||||
|
||||
func-def
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
(print "Hello, world!") ; prints Hello, world!
|
||||
|
||||
(loop
|
||||
for i from 1 to 10
|
||||
for i from 1 to (+ 1505 -1495)
|
||||
do (print i)
|
||||
) ; prints 1 2 3 4 5 6 7 8 9 10
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue