m2data.in 677 Bytes
Newer Older
dcw's avatar
dcw committed
1
2
3
EXPORT {
TYPE
	string	= ARRAY [ 0..200 ] OF CHAR;
4
5
6
7
8
9
10
11
12
13
14
@@
PROCEDURE AppendIntList( a, b : IntList ) : IntList;
}

GLOBAL {

@@
PROCEDURE AppendIntList( a, b : IntList ) : IntList;

BEGIN
END AppendIntList;
dcw's avatar
dcw committed
15
16
17
}

TYPE {
dcw's avatar
dcw committed
18
19
20
21
22
23
First = A | B | C | D | E;
Second = A( int aa );
Third = A | B;
Fourth = A | B | C( int cc ) | D | E;
Fifth = A | B | C( int cc ) | D( string dd ) | E;
Sixth = A( int aa ) | B | C | D | E;
dcw's avatar
dcw committed
24

dcw's avatar
dcw committed
25
26
27
28
IntList = Null "null" | Cons( int first, IntList next ) 1 " , " 2;
ILList  = Null "null" | Cons( IntList first, ILList next ) "[ " 1 " ] , " 2;
IdTree  = Leaf( string id, IntList l ) "leaf( '" 1 "', [ " 2 " ] )"
	| Node( IdTree left, IdTree right ) "node( " 1 " , " 2 " )";
dcw's avatar
dcw committed
29
}