blob: d3966279b4fab960ca5c606aaffc4c3649ff2053 [file] [log] [blame]
Chris Lattnerdbab15a2001-07-23 17:17:47 +00001//===-- CommandLine.cpp - Command line parser implementation --------------===//
2//
3// This class implements a command line argument processor that is useful when
4// creating a tool. It provides a simple, minimalistic interface that is easily
5// extensible and supports nonlocal (library) command line options.
6//
Chris Lattner03fe1bd2001-07-23 23:04:07 +00007// Note that rather than trying to figure out what this code does, you could try
8// reading the library documentation located in docs/CommandLine.html
9//
Chris Lattnerdbab15a2001-07-23 17:17:47 +000010//===----------------------------------------------------------------------===//
11
Chris Lattnercee8f9a2001-11-27 00:03:19 +000012#include "Support/CommandLine.h"
13#include "Support/STLExtras.h"
Chris Lattnerdbab15a2001-07-23 17:17:47 +000014#include <vector>
15#include <algorithm>
16#include <map>
17#include <set>
Chris Lattner697954c2002-01-20 22:54:45 +000018#include <iostream>
Chris Lattnerdbab15a2001-07-23 17:17:47 +000019using namespace cl;
Chris Lattner697954c2002-01-20 22:54:45 +000020using std::map;
21using std::pair;
22using std::vector;
23using std::string;
24using std::cerr;
Chris Lattnerdbab15a2001-07-23 17:17:47 +000025
26// Return the global command line option vector. Making it a function scoped
Chris Lattnerf78032f2001-11-26 18:58:34 +000027// static ensures that it will be initialized correctly before its first use.
Chris Lattnerdbab15a2001-07-23 17:17:47 +000028//
29static map<string, Option*> &getOpts() {
30 static map<string,Option*> CommandLineOptions;
31 return CommandLineOptions;
32}
33
34static void AddArgument(const string &ArgName, Option *Opt) {
35 if (getOpts().find(ArgName) != getOpts().end()) {
36 cerr << "CommandLine Error: Argument '" << ArgName
Chris Lattner9c9be482002-01-31 00:42:56 +000037 << "' defined more than once!\n";
Chris Lattnerdbab15a2001-07-23 17:17:47 +000038 } else {
Chris Lattnerf78032f2001-11-26 18:58:34 +000039 // Add argument to the argument map!
Chris Lattner697954c2002-01-20 22:54:45 +000040 getOpts().insert(std::make_pair(ArgName, Opt));
Chris Lattnerdbab15a2001-07-23 17:17:47 +000041 }
42}
43
44static const char *ProgramName = 0;
45static const char *ProgramOverview = 0;
46
Chris Lattnercaccd762001-10-27 05:54:17 +000047static inline bool ProvideOption(Option *Handler, const char *ArgName,
48 const char *Value, int argc, char **argv,
49 int &i) {
50 // Enforce value requirements
51 switch (Handler->getValueExpectedFlag()) {
52 case ValueRequired:
53 if (Value == 0 || *Value == 0) { // No value specified?
54 if (i+1 < argc) { // Steal the next argument, like for '-o filename'
55 Value = argv[++i];
56 } else {
57 return Handler->error(" requires a value!");
58 }
59 }
60 break;
61 case ValueDisallowed:
62 if (*Value != 0)
63 return Handler->error(" does not allow a value! '" +
64 string(Value) + "' specified.");
65 break;
66 case ValueOptional: break;
67 default: cerr << "Bad ValueMask flag! CommandLine usage error:"
Chris Lattner697954c2002-01-20 22:54:45 +000068 << Handler->getValueExpectedFlag() << "\n"; abort();
Chris Lattnercaccd762001-10-27 05:54:17 +000069 }
70
71 // Run the handler now!
72 return Handler->addOccurance(ArgName, Value);
73}
74
Chris Lattnerf78032f2001-11-26 18:58:34 +000075// ValueGroupedArgs - Return true if the specified string is valid as a group
76// of single letter arguments stuck together like the 'ls -la' case.
77//
78static inline bool ValidGroupedArgs(string Args) {
79 for (unsigned i = 0; i < Args.size(); ++i) {
80 map<string, Option*>::iterator I = getOpts().find(string(1, Args[i]));
81 if (I == getOpts().end()) return false; // Make sure option exists
82
83 // Grouped arguments have no value specified, make sure that if this option
84 // exists that it can accept no argument.
85 //
86 switch (I->second->getValueExpectedFlag()) {
87 case ValueDisallowed:
88 case ValueOptional: break;
89 default: return false;
90 }
91 }
92
93 return true;
94}
Chris Lattnercaccd762001-10-27 05:54:17 +000095
Chris Lattnerdbab15a2001-07-23 17:17:47 +000096void cl::ParseCommandLineOptions(int &argc, char **argv,
Chris Lattnerf78032f2001-11-26 18:58:34 +000097 const char *Overview = 0, int Flags = 0) {
Chris Lattnerdbab15a2001-07-23 17:17:47 +000098 ProgramName = argv[0]; // Save this away safe and snug
99 ProgramOverview = Overview;
100 bool ErrorParsing = false;
101
102 // Loop over all of the arguments... processing them.
103 for (int i = 1; i < argc; ++i) {
104 Option *Handler = 0;
105 const char *Value = "";
106 const char *ArgName = "";
107 if (argv[i][0] != '-') { // Unnamed argument?
Chris Lattner3805e4c2001-07-25 18:40:49 +0000108 map<string, Option*>::iterator I = getOpts().find("");
109 Handler = I != getOpts().end() ? I->second : 0;
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000110 Value = argv[i];
111 } else { // We start with a - or --, eat dashes
112 ArgName = argv[i]+1;
113 while (*ArgName == '-') ++ArgName; // Eat leading dashes
114
115 const char *ArgNameEnd = ArgName;
Chris Lattnerf78032f2001-11-26 18:58:34 +0000116 while (*ArgNameEnd && *ArgNameEnd != '=')
117 ++ArgNameEnd; // Scan till end of argument name...
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000118
119 Value = ArgNameEnd;
120 if (*Value) // If we have an equals sign...
121 ++Value; // Advance to value...
122
123 if (*ArgName != 0) {
Chris Lattnerf78032f2001-11-26 18:58:34 +0000124 string RealName(ArgName, ArgNameEnd);
Chris Lattner3805e4c2001-07-25 18:40:49 +0000125 // Extract arg name part
Chris Lattnerf78032f2001-11-26 18:58:34 +0000126 map<string, Option*>::iterator I = getOpts().find(RealName);
127
128 if (I == getOpts().end() && !*Value && RealName.size() > 1) {
129 // If grouping of single letter arguments is enabled, see if this is a
130 // legal grouping...
131 //
132 if (!(Flags & DisableSingleLetterArgGrouping) &&
133 ValidGroupedArgs(RealName)) {
134
135 for (unsigned i = 0; i < RealName.size(); ++i) {
136 char ArgName[2] = { 0, 0 }; int Dummy;
137 ArgName[0] = RealName[i];
138 I = getOpts().find(ArgName);
139 assert(I != getOpts().end() && "ValidGroupedArgs failed!");
140
141 // Because ValueRequired is an invalid flag for grouped arguments,
142 // we don't need to pass argc/argv in...
143 //
144 ErrorParsing |= ProvideOption(I->second, ArgName, "",
145 0, 0, Dummy);
146 }
147 continue;
148 } else if (Flags & EnableSingleLetterArgValue) {
149 // Check to see if the first letter is a single letter argument that
150 // have a value that is equal to the rest of the string. If this
151 // is the case, recognize it now. (Example: -lfoo for a linker)
152 //
153 I = getOpts().find(string(1, RealName[0]));
154 if (I != getOpts().end()) {
155 // If we are successful, fall through to later processing, by
156 // setting up the argument name flags and value fields.
157 //
158 ArgNameEnd = ArgName+1;
159 Value = ArgNameEnd;
160 }
161 }
162 }
163
164
Chris Lattner3805e4c2001-07-25 18:40:49 +0000165 Handler = I != getOpts().end() ? I->second : 0;
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000166 }
167 }
168
169 if (Handler == 0) {
170 cerr << "Unknown command line argument '" << argv[i] << "'. Try: "
Chris Lattnerf038acb2001-10-24 06:21:56 +0000171 << argv[0] << " --help'\n";
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000172 ErrorParsing = true;
173 continue;
174 }
175
Chris Lattnercaccd762001-10-27 05:54:17 +0000176 ErrorParsing |= ProvideOption(Handler, ArgName, Value, argc, argv, i);
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000177
Chris Lattnercaccd762001-10-27 05:54:17 +0000178 // If this option should consume all arguments that come after it...
179 if (Handler->getNumOccurancesFlag() == ConsumeAfter) {
180 for (++i; i < argc; ++i)
181 ErrorParsing |= ProvideOption(Handler, ArgName, argv[i], argc, argv, i);
182 }
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000183 }
184
Chris Lattnerdc4693d2001-07-23 23:02:45 +0000185 // Loop over args and make sure all required args are specified!
186 for (map<string, Option*>::iterator I = getOpts().begin(),
187 E = getOpts().end(); I != E; ++I) {
188 switch (I->second->getNumOccurancesFlag()) {
189 case Required:
190 case OneOrMore:
Chris Lattnerf038acb2001-10-24 06:21:56 +0000191 if (I->second->getNumOccurances() == 0) {
Chris Lattnerdc4693d2001-07-23 23:02:45 +0000192 I->second->error(" must be specified at least once!");
Chris Lattnerf038acb2001-10-24 06:21:56 +0000193 ErrorParsing = true;
194 }
Chris Lattnerdc4693d2001-07-23 23:02:45 +0000195 // Fall through
196 default:
197 break;
198 }
199 }
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000200
201 // Free all of the memory allocated to the vector. Command line options may
202 // only be processed once!
203 getOpts().clear();
204
205 // If we had an error processing our arguments, don't let the program execute
206 if (ErrorParsing) exit(1);
207}
208
209//===----------------------------------------------------------------------===//
210// Option Base class implementation
211//
212Option::Option(const char *argStr, const char *helpStr, int flags)
Chris Lattnerdc4693d2001-07-23 23:02:45 +0000213 : NumOccurances(0), Flags(flags), ArgStr(argStr), HelpStr(helpStr) {
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000214 AddArgument(ArgStr, this);
215}
216
217bool Option::error(string Message, const char *ArgName = 0) {
218 if (ArgName == 0) ArgName = ArgStr;
Chris Lattner697954c2002-01-20 22:54:45 +0000219 cerr << "-" << ArgName << " option" << Message << "\n";
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000220 return true;
221}
222
223bool Option::addOccurance(const char *ArgName, const string &Value) {
224 NumOccurances++; // Increment the number of times we have been seen
225
Chris Lattnerdc4693d2001-07-23 23:02:45 +0000226 switch (getNumOccurancesFlag()) {
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000227 case Optional:
228 if (NumOccurances > 1)
229 return error(": may only occur zero or one times!", ArgName);
230 break;
231 case Required:
232 if (NumOccurances > 1)
233 return error(": must occur exactly one time!", ArgName);
234 // Fall through
235 case OneOrMore:
Chris Lattnercaccd762001-10-27 05:54:17 +0000236 case ZeroOrMore:
237 case ConsumeAfter: break;
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000238 default: return error(": bad num occurances flag value!");
239 }
240
241 return handleOccurance(ArgName, Value);
242}
243
244// Return the width of the option tag for printing...
245unsigned Option::getOptionWidth() const {
246 return std::strlen(ArgStr)+6;
247}
248
249void Option::printOptionInfo(unsigned GlobalWidth) const {
250 unsigned L = std::strlen(ArgStr);
251 if (L == 0) return; // Don't print the empty arg like this!
252 cerr << " -" << ArgStr << string(GlobalWidth-L-6, ' ') << " - "
Chris Lattner697954c2002-01-20 22:54:45 +0000253 << HelpStr << "\n";
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000254}
255
256
257//===----------------------------------------------------------------------===//
258// Boolean/flag command line option implementation
259//
260
261bool Flag::handleOccurance(const char *ArgName, const string &Arg) {
262 if (Arg == "" || Arg == "true" || Arg == "TRUE" || Arg == "True" ||
263 Arg == "1") {
264 Value = true;
265 } else if (Arg == "false" || Arg == "FALSE" || Arg == "False" || Arg == "0") {
266 Value = false;
267 } else {
Chris Lattnerd215fd12001-10-13 06:53:19 +0000268 return error(": '" + Arg +
269 "' is invalid value for boolean argument! Try 0 or 1");
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000270 }
271
272 return false;
273}
274
275//===----------------------------------------------------------------------===//
276// Integer valued command line option implementation
277//
278bool Int::handleOccurance(const char *ArgName, const string &Arg) {
279 const char *ArgStart = Arg.c_str();
280 char *End;
281 Value = (int)strtol(ArgStart, &End, 0);
282 if (*End != 0)
283 return error(": '" + Arg + "' value invalid for integer argument!");
284 return false;
285}
286
287//===----------------------------------------------------------------------===//
288// String valued command line option implementation
289//
290bool String::handleOccurance(const char *ArgName, const string &Arg) {
Chris Lattner1e78f362001-07-23 19:27:24 +0000291 *this = Arg;
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000292 return false;
293}
294
295//===----------------------------------------------------------------------===//
Chris Lattnerd215fd12001-10-13 06:53:19 +0000296// StringList valued command line option implementation
297//
298bool StringList::handleOccurance(const char *ArgName, const string &Arg) {
Chris Lattnercaccd762001-10-27 05:54:17 +0000299 push_back(Arg);
Chris Lattnerd215fd12001-10-13 06:53:19 +0000300 return false;
301}
302
303//===----------------------------------------------------------------------===//
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000304// Enum valued command line option implementation
305//
306void EnumBase::processValues(va_list Vals) {
307 while (const char *EnumName = va_arg(Vals, const char *)) {
308 int EnumVal = va_arg(Vals, int);
309 const char *EnumDesc = va_arg(Vals, const char *);
Chris Lattner697954c2002-01-20 22:54:45 +0000310 ValueMap.push_back(std::make_pair(EnumName, // Add value to value map
311 std::make_pair(EnumVal, EnumDesc)));
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000312 }
313}
314
315// registerArgs - notify the system about these new arguments
316void EnumBase::registerArgs() {
317 for (unsigned i = 0; i < ValueMap.size(); ++i)
318 AddArgument(ValueMap[i].first, this);
319}
320
321const char *EnumBase::getArgName(int ID) const {
322 for (unsigned i = 0; i < ValueMap.size(); ++i)
323 if (ID == ValueMap[i].second.first) return ValueMap[i].first;
324 return "";
325}
326const char *EnumBase::getArgDescription(int ID) const {
327 for (unsigned i = 0; i < ValueMap.size(); ++i)
328 if (ID == ValueMap[i].second.first) return ValueMap[i].second.second;
329 return "";
330}
331
332
333
334bool EnumValueBase::handleOccurance(const char *ArgName, const string &Arg) {
335 unsigned i;
336 for (i = 0; i < ValueMap.size(); ++i)
337 if (ValueMap[i].first == Arg) break;
Chris Lattner9c9be482002-01-31 00:42:56 +0000338
339 if (i == ValueMap.size()) {
340 string Alternatives;
341 for (i = 0; i < ValueMap.size(); ++i) {
342 if (i) Alternatives += ", ";
343 Alternatives += ValueMap[i].first;
344 }
345
346 return error(": unrecognized alternative '" + Arg +
347 "'! Alternatives are: " + Alternatives);
348 }
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000349 Value = ValueMap[i].second.first;
350 return false;
351}
352
353// Return the width of the option tag for printing...
354unsigned EnumValueBase::getOptionWidth() const {
355 unsigned BaseSize = Option::getOptionWidth();
356 for (unsigned i = 0; i < ValueMap.size(); ++i)
Chris Lattner697954c2002-01-20 22:54:45 +0000357 BaseSize = std::max(BaseSize, std::strlen(ValueMap[i].first)+8);
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000358 return BaseSize;
359}
360
361// printOptionInfo - Print out information about this option. The
362// to-be-maintained width is specified.
363//
364void EnumValueBase::printOptionInfo(unsigned GlobalWidth) const {
365 Option::printOptionInfo(GlobalWidth);
366 for (unsigned i = 0; i < ValueMap.size(); ++i) {
367 unsigned NumSpaces = GlobalWidth-strlen(ValueMap[i].first)-8;
368 cerr << " =" << ValueMap[i].first << string(NumSpaces, ' ') << " - "
369 << ValueMap[i].second.second;
370
371 if (i == 0) cerr << " (default)";
Chris Lattner697954c2002-01-20 22:54:45 +0000372 cerr << "\n";
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000373 }
374}
375
376//===----------------------------------------------------------------------===//
377// Enum flags command line option implementation
378//
379
380bool EnumFlagsBase::handleOccurance(const char *ArgName, const string &Arg) {
381 return EnumValueBase::handleOccurance("", ArgName);
382}
383
384unsigned EnumFlagsBase::getOptionWidth() const {
385 unsigned BaseSize = 0;
386 for (unsigned i = 0; i < ValueMap.size(); ++i)
Chris Lattner697954c2002-01-20 22:54:45 +0000387 BaseSize = std::max(BaseSize, std::strlen(ValueMap[i].first)+6);
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000388 return BaseSize;
389}
390
391void EnumFlagsBase::printOptionInfo(unsigned GlobalWidth) const {
392 for (unsigned i = 0; i < ValueMap.size(); ++i) {
393 unsigned L = std::strlen(ValueMap[i].first);
394 cerr << " -" << ValueMap[i].first << string(GlobalWidth-L-6, ' ') << " - "
395 << ValueMap[i].second.second;
396 if (i == 0) cerr << " (default)";
Chris Lattner697954c2002-01-20 22:54:45 +0000397 cerr << "\n";
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000398 }
399}
400
401
402//===----------------------------------------------------------------------===//
403// Enum list command line option implementation
404//
405
406bool EnumListBase::handleOccurance(const char *ArgName, const string &Arg) {
407 unsigned i;
408 for (i = 0; i < ValueMap.size(); ++i)
409 if (ValueMap[i].first == string(ArgName)) break;
410 if (i == ValueMap.size())
411 return error(": CommandLine INTERNAL ERROR", ArgName);
412 Values.push_back(ValueMap[i].second.first);
413 return false;
414}
415
416// Return the width of the option tag for printing...
417unsigned EnumListBase::getOptionWidth() const {
418 unsigned BaseSize = 0;
419 for (unsigned i = 0; i < ValueMap.size(); ++i)
Chris Lattner697954c2002-01-20 22:54:45 +0000420 BaseSize = std::max(BaseSize, std::strlen(ValueMap[i].first)+6);
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000421 return BaseSize;
422}
423
424
425// printOptionInfo - Print out information about this option. The
426// to-be-maintained width is specified.
427//
428void EnumListBase::printOptionInfo(unsigned GlobalWidth) const {
429 for (unsigned i = 0; i < ValueMap.size(); ++i) {
430 unsigned L = std::strlen(ValueMap[i].first);
431 cerr << " -" << ValueMap[i].first << string(GlobalWidth-L-6, ' ') << " - "
Chris Lattner697954c2002-01-20 22:54:45 +0000432 << ValueMap[i].second.second << "\n";
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000433 }
434}
435
436
437//===----------------------------------------------------------------------===//
438// Help option... always automatically provided.
439//
440namespace {
441
442// isHidden/isReallyHidden - Predicates to be used to filter down arg lists.
443inline bool isHidden(pair<string, Option *> &OptPair) {
Chris Lattnerdc4693d2001-07-23 23:02:45 +0000444 return OptPair.second->getOptionHiddenFlag() >= Hidden;
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000445}
446inline bool isReallyHidden(pair<string, Option *> &OptPair) {
Chris Lattnerdc4693d2001-07-23 23:02:45 +0000447 return OptPair.second->getOptionHiddenFlag() == ReallyHidden;
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000448}
449
450class Help : public Option {
451 unsigned MaxArgLen;
452 const Option *EmptyArg;
453 const bool ShowHidden;
454
455 virtual bool handleOccurance(const char *ArgName, const string &Arg) {
456 // Copy Options into a vector so we can sort them as we like...
457 vector<pair<string, Option*> > Options;
Chris Lattner697954c2002-01-20 22:54:45 +0000458 copy(getOpts().begin(), getOpts().end(), std::back_inserter(Options));
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000459
460 // Eliminate Hidden or ReallyHidden arguments, depending on ShowHidden
461 Options.erase(remove_if(Options.begin(), Options.end(),
Chris Lattner697954c2002-01-20 22:54:45 +0000462 std::ptr_fun(ShowHidden ? isReallyHidden : isHidden)),
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000463 Options.end());
464
465 // Eliminate duplicate entries in table (from enum flags options, f.e.)
Chris Lattner697954c2002-01-20 22:54:45 +0000466 std::set<Option*> OptionSet;
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000467 for (unsigned i = 0; i < Options.size(); )
468 if (OptionSet.count(Options[i].second) == 0)
469 OptionSet.insert(Options[i++].second); // Add to set
470 else
471 Options.erase(Options.begin()+i); // Erase duplicate
472
473
474 if (ProgramOverview)
Chris Lattner697954c2002-01-20 22:54:45 +0000475 cerr << "OVERVIEW:" << ProgramOverview << "\n";
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000476 // TODO: Sort options by some criteria
477
478 cerr << "USAGE: " << ProgramName << " [options]\n\n";
479 // TODO: print usage nicer
480
481 // Compute the maximum argument length...
482 MaxArgLen = 0;
483 for_each(Options.begin(), Options.end(),
484 bind_obj(this, &Help::getMaxArgLen));
485
486 cerr << "OPTIONS:\n";
487 for_each(Options.begin(), Options.end(),
488 bind_obj(this, &Help::printOption));
489
490 return true; // Displaying help is cause to terminate the program
491 }
492
493 void getMaxArgLen(pair<string, Option *> OptPair) {
494 const Option *Opt = OptPair.second;
495 if (Opt->ArgStr[0] == 0) EmptyArg = Opt; // Capture the empty arg if exists
Chris Lattner697954c2002-01-20 22:54:45 +0000496 MaxArgLen = std::max(MaxArgLen, Opt->getOptionWidth());
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000497 }
498
499 void printOption(pair<string, Option *> OptPair) {
500 const Option *Opt = OptPair.second;
501 Opt->printOptionInfo(MaxArgLen);
502 }
503
504public:
505 inline Help(const char *ArgVal, const char *HelpVal, bool showHidden)
506 : Option(ArgVal, HelpVal, showHidden ? Hidden : 0), ShowHidden(showHidden) {
507 EmptyArg = 0;
508 }
509};
510
511Help HelpOp("help", "display available options"
Chris Lattnerdc4693d2001-07-23 23:02:45 +0000512 " (--help-hidden for more)", false);
Chris Lattnerdbab15a2001-07-23 17:17:47 +0000513Help HelpHiddenOpt("help-hidden", "display all available options", true);
514
515} // End anonymous namespace