Beispiel #1
0
 public IntegerLexerFactory(
     IConcatenationLexerFactory concatenationLexerFactory,
     IOptionLexerFactory optionLexerFactory,
     IRepetitionLexerFactory repetitionLexerFactory,
     ILexerFactory <Sign> signLexerFactory,
     ILexerFactory <Digit> digitLexerFactory)
 {
     if (concatenationLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(concatenationLexerFactory));
     }
     if (optionLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(optionLexerFactory));
     }
     if (repetitionLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(repetitionLexerFactory));
     }
     if (signLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(signLexerFactory));
     }
     if (digitLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(digitLexerFactory));
     }
     this.concatenationLexerFactory = concatenationLexerFactory;
     this.optionLexerFactory        = optionLexerFactory;
     this.repetitionLexerFactory    = repetitionLexerFactory;
     this.signLexerFactory          = signLexerFactory;
     this.digitLexerFactory         = digitLexerFactory;
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="whiteSpaceLexerFactory"></param>
 /// <param name="endOfLineLexerFactory"></param>
 /// <param name="concatenationLexerFactory"></param>
 /// <param name="alternativeLexerFactory"></param>
 /// <param name="repetitionLexerFactory"></param>
 /// <exception cref="ArgumentNullException"></exception>
 public LinearWhiteSpaceLexerFactory(
     [NotNull] ILexerFactory <WhiteSpace> whiteSpaceLexerFactory,
     [NotNull] ILexerFactory <EndOfLine> endOfLineLexerFactory,
     [NotNull] IConcatenationLexerFactory concatenationLexerFactory,
     [NotNull] IAlternativeLexerFactory alternativeLexerFactory,
     [NotNull] IRepetitionLexerFactory repetitionLexerFactory)
 {
     if (whiteSpaceLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(whiteSpaceLexerFactory));
     }
     if (endOfLineLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(endOfLineLexerFactory));
     }
     if (concatenationLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(concatenationLexerFactory));
     }
     if (alternativeLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(alternativeLexerFactory));
     }
     if (repetitionLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(repetitionLexerFactory));
     }
     this.whiteSpaceLexerFactory    = whiteSpaceLexerFactory;
     this.endOfLineLexerFactory     = endOfLineLexerFactory;
     this.alternativeLexerFactory   = alternativeLexerFactory;
     this.repetitionLexerFactory    = repetitionLexerFactory;
     this.concatenationLexerFactory = concatenationLexerFactory;
 }
Beispiel #3
0
 public RequiredDelimitedListLexerFactory(
     [NotNull] IRepetitionLexerFactory repetitionLexerFactory,
     [NotNull] IConcatenationLexerFactory concatenationLexerFactory,
     [NotNull] IOptionLexerFactory optionLexerFactory,
     [NotNull] ITerminalLexerFactory terminalLexerFactory,
     [NotNull] ILexerFactory <OptionalWhiteSpace> optionalWhiteSpaceLexerFactory)
 {
     if (repetitionLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(repetitionLexerFactory));
     }
     if (concatenationLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(concatenationLexerFactory));
     }
     if (optionLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(optionLexerFactory));
     }
     if (terminalLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(terminalLexerFactory));
     }
     if (optionalWhiteSpaceLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(optionalWhiteSpaceLexerFactory));
     }
     RepetitionLexerFactory         = repetitionLexerFactory;
     ConcatenationLexerFactory      = concatenationLexerFactory;
     OptionLexerFactory             = optionLexerFactory;
     TerminalLexerFactory           = terminalLexerFactory;
     OptionalWhiteSpaceLexerFactory = optionalWhiteSpaceLexerFactory;
 }
Beispiel #4
0
 protected RuleLexerFactory(
     [NotNull] ITerminalLexerFactory terminalLexerFactory,
     [NotNull] IValueRangeLexerFactory valueRangeLexerFactory,
     [NotNull] IAlternationLexerFactory alternationLexerFactory,
     [NotNull] IConcatenationLexerFactory concatenationLexerFactory,
     [NotNull] IRepetitionLexerFactory repetitionLexerFactory,
     [NotNull] IOptionLexerFactory optionLexerFactory)
 {
     Terminal      = terminalLexerFactory ?? throw new ArgumentNullException(nameof(terminalLexerFactory));
     ValueRange    = valueRangeLexerFactory ?? throw new ArgumentNullException(nameof(valueRangeLexerFactory));
     Alternation   = alternationLexerFactory ?? throw new ArgumentNullException(nameof(alternationLexerFactory));
     Concatenation = concatenationLexerFactory ?? throw new ArgumentNullException(nameof(concatenationLexerFactory));
     Repetition    = repetitionLexerFactory ?? throw new ArgumentNullException(nameof(repetitionLexerFactory));
     Option        = optionLexerFactory ?? throw new ArgumentNullException(nameof(optionLexerFactory));
 }
Beispiel #5
0
 public OptionalDelimitedListLexerFactory(
     IOptionLexerFactory optionLexerFactory,
     IConcatenationLexerFactory concatenationLexerFactory,
     IAlternationLexerFactory alternationLexerFactory,
     ITerminalLexerFactory terminalLexerFactory,
     IRepetitionLexerFactory repetitionLexerFactory,
     ILexerFactory <OptionalWhiteSpace> optionalWhiteSpaceLexerFactory)
 {
     if (optionLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(optionLexerFactory));
     }
     if (concatenationLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(concatenationLexerFactory));
     }
     if (alternationLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(alternationLexerFactory));
     }
     if (terminalLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(terminalLexerFactory));
     }
     if (optionalWhiteSpaceLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(optionalWhiteSpaceLexerFactory));
     }
     if (repetitionLexerFactory == null)
     {
         throw new ArgumentNullException(nameof(repetitionLexerFactory));
     }
     OptionLexerFactory             = optionLexerFactory;
     ConcatenationLexerFactory      = concatenationLexerFactory;
     AlternationLexerFactory        = alternationLexerFactory;
     TerminalLexerFactory           = terminalLexerFactory;
     OptionalWhiteSpaceLexerFactory = optionalWhiteSpaceLexerFactory;
     RepetitionLexerFactory         = repetitionLexerFactory;
 }