Control statement (interpreter, SM, x86)

This commit is contained in:
Dmitry Boulytchev 2018-03-11 22:30:01 +03:00
parent 42d94672bc
commit 8758485b80
15 changed files with 132 additions and 55 deletions

View file

@ -1,4 +1,4 @@
TESTS=test001 test002 test003 test004 test005 test006 test007 test008
TESTS=test001 test002 test003 test004 test005 test006 test007 test008 test009 test010 test011
RC=../src/rc.opt

View file

@ -1 +1 @@
2
1024

View file

@ -1 +1 @@
1024
499950

View file

@ -1,3 +1 @@
5
5
3
2

View file

@ -1 +0,0 @@
499950

8
regression/test009.expr Normal file
View file

@ -0,0 +1,8 @@
n := 2;
k := 10;
res := 1;
while k > 0 do
res := res * n;
k := k - 1
od;
write(res)

0
regression/test009.input Normal file
View file

18
regression/test010.expr Normal file
View file

@ -0,0 +1,18 @@
i := 0;
s := 0;
while i < 100
do
j := 0;
while j < 100
do
s := s + j;
j := j + 1
od;
s := s + i;
i := i + 1
od;
write (s)

0
regression/test010.input Normal file
View file

5
regression/test011.expr Normal file
View file

@ -0,0 +1,5 @@
x:=0;
if x
then write(1)
else write(2)
fi

0
regression/test011.input Normal file
View file