1 % Test for presentiation language parsing, some edge cases with cascading
2 % store terms. Intended to put this part of the parser "through the ringer,"
5 % COMMAND-LINE: --incremental
15 x, y : ARRAY INT OF ARRAY INT OF ARRAY INT OF INT;
17 % multidimensional arrays
18 ASSERT x[0][0][0] = 0; %% select
19 ASSERT y = x WITH [0][0][1] := 1; %% partial store
23 % mixed stores: records of arrays of tuples, oh my
24 z : [# x:ARRAY INT OF [# x:INT #], y:[ARRAY INT OF INT, ARRAY INT OF INT] #];
26 arr1 : ARRAY INT OF [# x:INT #];
27 arr2 : [ ARRAY INT OF INT, ARRAY INT OF INT ];
34 ASSERT (# x:=arr1, y:=arr2 #) = z;
38 ASSERT z.x[0].x /= z.y.0[5];
42 ASSERT z.y.0[1] = z.x[5].x;
46 ASSERT z.y.0[5] = z.x[-2].x;
52 a : ARRAY INT OF ARRAY INT OF INT;
55 % ambiguity in presentation language, comma needs to bind to innermost WITH
56 % causes type error if the [2]:=2 at the end is attached to the wrong WITH
57 ASSERT a = a WITH [0]:=b WITH [1]:=1,[2]:=2;