if (inctokenizer!=null) processPorts(template, inctokenizer, include_filename, new PathSpecification(file.getParentFile().getAbsolutePath()));
if (inctokenizer!=null) processPorts(template, inctokenizer, include_filename, new PathSpecification(file.getParentFile().getAbsolutePath(), paths));
public static void processPorts(DBTemplate template, EnhancedStreamTokenizer tokenizer, String fileName, PathSpecification paths) throws Exception {	String name;	String value;	String description;	String include_filename;	String comment = nullString;	EnhancedStreamTokenizer inctokenizer = null;		if (template!=null)		/********************** ports area *************************/			while (tokenizer.nextToken() != EnhancedStreamTokenizer.TT_EOF) 		if (tokenizer.ttype == EnhancedStreamTokenizer.TT_WORD) 			if (tokenizer.sval.equals(ENDSTR)) break;			else if (tokenizer.sval.startsWith(DBConstants.commentString)) 				comment+=processTemplateComment(template, tokenizer, fileName);			else if (tokenizer.sval.equalsIgnoreCase(PORT)) {				// read name				tokenizer.nextToken();				if ((tokenizer.ttype == EnhancedStreamTokenizer.TT_WORD) ||					(tokenizer.ttype == DBConstants.quoteChar)) name=tokenizer.sval;				else throw (new DBParseException("Invalid port name...", tokenizer, fileName));									// read field				tokenizer.nextToken();				if ((tokenizer.ttype == EnhancedStreamTokenizer.TT_WORD) ||					(tokenizer.ttype == DBConstants.quoteChar)) value=tokenizer.sval;				else throw (new DBParseException("Invalid port value...", tokenizer, fileName));				// read optional description				description = null;				tokenizer.nextToken();				if (tokenizer.ttype == DBConstants.quoteChar) description=tokenizer.sval;				else					tokenizer.pushBack();				//System.out.println("\tport("+name+", \""+value+"\", \""+description+"\")");				DBPort port = new DBPort(name, value);				port.setComment(comment); comment = nullString;				port.setDescription(description);								template.addPort(port);			}			else if (tokenizer.sval.equalsIgnoreCase(INCLUDE)) {				// read incude_filename				tokenizer.nextToken();				if (tokenizer.ttype == DBConstants.quoteChar) include_filename=tokenizer.sval;				else throw (new DBParseException("Invalid include filename...", tokenizer, fileName));				File file = paths.search4File(include_filename);				inctokenizer = getEnhancedStreamTokenizer(file.getAbsolutePath());				if (inctokenizer!=null) processPorts(template, inctokenizer, include_filename, new PathSpecification(file.getParentFile().getAbsolutePath()));			}								/***********************************************************/}