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)); }
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)); }