Exemplo n.º 1
0
        /// <inheritdoc />
        public ILexer <Alpha> Create()
        {
            var upperCaseValueRangeLexer   = valueRangeLexerFactory.Create('\x41', '\x5A');
            var lowerCaseValueRangeLexer   = valueRangeLexerFactory.Create('\x61', '\x7A');
            var upperOrLowerCaseAlphaLexer = alternativeLexerFactory.Create(
                upperCaseValueRangeLexer,
                lowerCaseValueRangeLexer);

            return(new AlphaLexer(upperOrLowerCaseAlphaLexer));
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        public ILexer <ControlCharacter> Create()
        {
            var controlsValueRange = valueRangeLexerFactory.Create('\x00', '\x1F');
            var delete             = terminalLexerFactory.Create("\x7F", StringComparer.Ordinal);
            var controlCharacterAlternativeLexer = alternativeLexerFactory.Create(controlsValueRange, delete);

            return(new ControlCharacterLexer(controlCharacterAlternativeLexer));
        }
Exemplo n.º 3
0
 /// <inheritdoc />
 public ILexer <VisibleCharacter> Create()
 {
     return(new VisibleCharacterLexer(valueRangeLexer.Create('\x21', '\x7E')));
 }
Exemplo n.º 4
0
        /// <inheritdoc />
        public ILexer <Character> Create()
        {
            var valueRangeLexer = valueRangeLexerFactory.Create('\x01', '\x7F');

            return(new CharacterLexer(valueRangeLexer));
        }
Exemplo n.º 5
0
        /// <inheritdoc />
        public ILexer <Digit> Create()
        {
            var digitValueRangeLexer = valueRangeLexerFactory.Create('\x30', '\x39');

            return(new DigitLexer(digitValueRangeLexer));
        }
Exemplo n.º 6
0
        /// <inheritdoc />
        public ILexer <Octet> Create()
        {
            var innerLexer = valueRangeLexerFactory.Create('\x00', '\xFF');

            return(new OctetLexer(innerLexer));
        }