The main class of a compiler generated with Coco/R has to be provided by the user. It
has to create a scanner and a parser object, initiate parsing and possibly report the
number of errors detected. In its simplest form it can look like this:
public class Compiler {
public static void Main(string[] arg) {
Scanner scanner = new Scanner(arg[0]);
Parser parser = new Parser(scanner);
parser.Parse();
Console.WriteLine(parser.errors.count + " errors detected");
}
}