/// <summary> /// Initializes a new instance of the <see cref="Lexer"/> class. /// </summary> /// <param name="input">The <see cref="System.IO.TextReader"/> to use for input. This need not be seekable.</param> /// <param name="escapeCharacters">The escape characters that should be recognized.</param> /// <param name="quotations">The quotations that should be recognized.</param> /// <param name="assignmentCharacters">The assignment characters that should be recognized.</param> public Lexer(TextReader input, ICollection<char> escapeCharacters, IDictionary<char, QuotationInfo> quotations, IDictionary<char, OptionStyles> assignmentCharacters) { mInput = input; FillCharacterBuffer(); mEscapeCharacters = new GuardedCollection<char>(escapeCharacters); mQuotations = new GuardedDictionary<char, QuotationInfo>(quotations); mAssignmentCharacters = new GuardedDictionary<char, OptionStyles>(assignmentCharacters); mEnabledOptionStyles = OptionStyles.ShortUnix | OptionStyles.Windows | OptionStyles.File; }
/// <summary> /// Initializes a new instance of the <see cref="Lexer"/> class. /// </summary> /// <param name="input">The <see cref="System.IO.TextReader"/> to use for input. This need not be seekable.</param> /// <param name="escapeCharacters">The escape characters that should be recognized.</param> /// <param name="quotations">The quotations that should be recognized.</param> /// <param name="assignmentCharacters">The assignment characters that should be recognized.</param> public Lexer(TextReader input, ICollection <char> escapeCharacters, IDictionary <char, QuotationInfo> quotations, IDictionary <char, OptionStyles> assignmentCharacters) { mInput = input; FillCharacterBuffer(); mEscapeCharacters = new GuardedCollection <char>(escapeCharacters); mQuotations = new GuardedDictionary <char, QuotationInfo>(quotations); mAssignmentCharacters = new GuardedDictionary <char, OptionStyles>(assignmentCharacters); mEnabledOptionStyles = OptionStyles.ShortUnix | OptionStyles.Windows | OptionStyles.File; }