include_filename = com.cosylab.vdct.util.StringUtils.replaceFileName(fileName, include_filename);
if (!(include_filename.charAt(0)=='/' || include_filename.charAt(0)=='\\' || (include_filename.length()>1 && include_filename.charAt(1)==':'))) include_filename = com.cosylab.vdct.util.StringUtils.replaceFileName(fileName, include_filename);
public static void processDB(DBData rootData, StreamTokenizer tokenizer, String fileName) {		DBRecordData rd;	String comment = "";	String str; int t;	String include_filename;	StreamTokenizer inctokenizer = null;	DBData data = rootData;	if (data!=null)		try {				while (tokenizer.nextToken() != tokenizer.TT_EOF)  		  if (tokenizer.ttype == tokenizer.TT_WORD)			if (tokenizer.sval.startsWith(DBConstants.commentString))			{				comment+=processComment(rootData, tokenizer, fileName);				// only template definition od depth 1 are supported				// (use stack od DBData-s otherwise)				if (templateData!=null)					data = templateData.getData();				else					data = rootData;			}			else				/****************** records ********************/				if (tokenizer.sval.equalsIgnoreCase(RECORD) ||					tokenizer.sval.equalsIgnoreCase(GRECORD)) {								rd = new DBRecordData();					// read record_type					tokenizer.nextToken();					if ((tokenizer.ttype == tokenizer.TT_WORD) ||						(tokenizer.ttype == DBConstants.quoteChar)) rd.setRecord_type(tokenizer.sval);					else throw (new DBParseException("Invalid record_type...", tokenizer, fileName));					// read record_name					tokenizer.nextToken();					if ((tokenizer.ttype == tokenizer.TT_WORD) ||						(tokenizer.ttype == DBConstants.quoteChar)) rd.setName(tokenizer.sval);					else throw (new DBParseException("Invalid record_name...", tokenizer, fileName));					rd.setComment(comment);	comment = "";										processFields(rd, tokenizer, fileName);					data.addRecord(rd);									}				/****************** records ********************/								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));					include_filename = com.cosylab.vdct.util.StringUtils.replaceFileName(fileName, include_filename);										inctokenizer = getStreamTokenizer(include_filename);					if (inctokenizer!=null) processDB(data, inctokenizer, include_filename);				}							/****************** path ********************/				 else if (tokenizer.sval.equalsIgnoreCase(PATH) ||  						  tokenizer.sval.equalsIgnoreCase(ADDPATH))					Console.getInstance().println("Warning: 'path' and 'addpath' commands are not supported...");					} catch (Exception e) {		Console.getInstance().println("\n"+e);	}			// automatically trigger TEMPLATEEND	if (templateData!=null && templateData.getFileName().equals(fileName))		templateEnd(data);}