public SIPHeader parse() throws ParseException { // past the header name and the colon. headerName(TokenTypes.CONTACT); ContactList retval = new ContactList(); while (true) { Contact contact = new Contact(); if (lexer.lookAhead(0) == '*') { this.lexer.match('*'); contact.setWildCardFlag(true); } else super.parse(contact); retval.add(contact); this.lexer.SPorHT(); if (lexer.lookAhead(0) == ',') { this.lexer.match(','); this.lexer.SPorHT(); } else if (lexer.lookAhead(0) == '\n') break; else throw createParseException("unexpected char"); } return retval; }