More testcases

This commit is contained in:
Adam Sampson 2007-04-26 16:06:45 +00:00
parent 939205670b
commit 63a39f5a27
5 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,5 @@
PROC P ()
VAL []BYTE s IS "hello *
not a star":
SKIP
:

View File

@ -0,0 +1,2 @@
PROC P ()
VAL []BYTE s IS "hello *

View File

@ -0,0 +1,31 @@
-- Comment here
PROC P () -- more commentry
INT x:
INT y:
VAL []BYTE s IS "hello, world!":
VAL []BYTE not.comment IS "string -- with dashes -- here!":
VAL []BYTE one.cont IS "one string cont line *
*continued here.":
VAL []BYTE two.cont IS "two string cont lines *
*continued here... *
*and also here!":
SEQ
x := 42 --comment!
y := x + 22
y := x +
22
y :=
x
x,
y :=
y,
x
IF
(x =
2) AND
(y =
42)
STOP
TRUE
SKIP
:

View File

@ -0,0 +1,7 @@
PROC P ()
VAL [2][2]INT is IS
[[1, 2],
[3, 4]]:
INT x:
x := is[1][1]
:

View File

@ -0,0 +1,14 @@
VAL INT table.x IS 36:
VAL INT table.y IS 14:
VAL []INT forks.x IS [2, 3, 8, 9, 5]:
VAL []INT forks.y IS [3, 1, 1, 3, 4]:
VAL []INT phils.x IS [-2, -2, 4, 12, 9]:
VAL []INT phils.y IS [4, -1, -3, 1, 5]:
PROC main ()
INT x:
SEQ
x := table.x
x := forks.x[0] + forks.y[0]
x := phils.x[0] + phils.y[0]
: