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;
65 // Whether to load the initial config file (what CSC.RSP has by default)
67 static bool load_default_config = true;
69 static Hashtable response_file_list;
72 // A list of resource files
74 static ArrayList resources;
75 static ArrayList embedded_resources;
78 // An array of the defines from the command line
80 static ArrayList defines;
85 static string output_file = null;
88 // Last time we took the time
90 static DateTime last_time, first_time;
93 // Encoding: ISO-Latin1 is 28591
95 static Encoding encoding;
98 // Whether the user has specified a different encoder manually
100 static bool using_default_encoder = true;
102 public static void ShowTime (string msg)
107 DateTime now = DateTime.Now;
108 TimeSpan span = now - last_time;
112 "[{0:00}:{1:000}] {2}",
113 (int) span.TotalSeconds, span.Milliseconds, msg);
119 public static void ShowTotalTime (string msg)
124 DateTime now = DateTime.Now;
125 TimeSpan span = now - first_time;
129 "[{0:00}:{1:000}] {2}",
130 (int) span.TotalSeconds, span.Milliseconds, msg);
133 static void tokenize_file (SourceFile file)
138 input = File.OpenRead (file.Name);
140 Report.Error (2001, "Source file '" + file.Name + "' could not be opened");
145 StreamReader reader = new StreamReader (input, encoding, using_default_encoder);
146 Tokenizer lexer = new Tokenizer (reader, file, defines);
147 int token, tokens = 0, errors = 0;
149 while ((token = lexer.token ()) != Token.EOF){
150 Location l = lexer.Location;
152 if (token == Token.ERROR)
155 Console.WriteLine ("Tokenized: " + tokens + " found " + errors + " errors");
161 // MonoTODO("Change error code for aborted compilation to something reasonable")]
162 static void parse (SourceFile file)
168 input = File.OpenRead (file.Name);
170 Report.Error (2001, "Source file '" + file.Name + "' could not be opened");
174 StreamReader reader = new StreamReader (input, encoding, using_default_encoder);
176 parser = new CSharpParser (reader, file, defines);
177 parser.yacc_verbose_flag = yacc_verbose;
180 } catch (Exception ex) {
181 Report.Error(666, "Compilation aborted: " + ex);
190 "Mono C# compiler, (C) 2001 - 2003 Ximian, Inc.\n" +
191 "mcs [options] source-files\n" +
192 " --about About the Mono C# compiler\n" +
193 " -checked[+|-] Set default context to checked\n" +
194 " -codepage:ID Sets code page to the one in ID\n" +
195 " (number, `utf8' or `reset')\n" +
196 " -define:S1[;S2] Defines one or more symbols (short: /d:)\n" +
197 " -debug[+-] Generate debugging information\n" +
198 " -doc:FILE XML Documentation file to generate\n" +
199 " -g Generate debugging information\n" +
200 " --fatal Makes errors fatal\n" +
201 " -lib:PATH1,PATH2 Adds the paths to the assembly link path\n" +
202 " -main:class Specified the class that contains the entry point\n" +
203 " -noconfig[+|-] Disables implicit references to assemblies\n" +
204 " -nostdlib[+|-] Does not load core libraries\n" +
205 " -nowarn:W1[,W2] Disables one or more warnings\n" +
206 " -out:FNAME Specifies output file\n" +
207 " --parse Only parses the source file\n" +
208 " --expect-error X Expect that error X will be encountered\n" +
209 " -recurse:SPEC Recursively compiles the files in SPEC ([dir]/file)\n" +
210 " -reference:ASS References the specified assembly (-r:ASS)\n" +
211 " --stacktrace Shows stack trace at error location\n" +
212 " -target:KIND Specifies the target (KIND is one of: exe, winexe,\n" +
213 " library, module), (short: /t:)\n" +
214 " --timestamp Displays time stamps of various compiler events\n" +
215 " -unsafe[+|-] Allows unsafe code\n" +
216 " -warnaserror[+|-] Treat warnings as errors\n" +
217 " -warn:LEVEL Sets warning level (the highest is 4, the default)\n" +
218 " -v Verbose parsing (for debugging the parser)\n" +
221 " -linkresource:FILE[,ID] Links FILE as a resource\n" +
222 " -resource:FILE[,ID] Embed FILE as a resource\n" +
223 " --mcs-debug X Sets MCS debugging level to X\n" +
224 " @file Read response file for more options\n\n" +
225 "Options can be of the form -option or /option");
228 static void TargetUsage ()
230 Report.Error (2019, "Valid options for -target: are exe, winexe, library or module");
236 "The Mono C# compiler is (C) 2001, 2002, 2003 Ximian, Inc.\n\n" +
237 "The compiler source code is released under the terms of the GNU GPL\n\n" +
239 "For more information on Mono, visit the project Web site\n" +
240 " http://www.go-mono.com\n\n" +
242 "The compiler was written by Miguel de Icaza, Ravi Pratap and Martin Baulig");
243 Environment.Exit (0);
246 public static int counter1, counter2;
248 public static int Main (string[] args)
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);
264 Console.WriteLine("Compilation failed: {0} error(s), {1} warnings",
265 Report.Errors, Report.Warnings);
270 static public void LoadAssembly (string assembly, bool soft)
273 string total_log = "";
276 char[] path_chars = { '/', '\\', '.' };
278 if (assembly.IndexOfAny (path_chars) != -1) {
279 a = Assembly.LoadFrom (assembly);
281 a = Assembly.Load (assembly);
283 TypeManager.AddAssembly (a);
285 } catch (FileNotFoundException){
286 foreach (string dir in link_paths){
287 string full_path = Path.Combine (dir, assembly);
288 if (!assembly.EndsWith (".dll"))
292 a = Assembly.LoadFrom (full_path);
293 TypeManager.AddAssembly (a);
295 } catch (FileNotFoundException ff) {
296 total_log += ff.FusionLog;
301 Report.Error (6, "Cannot find assembly `" + assembly + "'" );
302 Console.WriteLine ("Log: \n" + total_log);
304 } catch (BadImageFormatException f) {
305 Report.Error(6, "Cannot load assembly (bad file format)" + f.FusionLog);
306 } catch (FileLoadException f){
307 Report.Error(6, "Cannot load assembly " + f.FusionLog);
308 } catch (ArgumentNullException){
309 Report.Error(6, "Cannot load assembly (null argument)");
314 /// Loads all assemblies referenced on the command line
316 static public void LoadReferences ()
318 foreach (string r in references)
319 LoadAssembly (r, false);
321 foreach (string r in soft_references)
322 LoadAssembly (r, true);
327 static void SetupDefaultDefines ()
329 defines = new ArrayList ();
330 defines.Add ("__MonoCS__");
333 static string [] LoadArgs (string file)
336 ArrayList args = new ArrayList ();
339 f = new StreamReader (file);
344 StringBuilder sb = new StringBuilder ();
346 while ((line = f.ReadLine ()) != null){
349 for (int i = 0; i < t; i++){
352 if (c == '"' || c == '\''){
355 for (i++; i < t; i++){
362 } else if (c == ' '){
364 args.Add (sb.ToString ());
371 args.Add (sb.ToString ());
376 string [] ret_value = new string [args.Count];
377 args.CopyTo (ret_value, 0);
383 // Returns the directory where the system assemblies are installed
385 static string GetSystemDir ()
387 Assembly [] assemblies = AppDomain.CurrentDomain.GetAssemblies ();
389 foreach (Assembly a in assemblies){
390 string codebase = a.Location;
391 if (codebase.EndsWith ("corlib.dll")){
392 return codebase.Substring (0, codebase.LastIndexOf (System.IO.Path.DirectorySeparatorChar));
396 Report.Error (-15, "Can not compute my system path");
401 // Given a path specification, splits the path from the file/pattern
403 static void SplitPathAndPattern (string spec, out string path, out string pattern)
405 int p = spec.LastIndexOf ("/");
408 // Windows does not like /file.cs, switch that to:
413 pattern = spec.Substring (1);
415 path = spec.Substring (0, p);
416 pattern = spec.Substring (p + 1);
421 p = spec.LastIndexOf ("\\");
423 path = spec.Substring (0, p);
424 pattern = spec.Substring (p + 1);
432 static void ProcessFile (string f)
434 if (first_source == null)
437 Location.AddFile (f);
440 static void ProcessFiles ()
442 Location.Initialize ();
444 foreach (SourceFile file in Location.SourceFiles) {
446 tokenize_file (file);
453 static void CompileFiles (string spec, bool recurse)
455 string path, pattern;
457 SplitPathAndPattern (spec, out path, out pattern);
458 if (pattern.IndexOf ("*") == -1){
463 string [] files = null;
465 files = Directory.GetFiles (path, pattern);
466 } catch (System.IO.DirectoryNotFoundException) {
467 Report.Error (2001, "Source file `" + spec + "' could not be found");
469 } catch (System.IO.IOException){
470 Report.Error (2001, "Source file `" + spec + "' could not be found");
473 foreach (string f in files) {
480 string [] dirs = null;
483 dirs = Directory.GetDirectories (path);
487 foreach (string d in dirs) {
489 // Don't include path in this string, as each
490 // directory entry already does
491 CompileFiles (d + "/" + pattern, true);
495 static void DefineDefaultConfig ()
498 // For now the "default config" is harcoded into the compiler
499 // we can move this outside later
501 string [] default_config = {
506 // Is it worth pre-loading all this stuff?
509 "System.Configuration.Install",
512 "System.DirectoryServices",
513 "System.Drawing.Design",
515 "System.EnterpriseServices",
518 "System.Runtime.Remoting",
519 "System.Runtime.Serialization.Formatters.Soap",
521 "System.ServiceProcess",
523 "System.Web.RegularExpressions",
524 "System.Web.Services",
525 "System.Windows.Forms"
530 foreach (string def in default_config)
531 soft_references.Insert (p++, def);
534 static void SetOutputFile (string name)
539 static void SetWarningLevel (string s)
544 level = Int32.Parse (s);
548 "--wlevel requires an value from 0 to 4");
549 Environment.Exit (1);
551 if (level < 0 || level > 4){
552 Report.Error (1900, "Warning level must be 0 to 4");
553 Environment.Exit (1);
555 RootContext.WarningLevel = level;
558 static void SetupV2 ()
560 RootContext.V2 = true;
561 defines.Add ("__V2__");
564 static void Version ()
566 string version = Assembly.GetExecutingAssembly ().GetName ().Version.ToString ();
567 Console.WriteLine ("Mono C# compiler version {0}", version);
568 Environment.Exit (0);
572 // Currently handles the Unix-like command line options, but will be
573 // deprecated in favor of the CSCParseOption, which will also handle the
574 // options that start with a dash in the future.
576 static bool UnixParseOption (string arg, ref string [] args, ref int i)
591 case "--main": case "-m":
592 if ((i + 1) >= args.Length){
594 Environment.Exit (1);
596 RootContext.MainClass = args [++i];
600 RootContext.Unsafe = true;
603 case "/?": case "/h": case "/help":
606 Environment.Exit (0);
610 if ((i + 1) >= args.Length){
612 Environment.Exit (1);
614 defines.Add (args [++i]);
617 case "--show-counters":
618 show_counters = true;
621 case "--expect-error": {
626 args [++i], NumberStyles.AllowLeadingSign);
627 Report.ExpectedError = code;
629 Report.Error (-14, "Invalid number specified");
640 if ((i + 1) >= args.Length){
642 Environment.Exit (1);
644 SetOutputFile (args [++i]);
648 RootContext.Checked = true;
652 Report.Stacktrace = true;
655 case "--linkresource":
657 if ((i + 1) >= args.Length){
659 Report.Error (5, "Missing argument to --linkres");
660 Environment.Exit (1);
662 if (resources == null)
663 resources = new ArrayList ();
665 resources.Add (args [++i]);
670 if ((i + 1) >= args.Length){
672 Report.Error (5, "Missing argument to --resource");
673 Environment.Exit (1);
675 if (embedded_resources == null)
676 embedded_resources = new ArrayList ();
678 embedded_resources.Add (args [++i]);
682 if ((i + 1) >= args.Length){
683 Environment.Exit (1);
687 string type = args [++i];
690 target = Target.Library;
699 target = Target.WinExe;
703 target = Target.Module;
708 Environment.Exit (1);
714 if ((i + 1) >= args.Length){
716 Environment.Exit (1);
719 references.Add (args [++i]);
723 if ((i + 1) >= args.Length){
725 Environment.Exit (1);
727 link_paths.Add (args [++i]);
731 RootContext.StdLib = false;
739 Report.WarningsAreErrors = true;
743 if ((i + 1) >= args.Length){
745 Environment.Exit (1);
750 warn = Int32.Parse (args [++i]);
753 Environment.Exit (1);
755 Report.SetIgnoreWarning (warn);
759 if ((i + 1) >= args.Length){
762 "--wlevel requires an value from 0 to 4");
763 Environment.Exit (1);
766 SetWarningLevel (args [++i]);
770 if ((i + 1) >= args.Length){
771 Report.Error (5, "--mcs-debug requires an argument");
772 Environment.Exit (1);
776 Report.DebugFlags = Int32.Parse (args [++i]);
778 Report.Error (5, "Invalid argument to --mcs-debug");
779 Environment.Exit (1);
788 if ((i + 1) >= args.Length){
789 Report.Error (5, "--recurse requires an argument");
790 Environment.Exit (1);
792 CompileFiles (args [++i], true);
797 last_time = first_time = DateTime.Now;
804 case "--debug": case "-g":
805 want_debugging_support = true;
809 load_default_config = false;
817 // Currently it is very basic option parsing, but eventually, this will
818 // be the complete option parser
820 static bool CSCParseOption (string option, ref string [] args, ref int i)
822 int idx = option.IndexOf (":");
829 arg = option.Substring (0, idx);
831 value = option.Substring (idx + 1);
846 target = Target.WinExe;
850 target = Target.Library;
855 target = Target.Module;
856 target_ext = ".netmodule";
861 Environment.Exit (1);
869 Environment.Exit (1);
871 SetOutputFile (value);
878 case "/incremental+":
879 case "/incremental-":
889 Environment.Exit (1);
892 defs = value.Split (new Char [] {';', ','});
893 foreach (string d in defs){
900 case "/linkresource":
902 Report.Error (5, arg + " requires an argument");
903 Environment.Exit (1);
905 if (resources == null)
906 resources = new ArrayList ();
908 resources.Add (value);
914 Report.Error (5, arg + " requires an argument");
915 Environment.Exit (1);
917 if (embedded_resources == null)
918 embedded_resources = new ArrayList ();
920 embedded_resources.Add (value);
925 Report.Error (5, "/recurse requires an argument");
926 Environment.Exit (1);
928 CompileFiles (value, true);
934 Report.Error (5, arg + " requires an argument");
935 Environment.Exit (1);
938 string [] refs = value.Split (new char [] { ';', ',' });
939 foreach (string r in refs){
946 Report.Error (5, arg + " requires an argument");
947 Environment.Exit (1);
949 // TODO handle the /doc argument to generate xml doc
956 Report.Error (5, "/lib requires an argument");
957 Environment.Exit (1);
960 libdirs = value.Split (new Char [] { ',' });
961 foreach (string dir in libdirs)
962 link_paths.Add (dir);
968 want_debugging_support = true;
973 RootContext.Checked = true;
977 RootContext.Checked = false;
982 RootContext.Unsafe = true;
986 RootContext.Unsafe = false;
990 case "/warnaserror+":
991 Report.WarningsAreErrors = true;
994 case "/warnaserror-":
995 Report.WarningsAreErrors = false;
999 SetWarningLevel (value);
1006 Report.Error (5, "/nowarn requires an argument");
1007 Environment.Exit (1);
1010 warns = value.Split (new Char [] {','});
1011 foreach (string wc in warns){
1015 warn = Int32.Parse (wc);
1018 Environment.Exit (1);
1020 Report.SetIgnoreWarning (warn);
1026 load_default_config = true;
1031 load_default_config = false;
1037 Environment.Exit (0);
1043 Report.Error (5, arg + " requires an argument");
1044 Environment.Exit (1);
1046 RootContext.MainClass = value;
1051 RootContext.StdLib = false;
1055 RootContext.StdLib = true;
1062 Report.Error (5, "/win32icon is currently not supported");
1072 if (value == "utf8"){
1073 encoding = new UTF8Encoding();
1074 using_default_encoder = false;
1077 if (value == "reset"){
1079 // 28591 is the code page for ISO-8859-1 encoding.
1082 using_default_encoder = true;
1086 cp = Int32.Parse (value);
1090 Console.WriteLine ("Invalid code-page requested");
1095 encoding = Encoding.GetEncoding (cp);
1096 using_default_encoder = false;
1098 Console.WriteLine ("Code page: {0} not supported", cp);
1107 /// Parses the arguments, and drives the compilation
1112 /// TODO: Mostly structured to debug the compiler
1113 /// now, needs to be turned into a real driver soon.
1115 // [MonoTODO("Change error code for unknown argument to something reasonable")]
1116 static bool MainDriver (string [] args)
1119 bool parsing_options = true;
1121 Console.WriteLine ("Mono C# Compiler {0} for Generics",
1122 Assembly.GetExecutingAssembly ().GetName ().Version.ToString ());
1124 encoding = Encoding.GetEncoding (28591);
1126 Console.WriteLine ("Error: could not load encoding 28591, trying 1252");
1127 encoding = Encoding.GetEncoding (1252);
1130 references = new ArrayList ();
1131 soft_references = new ArrayList ();
1132 link_paths = new ArrayList ();
1134 SetupDefaultDefines ();
1139 // This is not required because Assembly.Load knows about this
1143 int argc = args.Length;
1144 for (i = 0; i < argc; i++){
1145 string arg = args [i];
1147 if (arg.StartsWith ("@")){
1148 string [] new_args, extra_args;
1149 string response_file = arg.Substring (1);
1151 if (response_file_list == null)
1152 response_file_list = new Hashtable ();
1154 if (response_file_list.Contains (response_file)){
1156 1515, "Response file `" + response_file +
1157 "' specified multiple times");
1158 Environment.Exit (1);
1161 response_file_list.Add (response_file, response_file);
1163 extra_args = LoadArgs (response_file);
1164 if (extra_args == null){
1165 Report.Error (2011, "Unable to open response file: " +
1170 new_args = new string [extra_args.Length + argc];
1171 args.CopyTo (new_args, 0);
1172 extra_args.CopyTo (new_args, argc);
1174 argc = new_args.Length;
1178 if (parsing_options){
1180 parsing_options = false;
1184 if (arg.StartsWith ("-")){
1185 if (UnixParseOption (arg, ref args, ref i))
1189 string csc_opt = "/" + arg.Substring (1);
1190 if (CSCParseOption (csc_opt, ref args, ref i))
1193 if (arg.StartsWith ("/")){
1194 if (CSCParseOption (arg, ref args, ref i))
1200 CompileFiles (arg, false);
1208 if (first_source == null){
1209 Report.Error (2008, "No files to compile were specified");
1213 if (Report.Errors > 0)
1220 // Load Core Library for default compilation
1222 if (RootContext.StdLib)
1223 references.Insert (0, "mscorlib");
1225 if (load_default_config)
1226 DefineDefaultConfig ();
1228 if (Report.Errors > 0){
1233 // Load assemblies required
1236 ShowTime ("Loading references");
1237 link_paths.Add (GetSystemDir ());
1241 ShowTime (" References loaded");
1243 if (Report.Errors > 0){
1250 if (output_file == null){
1251 int pos = first_source.LastIndexOf (".");
1254 output_file = first_source.Substring (0, pos) + target_ext;
1256 output_file = first_source + target_ext;
1259 CodeGen.Init (output_file, output_file, want_debugging_support);
1261 TypeManager.AddModule (CodeGen.ModuleBuilder);
1263 DateTime start = DateTime.Now;
1264 TypeManager.ComputeNamespaces ();
1265 DateTime end = DateTime.Now;
1268 // Before emitting, we need to get the core
1269 // types emitted from the user defined types
1270 // or from the system ones.
1273 ShowTime ("Initializing Core Types");
1274 if (!RootContext.StdLib){
1275 RootContext.ResolveCore ();
1276 if (Report.Errors > 0)
1280 TypeManager.InitCoreTypes ();
1282 ShowTime (" Core Types done");
1285 // The second pass of the compiler
1288 ShowTime ("Resolving tree");
1289 RootContext.ResolveTree ();
1291 ShowTime ("Populate tree");
1292 if (!RootContext.StdLib)
1293 RootContext.BootCorlib_PopulateCoreTypes ();
1294 RootContext.PopulateTypes ();
1295 RootContext.DefineTypes ();
1297 TypeManager.InitCodeHelpers ();
1300 // Verify using aliases now
1302 Namespace.VerifyUsing ();
1304 if (Report.Errors > 0){
1309 // The code generator
1312 ShowTime ("Emitting code");
1313 ShowTotalTime ("Total so far");
1314 RootContext.EmitCode ();
1318 if (Report.Errors > 0){
1323 ShowTime ("Closing types");
1325 RootContext.CloseTypes ();
1327 PEFileKinds k = PEFileKinds.ConsoleApplication;
1329 if (target == Target.Library || target == Target.Module){
1330 k = PEFileKinds.Dll;
1332 if (RootContext.MainClass != null)
1333 Report.Error (2017, "Can not specify -main: when building module or library");
1334 } else if (target == Target.Exe)
1335 k = PEFileKinds.ConsoleApplication;
1336 else if (target == Target.WinExe)
1337 k = PEFileKinds.WindowApplication;
1339 if (target == Target.Exe || target == Target.WinExe){
1340 MethodInfo ep = RootContext.EntryPoint;
1343 if (Report.Errors == 0)
1344 Report.Error (5001, "Program " + output_file +
1345 " does not have an entry point defined");
1349 CodeGen.AssemblyBuilder.SetEntryPoint (ep, k);
1353 // Add the resources
1355 if (resources != null){
1356 foreach (string spec in resources){
1360 cp = spec.IndexOf (',');
1362 file = spec.Substring (0, cp);
1363 res = spec.Substring (cp + 1);
1367 CodeGen.AssemblyBuilder.AddResourceFile (res, file);
1371 if (embedded_resources != null){
1372 object[] margs = new object [2];
1373 Type[] argst = new Type [2];
1374 argst [0] = argst [1] = typeof (string);
1375 MethodInfo embed_res = typeof (AssemblyBuilder).GetMethod ("EmbedResourceFile", argst);
1376 if (embed_res == null) {
1377 Report.Warning (0, new Location (-1), "Cannot embed resources on this runtime: try the Mono runtime instead.");
1379 foreach (string spec in embedded_resources) {
1382 cp = spec.IndexOf (',');
1384 margs [0] = spec.Substring (cp + 1);
1385 margs [1] = spec.Substring (0, cp);
1387 margs [0] = margs [1] = spec;
1389 if (File.Exists ((string) margs [1]))
1390 embed_res.Invoke (CodeGen.AssemblyBuilder, margs);
1392 Report.Error (1566, "Can not find the resource " + margs [1]);
1398 if (Report.Errors > 0)
1401 CodeGen.Save (output_file);
1403 ShowTime ("Saved output");
1404 ShowTotalTime ("Total");
1407 Timer.ShowTimers ();
1409 if (Report.ExpectedError != 0){
1410 Console.WriteLine("Failed to report expected error " + Report.ExpectedError);
1411 Environment.Exit (1);
1416 Console.WriteLine ("Size of strings held: " + DeclSpace.length);
1417 Console.WriteLine ("Size of strings short: " + DeclSpace.small);
1419 return (Report.Errors == 0);