Exemplo n.º 1
0
        public override ILexer <TrailerPart> Create()
        {
            var innerLexer =
                Repetition.Create(
                    Concatenation.Create(HeaderFieldLexerFactory.Create(), NewLineLexerFactory.Create()),
                    0,
                    int.MaxValue);

            return(new TrailerPartLexer(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));
        }