private static bool ParseArguments(List<string>/*!*/ args) {
if (args.Contains("/help") || args.Contains("-?") || args.Contains("/?") || args.Contains("-help")) {
Console.WriteLine("Verbose : /verbose");
Console.WriteLine("Partial trust : /partial");
Console.WriteLine("No adaptive compilation : /noadaptive");
Console.WriteLine("Synchronous compilation : /sync0 (-X:CompilationThreshold 0)");
Console.WriteLine("Synchronous compilation : /sync1 (-X:CompilationThreshold 1)");
Console.WriteLine("Interpret only : /interpret (-X:CompilationThreshold Int32.MaxValue)");
Console.WriteLine("Save to assemblies : /save");
Console.WriteLine("Debug Mode : /debug");
Console.WriteLine("Disable Python interop tests : /py-");
Console.WriteLine("Run Specific Tests : [/exclude] [test_to_run ...]");
Console.WriteLine("List Tests : /list");
Console.WriteLine("Tokenizer baseline : /tokenizer <target-dir> <sources-file>");
Console.WriteLine("Productions dump : /tokenizer /prod <target-dir> <sources-file>");
Console.WriteLine("Benchmark : /tokenizer /bm <target-dir> <sources-file>");
}
if (args.Contains("/list")) {
_displayList = true;
return true;
}
if (args.Contains("/verbose")) {
args.Remove("/verbose");
_verbose = true;
}
if (args.Contains("/debug")) {
args.Remove("/debug");
_isDebug = true;
}
if (args.Contains("-D")) {
args.Remove("-D");
_isDebug = true;
}
if (args.Contains("/save")) {
args.Remove("/save");
_saveToAssemblies = true;
}
if (args.Contains("/partial")) {
args.Remove("/partial");
_partialTrust = true;
}
if (args.Contains("-X:NoAdaptiveCompilation")) {
args.Remove("-X:NoAdaptiveCompilation");
_noAdaptiveCompilation = true;
}
if (args.Contains("/noadaptive")) {
args.Remove("/noadaptive");
_noAdaptiveCompilation = true;
}
if (args.Contains("/sync0")) {
args.Remove("/sync0");
_compilationThreshold = 0;
}
if (args.Contains("/sync1")) {
args.Remove("/sync1");
_compilationThreshold = 1;
}
if (args.Contains("/interpret")) {
args.Remove("/interpret");
_compilationThreshold = Int32.MaxValue;
}
if (args.Contains("/py-")) {
args.Remove("/py-");
_runPython = false;
}
if (args.Contains("/py")) {
args.Remove("/py");
_runPython = true;
}
if (args.Contains("/exclude")) {
_excludeSelectedCases = true;
args.Remove("/exclude");
}
if (args.Contains("/tokenizer")) {
args.Remove("/tokenizer");
_runTokenizerDriver = true;
}
return true;
}