/// <inheritdoc /> public ILexer <EndOfLine> Create() { var carriageReturnLexer = carriageReturnLexerFactory.Create(); var lineFeedLexer = lineFeedLexerFactory.Create(); var endOfLineSequenceLexer = concatenationLexerFactory.Create(carriageReturnLexer, lineFeedLexer); return(new EndOfLineLexer(endOfLineSequenceLexer)); }
public ILexer <Integer> Create() { var signLexer = signLexerFactory.Create(); var optionalSignLexer = optionLexerFactory.Create(signLexer); var digitLexer = digitLexerFactory.Create(); var manyDigitsLexer = repetitionLexerFactory.Create(digitLexer, 1, int.MaxValue); var innerLexer = concatenationLexerFactory.Create(optionalSignLexer, manyDigitsLexer); return(new IntegerLexer(innerLexer)); }
/// <inheritdoc /> public ILexer <LinearWhiteSpace> Create() { var endOfLineLexer = endOfLineLexerFactory.Create(); var whiteSpaceLexer = whiteSpaceLexerFactory.Create(); var foldLexer = concatenationLexerFactory.Create(endOfLineLexer, whiteSpaceLexer); var breakingWhiteSpaceLexer = alternativeLexerFactory.Create(whiteSpaceLexer, foldLexer); var innerLexer = repetitionLexerFactory.Create(breakingWhiteSpaceLexer, 0, int.MaxValue); return(new LinearWhiteSpaceLexer(innerLexer)); }