Beispiel #1
0
        public override ILexer <Path> Create()
        {
            var innerLexer = Alternation.Create(
                PathAbsoluteOrEmptyLexerFactory.Create(),
                PathAbsoluteLexerFactory.Create(),
                PathNoSchemeLexerFactory.Create(),
                PathRootlessLexerFactory.Create(),
                PathEmptyLexerFactory.Create());

            return(new PathLexer(innerLexer));
        }
        public override ILexer <RelativePart> Create()
        {
            var innerLexer =
                Alternation.Create(
                    Concatenation.Create(
                        Terminal.Create(@"//", StringComparer.Ordinal),
                        AuthorityLexerFactory.Create(),
                        PathAbsoluteOrEmptyLexerFactory.Create()),
                    PathAbsoluteLexerFactory.Create(),
                    PathNoSchemeLexerFactory.Create(),
                    PathEmptyLexerFactory.Create());

            return(new RelativePartLexer(innerLexer));
        }
Beispiel #3
0
        public override ILexer <HierarchicalPart> Create()
        {
            var delim = Terminal.Create(@"//", StringComparer.Ordinal);
            var seq   = Concatenation.Create(
                delim,
                AuthorityLexerFactory.Create(),
                PathAbsoluteOrEmptyLexerFactory.Create());
            var innerLexer = Alternation.Create(
                seq,
                PathAbsoluteLexerFactory.Create(),
                PathRootlessLexerFactory.Create(),
                PathEmptyLexerFactory.Create());

            return(new HierarchicalPartLexer(innerLexer));
        }