public Options() { m_parser = new OptionParser(); m_parser.Add( "config", arg => m_symbolConfigurations.Add(ParseSymbolList(arg)), parameterUsage: "<symbol list>", description: "Specify a complete symbol configuration", allowMultiple: true); m_parser.Add( "ignore", arg => m_ignoredSymbols.AddRange(ParseSymbolList(arg)), parameterUsage: "<symbol list>", description: "Ignore a list of symbols (treat as varying)", allowMultiple: true); m_parser.Add( "define", arg => m_definedSymbols.AddRange(ParseSymbolList(arg)), parameterUsage: "<symbol list>", description: "Define a list of symbols (treat as always true)", allowMultiple: true); m_parser.Add( "disable", arg => m_disabledSymbols.AddRange(ParseSymbolList(arg)), parameterUsage: "<symbol list>", description: "Disable a list of symbols (treat as always disabled)", allowMultiple: true); m_parser.Add( "default", arg => UndefinedSymbolValue = Tristate.Parse(arg), parameterUsage: "<false|true|varying>", description: "Set the default value for symbols which do not have a specified value (defaults to varying)"); m_parser.Add( "printdisabled", () => PrintDisabled = true, description: "Print the list of always disabled conditional regions"); m_parser.Add( "printenabled", () => PrintEnabled = true, description: "Print the list of always enabled conditional regions"); m_parser.Add( "printvarying", () => PrintVarying = true, description: "Print the list of varying conditional regions"); m_parser.Add( "printsymbols", () => PrintSymbolInfo = true, description: "Print the lists of uniquely specified preprocessor symbols, symbols visited during analysis, and symbols not encountered during analysis"); m_parser.Add( "print", () => PrintDisabled = PrintEnabled = PrintVarying = PrintSymbolInfo = true, description: "Print the entire list of conditional regions and the lists of preprocessor symbols (combination of printenabled, printdisabled, printvarying, and printsymbols)"); m_parser.Add( "edit", () => Edit = true, "Perform edits to remove always enabled and always disabled conditional regions from source files, and simplify preprocessor expressions which evaluate to 'varying'"); }
public Options() { _parser = new OptionParser(); _parser.Add( "config", arg => _symbolConfigurations.Add(ParseSymbolList(arg)), parameterUsage: "<symbol list>", description: "Specify a complete symbol configuration", allowMultiple: true); _parser.Add( "ignore", arg => _ignoredSymbols.AddRange(ParseSymbolList(arg)), parameterUsage: "<symbol list>", description: "Ignore a list of symbols (treat as varying)", allowMultiple: true); _parser.Add( "define", arg => _definedSymbols.AddRange(ParseSymbolList(arg)), parameterUsage: "<symbol list>", description: "Define a list of symbols (treat as always true)", allowMultiple: true); _parser.Add( "disable", arg => _disabledSymbols.AddRange(ParseSymbolList(arg)), parameterUsage: "<symbol list>", description: "Disable a list of symbols (treat as always disabled)", allowMultiple: true); _parser.Add( "default", arg => UndefinedSymbolValue = Tristate.Parse(arg), parameterUsage: "<false|true|varying>", description: "Set the default value for symbols which do not have a specified value (defaults to varying)"); _parser.Add( "printdisabled", () => PrintDisabled = true, description: "Print the list of always disabled conditional regions"); _parser.Add( "printenabled", () => PrintEnabled = true, description: "Print the list of always enabled conditional regions"); _parser.Add( "printvarying", () => PrintVarying = true, description: "Print the list of varying conditional regions"); _parser.Add( "printsymbols", () => PrintSymbolInfo = true, description: "Print the lists of uniquely specified preprocessor symbols, symbols visited during analysis, and symbols not encountered during analysis"); _parser.Add( "print", () => PrintDisabled = PrintEnabled = PrintVarying = PrintSymbolInfo = true, description: "Print the entire list of conditional regions and the lists of preprocessor symbols (combination of printenabled, printdisabled, printvarying, and printsymbols)"); _parser.Add( "edit", () => Edit = true, "Perform edits to remove always enabled and always disabled conditional regions from source files, and simplify preprocessor expressions which evaluate to 'varying'"); }