2 // driver.cs: The compiler command line driver.
4 // Author: Miguel de Icaza (miguel@gnu.org)
6 // Licensed under the terms of the GNU GPL
8 // (C) 2001, 2002, 2003 Ximian, Inc (http://www.ximian.com)
14 using System.Reflection;
15 using System.Reflection.Emit;
16 using System.Collections;
19 using System.Globalization;
22 Library, Exe, Module, WinExe
26 /// The compiler driver.
32 // Assemblies references to be linked. Initialized with
34 static ArrayList references;
37 // If any of these fail, we ignore the problem. This is so
38 // that we can list all the assemblies in Windows and not fail
39 // if they are missing on Linux.
41 static ArrayList soft_references;
44 static ArrayList link_paths;
46 // Whether we want Yacc to output its progress
47 static bool yacc_verbose = false;
49 // Whether we want to only run the tokenizer
50 static bool tokenize = false;
52 static string first_source;
54 static Target target = Target.Exe;
55 static string target_ext = ".exe";
57 static bool want_debugging_support = false;
59 static bool parse_only = false;
60 static bool timestamps = false;
61 static bool pause = false;
62 static bool show_counters = false;
63 public static bool parser_verbose = false;
66 // Whether to load the initial config file (what CSC.RSP has by default)
68 static bool load_default_config = true;
70 static Hashtable response_file_list;
73 // A list of resource files
75 static ArrayList resources;
76 static ArrayList embedded_resources;
79 // An array of the defines from the command line
81 static ArrayList defines;
86 static string output_file = null;
89 // Last time we took the time
91 static DateTime last_time, first_time;
94 // Encoding: ISO-Latin1 is 28591
96 static Encoding encoding;
99 // Whether the user has specified a different encoder manually
101 static bool using_default_encoder = true;
103 public static void ShowTime (string msg)
108 DateTime now = DateTime.Now;
109 TimeSpan span = now - last_time;
113 "[{0:00}:{1:000}] {2}",
114 (int) span.TotalSeconds, span.Milliseconds, msg);
117 public static void ShowTotalTime (string msg)
122 DateTime now = DateTime.Now;
123 TimeSpan span = now - first_time;
127 "[{0:00}:{1:000}] {2}",
128 (int) span.TotalSeconds, span.Milliseconds, msg);
131 static void tokenize_file (SourceFile file)
136 input = File.OpenRead (file.Name);
138 Report.Error (2001, "Source file '" + file.Name + "' could not be opened");
143 SeekableStreamReader reader = new SeekableStreamReader (input, encoding, using_default_encoder);
144 Tokenizer lexer = new Tokenizer (reader, file, defines);
145 int token, tokens = 0, errors = 0;
147 while ((token = lexer.token ()) != Token.EOF){
148 Location l = lexer.Location;
150 if (token == Token.ERROR)
153 Console.WriteLine ("Tokenized: " + tokens + " found " + errors + " errors");
159 // MonoTODO("Change error code for aborted compilation to something reasonable")]
160 static void parse (SourceFile file)
166 input = File.OpenRead (file.Name);
168 Report.Error (2001, "Source file '" + file.Name + "' could not be opened");
172 SeekableStreamReader reader = new SeekableStreamReader (input, encoding, using_default_encoder);
174 parser = new CSharpParser (reader, file, defines);
175 parser.yacc_verbose_flag = yacc_verbose;
178 } catch (Exception ex) {
179 Report.Error(666, "Compilation aborted: " + ex);
188 "Mono C# compiler, (C) 2001 - 2003 Ximian, Inc.\n" +
189 "mcs [options] source-files\n" +
190 " --about About the Mono C# compiler\n" +
191 " -checked[+|-] Set default context to checked\n" +
192 " -codepage:ID Sets code page to the one in ID\n" +
193 " (number, `utf8' or `reset')\n" +
194 " -define:S1[;S2] Defines one or more symbols (short: /d:)\n" +
195 " -debug[+-] Generate debugging information\n" +
196 " -doc:FILE XML Documentation file to generate\n" +
197 " -g Generate debugging information\n" +
198 " --fatal Makes errors fatal\n" +
199 " -lib:PATH1,PATH2 Adds the paths to the assembly link path\n" +
200 " -main:class Specified the class that contains the entry point\n" +
201 " -noconfig[+|-] Disables implicit references to assemblies\n" +
202 " -nostdlib[+|-] Does not load core libraries\n" +
203 " -nowarn:W1[,W2] Disables one or more warnings\n" +
204 " -out:FNAME Specifies output file\n" +
205 " --parse Only parses the source file\n" +
206 " --expect-error X Expect that error X will be encountered\n" +
207 " -recurse:SPEC Recursively compiles the files in SPEC ([dir]/file)\n" +
208 " -reference:ASS References the specified assembly (-r:ASS)\n" +
209 " --stacktrace Shows stack trace at error location\n" +
210 " -target:KIND Specifies the target (KIND is one of: exe, winexe,\n" +
211 " library, module), (short: /t:)\n" +
212 " --timestamp Displays time stamps of various compiler events\n" +
213 " -unsafe[+|-] Allows unsafe code\n" +
214 " -warnaserror[+|-] Treat warnings as errors\n" +
215 " -warn:LEVEL Sets warning level (the highest is 4, the default)\n" +
216 " -v Verbose parsing (for debugging the parser)\n" +
217 " -2 Enables experimental C# features\n" +
220 " -linkresource:FILE[,ID] Links FILE as a resource\n" +
221 " -resource:FILE[,ID] Embed FILE as a resource\n" +
222 " --mcs-debug X Sets MCS debugging level to X\n" +
223 " @file Read response file for more options\n\n" +
224 "Options can be of the form -option or /option");
227 static void TargetUsage ()
229 Report.Error (2019, "Valid options for -target: are exe, winexe, library or module");
235 "The Mono C# compiler is (C) 2001, 2002, 2003 Ximian, Inc.\n\n" +
236 "The compiler source code is released under the terms of the GNU GPL\n\n" +
238 "For more information on Mono, visit the project Web site\n" +
239 " http://www.go-mono.com\n\n" +
241 "The compiler was written by Miguel de Icaza, Ravi Pratap and Martin Baulig");
242 Environment.Exit (0);
245 public static int counter1, counter2;
247 public static int Main (string[] args)
249 RootContext.V2 = true;
250 bool ok = MainDriver (args);
252 if (ok && Report.Errors == 0) {
253 Console.Write("Compilation succeeded");
254 if (Report.Warnings > 0) {
255 Console.Write(" - {0} warning(s)", Report.Warnings);
259 Console.WriteLine ("Counter1: " + counter1);
260 Console.WriteLine ("Counter2: " + counter2);
266 Console.WriteLine("Compilation failed: {0} error(s), {1} warnings",
267 Report.Errors, Report.Warnings);
272 static public void LoadAssembly (string assembly, bool soft)
275 string total_log = "";
278 char[] path_chars = { '/', '\\', '.' };
280 if (assembly.IndexOfAny (path_chars) != -1) {
281 a = Assembly.LoadFrom (assembly);
283 a = Assembly.Load (assembly);
285 TypeManager.AddAssembly (a);
287 } catch (FileNotFoundException){
288 foreach (string dir in link_paths){
289 string full_path = Path.Combine (dir, assembly);
290 if (!assembly.EndsWith (".dll"))
294 a = Assembly.LoadFrom (full_path);
295 TypeManager.AddAssembly (a);
297 } catch (FileNotFoundException ff) {
298 total_log += ff.FusionLog;
303 Report.Error (6, "Cannot find assembly `" + assembly + "'" );
304 Console.WriteLine ("Log: \n" + total_log);
306 } catch (BadImageFormatException f) {
307 Report.Error(6, "Cannot load assembly (bad file format)" + f.FusionLog);
308 } catch (FileLoadException f){
309 Report.Error(6, "Cannot load assembly " + f.FusionLog);
310 } catch (ArgumentNullException){
311 Report.Error(6, "Cannot load assembly (null argument)");
316 /// Loads all assemblies referenced on the command line
318 static public void LoadReferences ()
320 foreach (string r in references)
321 LoadAssembly (r, false);
323 foreach (string r in soft_references)
324 LoadAssembly (r, true);
329 static void SetupDefaultDefines ()
331 defines = new ArrayList ();
332 defines.Add ("__MonoCS__");
335 static string [] LoadArgs (string file)
338 ArrayList args = new ArrayList ();
341 f = new StreamReader (file);
346 StringBuilder sb = new StringBuilder ();
348 while ((line = f.ReadLine ()) != null){
351 for (int i = 0; i < t; i++){
354 if (c == '"' || c == '\''){
357 for (i++; i < t; i++){
364 } else if (c == ' '){
366 args.Add (sb.ToString ());
373 args.Add (sb.ToString ());
378 string [] ret_value = new string [args.Count];
379 args.CopyTo (ret_value, 0);
385 // Returns the directory where the system assemblies are installed
387 static string GetSystemDir ()
389 Assembly [] assemblies = AppDomain.CurrentDomain.GetAssemblies ();
391 foreach (Assembly a in assemblies){
392 string codebase = a.Location;
393 if (codebase.EndsWith ("corlib.dll")){
394 return codebase.Substring (0, codebase.LastIndexOf (System.IO.Path.DirectorySeparatorChar));
398 Report.Error (-15, "Can not compute my system path");
403 // Given a path specification, splits the path from the file/pattern
405 static void SplitPathAndPattern (string spec, out string path, out string pattern)
407 int p = spec.LastIndexOf ("/");
410 // Windows does not like /file.cs, switch that to:
415 pattern = spec.Substring (1);
417 path = spec.Substring (0, p);
418 pattern = spec.Substring (p + 1);
423 p = spec.LastIndexOf ("\\");
425 path = spec.Substring (0, p);
426 pattern = spec.Substring (p + 1);
434 static void ProcessFile (string f)
436 if (first_source == null)
439 Location.AddFile (f);
442 static void ProcessFiles ()
444 Location.Initialize ();
446 foreach (SourceFile file in Location.SourceFiles) {
448 tokenize_file (file);
455 static void CompileFiles (string spec, bool recurse)
457 string path, pattern;
459 SplitPathAndPattern (spec, out path, out pattern);
460 if (pattern.IndexOf ("*") == -1){
465 string [] files = null;
467 files = Directory.GetFiles (path, pattern);
468 } catch (System.IO.DirectoryNotFoundException) {
469 Report.Error (2001, "Source file `" + spec + "' could not be found");
471 } catch (System.IO.IOException){
472 Report.Error (2001, "Source file `" + spec + "' could not be found");
475 foreach (string f in files) {
482 string [] dirs = null;
485 dirs = Directory.GetDirectories (path);
489 foreach (string d in dirs) {
491 // Don't include path in this string, as each
492 // directory entry already does
493 CompileFiles (d + "/" + pattern, true);
497 static void DefineDefaultConfig ()
500 // For now the "default config" is harcoded into the compiler
501 // we can move this outside later
503 string [] default_config = {
508 // Is it worth pre-loading all this stuff?
511 "System.Configuration.Install",
514 "System.DirectoryServices",
515 "System.Drawing.Design",
517 "System.EnterpriseServices",
520 "System.Runtime.Remoting",
521 "System.Runtime.Serialization.Formatters.Soap",
523 "System.ServiceProcess",
525 "System.Web.RegularExpressions",
526 "System.Web.Services",
527 "System.Windows.Forms"
532 foreach (string def in default_config)
533 soft_references.Insert (p++, def);
536 static void SetOutputFile (string name)
541 static void SetWarningLevel (string s)
546 level = Int32.Parse (s);
550 "--wlevel requires an value from 0 to 4");
551 Environment.Exit (1);
553 if (level < 0 || level > 4){
554 Report.Error (1900, "Warning level must be 0 to 4");
555 Environment.Exit (1);
557 RootContext.WarningLevel = level;
560 static void SetupV2 ()
562 RootContext.V2 = true;
563 defines.Add ("__V2__");
566 static void Version ()
568 string version = Assembly.GetExecutingAssembly ().GetName ().Version.ToString ();
569 Console.WriteLine ("Mono C# compiler version {0}", version);
570 Environment.Exit (0);
574 // Currently handles the Unix-like command line options, but will be
575 // deprecated in favor of the CSCParseOption, which will also handle the
576 // options that start with a dash in the future.
578 static bool UnixParseOption (string arg, ref string [] args, ref int i)
582 parser_verbose = true;
597 case "--main": case "-m":
598 if ((i + 1) >= args.Length){
600 Environment.Exit (1);
602 RootContext.MainClass = args [++i];
606 RootContext.Unsafe = true;
609 case "/?": case "/h": case "/help":
612 Environment.Exit (0);
616 if ((i + 1) >= args.Length){
618 Environment.Exit (1);
620 defines.Add (args [++i]);
623 case "--show-counters":
624 show_counters = true;
627 case "--expect-error": {
632 args [++i], NumberStyles.AllowLeadingSign);
633 Report.ExpectedError = code;
635 Report.Error (-14, "Invalid number specified");
646 if ((i + 1) >= args.Length){
648 Environment.Exit (1);
650 SetOutputFile (args [++i]);
654 RootContext.Checked = true;
658 Report.Stacktrace = true;
661 case "--linkresource":
663 if ((i + 1) >= args.Length){
665 Report.Error (5, "Missing argument to --linkres");
666 Environment.Exit (1);
668 if (resources == null)
669 resources = new ArrayList ();
671 resources.Add (args [++i]);
676 if ((i + 1) >= args.Length){
678 Report.Error (5, "Missing argument to --resource");
679 Environment.Exit (1);
681 if (embedded_resources == null)
682 embedded_resources = new ArrayList ();
684 embedded_resources.Add (args [++i]);
688 if ((i + 1) >= args.Length){
689 Environment.Exit (1);
693 string type = args [++i];
696 target = Target.Library;
705 target = Target.WinExe;
709 target = Target.Module;
714 Environment.Exit (1);
720 if ((i + 1) >= args.Length){
722 Environment.Exit (1);
725 references.Add (args [++i]);
729 if ((i + 1) >= args.Length){
731 Environment.Exit (1);
733 link_paths.Add (args [++i]);
737 RootContext.StdLib = false;
745 Report.WarningsAreErrors = true;
749 if ((i + 1) >= args.Length){
751 Environment.Exit (1);
756 warn = Int32.Parse (args [++i]);
759 Environment.Exit (1);
761 Report.SetIgnoreWarning (warn);
765 if ((i + 1) >= args.Length){
768 "--wlevel requires an value from 0 to 4");
769 Environment.Exit (1);
772 SetWarningLevel (args [++i]);
776 if ((i + 1) >= args.Length){
777 Report.Error (5, "--mcs-debug requires an argument");
778 Environment.Exit (1);
782 Report.DebugFlags = Int32.Parse (args [++i]);
784 Report.Error (5, "Invalid argument to --mcs-debug");
785 Environment.Exit (1);
794 if ((i + 1) >= args.Length){
795 Report.Error (5, "--recurse requires an argument");
796 Environment.Exit (1);
798 CompileFiles (args [++i], true);
803 last_time = first_time = DateTime.Now;
810 case "--debug": case "-g":
811 want_debugging_support = true;
815 load_default_config = false;
823 // Currently it is very basic option parsing, but eventually, this will
824 // be the complete option parser
826 static bool CSCParseOption (string option, ref string [] args, ref int i)
828 int idx = option.IndexOf (":");
835 arg = option.Substring (0, idx);
837 value = option.Substring (idx + 1);
852 target = Target.WinExe;
856 target = Target.Library;
861 target = Target.Module;
862 target_ext = ".netmodule";
867 Environment.Exit (1);
875 Environment.Exit (1);
877 SetOutputFile (value);
884 case "/incremental+":
885 case "/incremental-":
895 Environment.Exit (1);
898 defs = value.Split (new Char [] {';', ','});
899 foreach (string d in defs){
906 case "/linkresource":
908 Report.Error (5, arg + " requires an argument");
909 Environment.Exit (1);
911 if (resources == null)
912 resources = new ArrayList ();
914 resources.Add (value);
920 Report.Error (5, arg + " requires an argument");
921 Environment.Exit (1);
923 if (embedded_resources == null)
924 embedded_resources = new ArrayList ();
926 embedded_resources.Add (value);
931 Report.Error (5, "/recurse requires an argument");
932 Environment.Exit (1);
934 CompileFiles (value, true);
940 Report.Error (5, arg + " requires an argument");
941 Environment.Exit (1);
944 string [] refs = value.Split (new char [] { ';', ',' });
945 foreach (string r in refs){
952 Report.Error (5, arg + " requires an argument");
953 Environment.Exit (1);
955 // TODO handle the /doc argument to generate xml doc
962 Report.Error (5, "/lib requires an argument");
963 Environment.Exit (1);
966 libdirs = value.Split (new Char [] { ',' });
967 foreach (string dir in libdirs)
968 link_paths.Add (dir);
974 want_debugging_support = true;
979 RootContext.Checked = true;
983 RootContext.Checked = false;
988 RootContext.Unsafe = true;
992 RootContext.Unsafe = false;
996 case "/warnaserror+":
997 Report.WarningsAreErrors = true;
1000 case "/warnaserror-":
1001 Report.WarningsAreErrors = false;
1005 SetWarningLevel (value);
1012 Report.Error (5, "/nowarn requires an argument");
1013 Environment.Exit (1);
1016 warns = value.Split (new Char [] {','});
1017 foreach (string wc in warns){
1021 warn = Int32.Parse (wc);
1024 Environment.Exit (1);
1026 Report.SetIgnoreWarning (warn);
1032 load_default_config = true;
1037 load_default_config = false;
1043 Environment.Exit (0);
1049 Report.Error (5, arg + " requires an argument");
1050 Environment.Exit (1);
1052 RootContext.MainClass = value;
1057 RootContext.StdLib = false;
1061 RootContext.StdLib = true;
1068 Report.Error (5, "/win32icon is currently not supported");
1079 if (value == "utf8"){
1080 encoding = new UTF8Encoding();
1081 using_default_encoder = false;
1084 if (value == "reset"){
1086 // 28591 is the code page for ISO-8859-1 encoding.
1089 using_default_encoder = true;
1093 cp = Int32.Parse (value);
1097 Console.WriteLine ("Invalid code-page requested");
1102 encoding = Encoding.GetEncoding (cp);
1103 using_default_encoder = false;
1105 Console.WriteLine ("Code page: {0} not supported", cp);
1114 /// Parses the arguments, and drives the compilation
1119 /// TODO: Mostly structured to debug the compiler
1120 /// now, needs to be turned into a real driver soon.
1122 // [MonoTODO("Change error code for unknown argument to something reasonable")]
1123 static bool MainDriver (string [] args)
1126 bool parsing_options = true;
1128 Console.WriteLine ("Mono C# Compiler {0} for Generics",
1129 Assembly.GetExecutingAssembly ().GetName ().Version.ToString ());
1131 encoding = Encoding.GetEncoding (28591);
1133 Console.WriteLine ("Error: could not load encoding 28591, trying 1252");
1134 encoding = Encoding.GetEncoding (1252);
1137 references = new ArrayList ();
1138 soft_references = new ArrayList ();
1139 link_paths = new ArrayList ();
1141 SetupDefaultDefines ();
1146 // This is not required because Assembly.Load knows about this
1150 int argc = args.Length;
1151 for (i = 0; i < argc; i++){
1152 string arg = args [i];
1154 if (arg.StartsWith ("@")){
1155 string [] new_args, extra_args;
1156 string response_file = arg.Substring (1);
1158 if (response_file_list == null)
1159 response_file_list = new Hashtable ();
1161 if (response_file_list.Contains (response_file)){
1163 1515, "Response file `" + response_file +
1164 "' specified multiple times");
1165 Environment.Exit (1);
1168 response_file_list.Add (response_file, response_file);
1170 extra_args = LoadArgs (response_file);
1171 if (extra_args == null){
1172 Report.Error (2011, "Unable to open response file: " +
1177 new_args = new string [extra_args.Length + argc];
1178 args.CopyTo (new_args, 0);
1179 extra_args.CopyTo (new_args, argc);
1181 argc = new_args.Length;
1185 if (parsing_options){
1187 parsing_options = false;
1191 if (arg.StartsWith ("-")){
1192 if (UnixParseOption (arg, ref args, ref i))
1196 string csc_opt = "/" + arg.Substring (1);
1197 if (CSCParseOption (csc_opt, ref args, ref i))
1200 if (arg.StartsWith ("/")){
1201 if (CSCParseOption (arg, ref args, ref i))
1207 CompileFiles (arg, false);
1215 if (first_source == null){
1216 Report.Error (2008, "No files to compile were specified");
1220 if (Report.Errors > 0)
1227 // Load Core Library for default compilation
1229 if (RootContext.StdLib)
1230 references.Insert (0, "mscorlib");
1232 if (load_default_config)
1233 DefineDefaultConfig ();
1235 if (Report.Errors > 0){
1240 // Load assemblies required
1243 ShowTime ("Loading references");
1244 link_paths.Add (GetSystemDir ());
1248 ShowTime (" References loaded");
1250 if (Report.Errors > 0){
1257 if (output_file == null){
1258 int pos = first_source.LastIndexOf (".");
1261 output_file = first_source.Substring (0, pos) + target_ext;
1263 output_file = first_source + target_ext;
1266 CodeGen.Init (output_file, output_file, want_debugging_support);
1268 TypeManager.AddModule (CodeGen.ModuleBuilder);
1270 DateTime start = DateTime.Now;
1271 TypeManager.ComputeNamespaces ();
1272 DateTime end = DateTime.Now;
1275 // Before emitting, we need to get the core
1276 // types emitted from the user defined types
1277 // or from the system ones.
1280 ShowTime ("Initializing Core Types");
1281 if (!RootContext.StdLib){
1282 RootContext.ResolveCore ();
1283 if (Report.Errors > 0)
1287 TypeManager.InitCoreTypes ();
1289 ShowTime (" Core Types done");
1292 // The second pass of the compiler
1295 ShowTime ("Resolving tree");
1296 RootContext.ResolveTree ();
1297 if (Report.Errors > 0)
1300 ShowTime ("Populate tree");
1301 if (!RootContext.StdLib)
1302 RootContext.BootCorlib_PopulateCoreTypes ();
1303 RootContext.PopulateTypes ();
1304 RootContext.DefineTypes ();
1306 TypeManager.InitCodeHelpers ();
1309 // Verify using aliases now
1311 Namespace.VerifyUsing ();
1313 if (Report.Errors > 0){
1318 // The code generator
1321 ShowTime ("Emitting code");
1322 ShowTotalTime ("Total so far");
1323 RootContext.EmitCode ();
1327 if (Report.Errors > 0){
1332 ShowTime ("Closing types");
1334 RootContext.CloseTypes ();
1336 PEFileKinds k = PEFileKinds.ConsoleApplication;
1338 if (target == Target.Library || target == Target.Module){
1339 k = PEFileKinds.Dll;
1341 if (RootContext.MainClass != null)
1342 Report.Error (2017, "Can not specify -main: when building module or library");
1343 } else if (target == Target.Exe)
1344 k = PEFileKinds.ConsoleApplication;
1345 else if (target == Target.WinExe)
1346 k = PEFileKinds.WindowApplication;
1348 if (target == Target.Exe || target == Target.WinExe){
1349 MethodInfo ep = RootContext.EntryPoint;
1352 if (Report.Errors == 0)
1353 Report.Error (5001, "Program " + output_file +
1354 " does not have an entry point defined");
1358 CodeGen.AssemblyBuilder.SetEntryPoint (ep, k);
1362 // Add the resources
1364 if (resources != null){
1365 foreach (string spec in resources){
1369 cp = spec.IndexOf (',');
1371 file = spec.Substring (0, cp);
1372 res = spec.Substring (cp + 1);
1376 CodeGen.AssemblyBuilder.AddResourceFile (res, file);
1380 if (embedded_resources != null){
1381 object[] margs = new object [2];
1382 Type[] argst = new Type [2];
1383 argst [0] = argst [1] = typeof (string);
1384 MethodInfo embed_res = typeof (AssemblyBuilder).GetMethod ("EmbedResourceFile", argst);
1385 if (embed_res == null) {
1386 Report.Warning (0, new Location (-1), "Cannot embed resources on this runtime: try the Mono runtime instead.");
1388 foreach (string spec in embedded_resources) {
1391 cp = spec.IndexOf (',');
1393 margs [0] = spec.Substring (cp + 1);
1394 margs [1] = spec.Substring (0, cp);
1396 margs [0] = margs [1] = spec;
1398 if (File.Exists ((string) margs [1]))
1399 embed_res.Invoke (CodeGen.AssemblyBuilder, margs);
1401 Report.Error (1566, "Can not find the resource " + margs [1]);
1407 if (Report.Errors > 0)
1410 CodeGen.Save (output_file);
1412 ShowTime ("Saved output");
1413 ShowTotalTime ("Total");
1416 Timer.ShowTimers ();
1418 if (Report.ExpectedError != 0){
1419 Console.WriteLine("Failed to report expected error " + Report.ExpectedError);
1420 Environment.Exit (1);
1425 Console.WriteLine ("Size of strings held: " + DeclSpace.length);
1426 Console.WriteLine ("Size of strings short: " + DeclSpace.small);
1428 return (Report.Errors == 0);