public override ILexer <IPvFuture> Create() { // "v" var v = Terminal.Create(@"v", StringComparer.OrdinalIgnoreCase); // "." var dot = Terminal.Create(@".", StringComparer.Ordinal); // ":" var colon = Terminal.Create(@":", StringComparer.Ordinal); // 1*HEXDIG var hexadecimalDigitLexer = HexadecimalDigitLexerFactory.Create(); var r = Repetition.Create(hexadecimalDigitLexer, 1, int.MaxValue); // unreserved / sub-delims / ":" var unreservedLexer = UnreservedLexerFactory.Create(); var subcomponentsDelimiterLexer = SubcomponentsDelimiterLexerFactory.Create(); var a = Alternation.Create(unreservedLexer, subcomponentsDelimiterLexer, colon); // 1*( unreserved / sub-delims / ":" ) var s = Repetition.Create(a, 1, int.MaxValue); // "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" ) var innerLexer = Concatenation.Create(v, r, dot, s); // IPvFuture return(new IPvFutureLexer(innerLexer)); }
public override ILexer <PathCharacter> Create() { var innerLexer = Alternation.Create( UnreservedLexerFactory.Create(), PercentEncodingLexerFactory.Create(), SubcomponentsDelimiterLexerFactory.Create(), Terminal.Create(@":", StringComparer.Ordinal), Terminal.Create(@"@", StringComparer.Ordinal)); return(new PathCharacterLexer(innerLexer)); }
public override ILexer <UserInformation> Create() { var innerLexer = Repetition.Create( Alternation.Create( UnreservedLexerFactory.Create(), PercentEncodingLexerFactory.Create(), SubcomponentsDelimiterLexerFactory.Create(), Terminal.Create(@":", StringComparer.Ordinal)), 0, int.MaxValue); return(new UserInformationLexer(innerLexer)); }
public override ILexer <RegisteredName> Create() { var innerLexer = Repetition.Create( Alternation.Create( UnreservedLexerFactory.Create(), PercentEncodingLexerFactory.Create(), SubcomponentsDelimiterLexerFactory.Create()), 0, int.MaxValue); return(new RegisteredNameLexer(innerLexer)); }
public override ILexer <SegmentNonZeroLengthNoColons> Create() { var alternationLexer = Alternation.Create( UnreservedLexerFactory.Create(), PercentEncodingLexerFactory.Create(), SubcomponentsDelimiterLexerFactory.Create(), Terminal.Create(@"@", StringComparer.Ordinal)); var segmentNonZeroLengthNoColonsRepetitionLexer = Repetition.Create( alternationLexer, 1, int.MaxValue); return(new SegmentNonZeroLengthNoColonsLexer(segmentNonZeroLengthNoColonsRepetitionLexer)); }