Implemented control constructs

This commit is contained in:
Dmitry Boulytchev 2018-03-20 20:30:58 +03:00
commit a60a491e73
23 changed files with 487 additions and 9 deletions

14
regression/test022.expr Normal file
View file

@ -0,0 +1,14 @@
read (n);
fib_1 := 1;
fib_2 := 1;
fib := 1;
for i := 2, i < n, i := i+1
do
fib := fib_1 + fib_2;
fib_2 := fib_1;
fib_1 := fib
od;
write (fib)