51 |
cout << " highlighting backend) of the parsed script to stdout and exits" << endl; |
cout << " highlighting backend) of the parsed script to stdout and exits" << endl; |
52 |
cout << " immediately." << endl; |
cout << " immediately." << endl; |
53 |
cout << endl; |
cout << endl; |
54 |
|
cout << " --auto-suspend" << endl; |
55 |
|
cout << " In contrast to the real sampler, this command line program " << endl; |
56 |
|
cout << " disables automatic suspension by the VM by default to ease " << endl; |
57 |
|
cout << " i.e. bench marking tasks and the like. By providing this " << endl; |
58 |
|
cout << " argument auto suspension will be enabled." << endl; |
59 |
|
cout << endl; |
60 |
cout << "If you pass \"core\" as argument, only the core language built-in" << endl; |
cout << "If you pass \"core\" as argument, only the core language built-in" << endl; |
61 |
cout << "variables and functions are available. However in this particular" << endl; |
cout << "variables and functions are available. However in this particular" << endl; |
62 |
cout << "mode the program will not just parse the given script, but also" << endl; |
cout << "mode the program will not just parse the given script, but also" << endl; |
91 |
printUsage(); |
printUsage(); |
92 |
return -1; |
return -1; |
93 |
} |
} |
94 |
|
vm->setAutoSuspendEnabled(false); |
95 |
|
|
96 |
// validate & parse arguments provided to this program |
// validate & parse arguments provided to this program |
97 |
for (int iArg = 2; iArg < argc; ++iArg) { |
for (int iArg = 2; iArg < argc; ++iArg) { |
108 |
} else if (opt == "-ds" || opt == "--debug-syntax") { |
} else if (opt == "-ds" || opt == "--debug-syntax") { |
109 |
dumpSyntaxHighlighting(vm); |
dumpSyntaxHighlighting(vm); |
110 |
return 0; |
return 0; |
111 |
|
} else if (opt == "--auto-suspend") { |
112 |
|
vm->setAutoSuspendEnabled(true); |
113 |
} else { |
} else { |
114 |
cerr << "Unknown option '" << opt << "'" << endl; |
cerr << "Unknown option '" << opt << "'" << endl; |
115 |
cerr << endl; |
cerr << endl; |