Lines Matching refs:lexer
37 //import gov.nist.javax.sdp.parser.Lexer;
52 private static LexerCore Lexer;
66 this.lexer = new LexerCore("charLexer", hname);
73 * The lexer is initialized with the buffer.
75 public HostNameParser(LexerCore lexer) {
76 this.lexer = lexer;
77 lexer.selectLexer("charLexer");
89 lexer.consumeValidChars(VALID_DOMAIN_LABEL_CHAR);
104 while (lexer.hasMoreChars()) {
105 char la = lexer.lookAhead(0);
110 lexer.consume(1);
113 lexer.consume(1);
118 lexer.consume(1);
120 String rest = lexer.getRest();
136 lexer.consume(stripLen+1);
146 while (lexer.hasMoreChars())
148 char la = lexer.lookAhead(0);
151 lexer.consume(1);
154 lexer.consume(1);
163 lexer.getBuffer() + ": Illegal Host name ",
164 lexer.getPtr());
178 if (lexer.lookAhead(0) == '[') {
182 else if( isIPv6Address(lexer.getRest()) )
184 int startPtr = lexer.getPtr();
185 lexer.consumeValidChars(
189 lexer.getBuffer().substring(startPtr, lexer.getPtr()))
194 int startPtr = lexer.getPtr();
196 hostname = lexer.getBuffer().substring(startPtr, lexer.getPtr());
201 lexer.getBuffer() + ": Missing host name",
202 lexer.getPtr());
225 int hostEnd = uriHeader.indexOf(Lexer.QUESTION);
229 int semiColonIndex = uriHeader.indexOf(Lexer.SEMICOLON);
242 int firstColonIndex = host.indexOf(Lexer.COLON);
247 int secondColonIndex = host.indexOf(Lexer.COLON, firstColonIndex + 1);
269 if (allowWS) lexer.SPorHT(); // white space before ":port" should be accepted
270 if (lexer.hasMoreChars()) {
271 char la = lexer.lookAhead(0);
275 lexer.consume(1);
276 if (allowWS) lexer.SPorHT(); // white space before port number should be accepted
278 String port = lexer.number();
282 lexer.getBuffer() + " :Error parsing port ",
283 lexer.getPtr());
306 throw new ParseException( lexer.getBuffer() +
307 " Illegal character in hostname:" + lexer.lookAhead(0),
308 lexer.getPtr() );