Moreover, add short programs (say about 10) each of them in the order of 10 lines and generating a syntax error (not semantic error).
MyCat: Category == add {
foo: Integer -> %;
}
MyDom: MyCat == with {
attrib(n: Integer);
foo(n: Integer): % == attrib(n);
}
main(): () == {
}
main();
Observe that the following is a valid ALLCOT program (but semantically incorrect).
MyCat: Category == with {
foo: Integer -> %;
}
MyCat: Integer == Boolean add {
attrib(b: Boolean);
bar(p: Program): Compiler == compiler(p);
ooops(p: Program): Error == crash(p);
}
main(): () == {
Boolean: String := MyCat;
}
main();