* @return SIPHeader the RecordRoute List object
* @throws ParseException if errors occur during the parsing
*/
public SIPHeader parse() throws ParseException {
ServiceRouteList serviceRouteList = new ServiceRouteList();
if (debug)
dbg_enter("ServiceRouteParser.parse");
try {
this.lexer.match(TokenTypes.SERVICE_ROUTE);
this.lexer.SPorHT();
this.lexer.match(':');
this.lexer.SPorHT();
while (true) {
ServiceRoute serviceRoute = new ServiceRoute();
super.parse(serviceRoute);
serviceRouteList.add(serviceRoute);
this.lexer.SPorHT();
if (lexer.lookAhead(0) == ',') {
this.lexer.match(',');
this.lexer.SPorHT();
} else if (lexer.lookAhead(0) == '\n')