Commit ddcce179 authored by dcw's avatar dcw

Null -> Nil; added BEGIN section

parent aea7d3ef
......@@ -6,6 +6,7 @@ PROCEDURE AppendIntList( a, b : IntList ) : IntList;
}
GLOBAL {
FROM BIO IMPORT PutLn;
@@
PROCEDURE AppendIntList( a, b : IntList ) : IntList;
......@@ -14,6 +15,10 @@ BEGIN
END AppendIntList;
}
BEGIN {
PutLn( "initialization of m2data complete!" );
}
TYPE {
First = A | B | C | D | E;
Second = A( int aa );
......@@ -22,8 +27,8 @@ 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;
IntList = Null "null" | Cons( int first, IntList next ) 1 " , " 2;
ILList = Null "null" | Cons( IntList first, ILList next ) "[ " 1 " ] , " 2;
IntList = Nil "nil" | Cons( int first, IntList next ) 1 " , " 2;
ILList = Nil "nil" | Cons( IntList first, ILList next ) "[ " 1 " ] , " 2;
IdTree = Leaf( string id, IntList l ) "leaf( '" 1 "', [ " 2 " ] )"
| Node( IdTree left, IdTree right ) "node( " 1 " , " 2 " )";
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment