コード例 #1
0
        public override ILexer <PartialUri> Create()
        {
            var innerLexer = Concatenation.Create(
                RelativePartLexerFactory.Create(),
                OptionalDelimitedListLexerFactory.Create(
                    Concatenation.Create(
                        Terminal.Create(@"?", StringComparer.Ordinal),
                        QueryLexerFactory.Create())));

            return(new PartialUriLexer(innerLexer));
        }
コード例 #2
0
        public override ILexer <AbsoluteUri> Create()
        {
            var colon      = Terminal.Create(@":", StringComparer.Ordinal);
            var qm         = Terminal.Create(@"?", StringComparer.Ordinal);
            var queryPart  = Concatenation.Create(qm, QueryLexerFactory.Create());
            var optQuery   = Option.Create(queryPart);
            var innerLexer = Concatenation.Create(
                SchemeLexerFactory.Create(),
                colon,
                HierarchicalPartLexerFactory.Create(),
                optQuery);

            return(new AbsoluteUriLexer(innerLexer));
        }
コード例 #3
0
        public override ILexer <RelativeReference> Create()
        {
            var innerLexer = Concatenation.Create(
                RelativePartLexerFactory.Create(),
                Option.Create(
                    Concatenation.Create(
                        Terminal.Create(@"?", StringComparer.Ordinal),
                        QueryLexerFactory.Create())),
                Option.Create(
                    Concatenation.Create(
                        Terminal.Create(@"#", StringComparer.Ordinal),
                        FragmentLexerFactory.Create())));

            return(new RelativeReferenceLexer(innerLexer));
        }
コード例 #4
0
        public override ILexer <UniformResourceIdentifier> Create()
        {
            var innerLexer = Concatenation.Create(
                SchemeLexerFactory.Create(),
                Terminal.Create(@":", StringComparer.Ordinal),
                HierarchicalPartLexerFactory.Create(),
                Option.Create(
                    Concatenation.Create(
                        Terminal.Create(@"?", StringComparer.Ordinal),
                        QueryLexerFactory.Create())),
                Option.Create(
                    Concatenation.Create(
                        Terminal.Create(@"#", StringComparer.Ordinal),
                        FragmentLexerFactory.Create())));

            return(new UniformResourceIdentifierLexer(innerLexer));
        }