public override ILexer <ChunkedBody> Create()
        {
            var innerLexer = Concatenation.Create(
                Repetition.Create(ChunkLexerFactory.Create(), 0, int.MaxValue),
                LastChunkLexerFactory.Create(),
                TrailerPartLexerFactory.Create(),
                NewLineLexerFactory.Create());

            return(new ChunkedBodyLexer(innerLexer));
        }
        public override ILexer <ObsoleteFold> Create()
        {
            var innerLexer = Concatenation.Create(
                NewLineLexerFactory.Create(),
                Repetition.Create(
                    Alternation.Create(SpaceLexerFactory.Create(), HorizontalTabLexerFactory.Create()),
                    1,
                    int.MaxValue));

            return(new ObsoleteFoldLexer(innerLexer));
        }
Exemple #3
0
        public override ILexer <StatusLine> Create()
        {
            var sp         = SpaceLexerFactory.Create();
            var innerLexer = Concatenation.Create(
                HttpVersionLexerFactory.Create(),
                sp,
                StatusCodeLexerFactory.Create(),
                sp,
                ReasonPhraseLexerFactory.Create(),
                NewLineLexerFactory.Create());

            return(new StatusLineLexer(innerLexer));
        }
Exemple #4
0
        public override ILexer <RequestLine> Create()
        {
            var sp         = SpaceLexerFactory.Create();
            var innerLexer = Concatenation.Create(
                MethodLexerFactory.Create(),
                sp,
                RequestTargetLexerFactory.Create(),
                sp,
                HttpVersionLexerFactory.Create(),
                NewLineLexerFactory.Create());

            return(new RequestLineLexer(innerLexer));
        }
        public override ILexer <HttpMessage> Create()
        {
            var crlf       = NewLineLexerFactory.Create();
            var innerLexer = Concatenation.Create(
                StartLineLexerFactory.Create(),
                Repetition.Create(
                    Concatenation.Create(HeaderFieldLexerFactory.Create(), crlf),
                    0,
                    int.MaxValue),
                crlf,
                Option.Create(MessageBodyLexerFactory.Create()));

            return(new HttpMessageLexer(innerLexer));
        }