inctokenizer = getStreamTokenizer(include_filename); if (inctokenizer!=null) processDBD(data, inctokenizer, include_filename);
public static void processDBD(DBDData data, StreamTokenizer tokenizer, String fileName) {		DBDRecordData rd;	DBDMenuData md;	DBDDeviceData dd;	String include_filename;	StreamTokenizer inctokenizer = null;	if (data!=null) 		try	{				while (tokenizer.nextToken() != tokenizer.TT_EOF)			if (tokenizer.ttype == tokenizer.TT_WORD)				/****************** records ********************/				if (tokenizer.sval.equalsIgnoreCase(RECORDTYPE)) {					rd = new DBDRecordData();					// read record_type					tokenizer.nextToken();					if ((tokenizer.ttype == tokenizer.TT_WORD) ||						(tokenizer.ttype == DBDConstants.quoteChar)) rd.setName(tokenizer.sval);					else throw (new DBDParseException("Invalid record_type...", tokenizer, fileName));					processFields(rd, tokenizer, fileName);					data.addRecord(rd);				}								/******************* menus *********************/				else if (tokenizer.sval.equalsIgnoreCase(MENU)) {					md = new DBDMenuData();					// read menu_name					tokenizer.nextToken();					if ((tokenizer.ttype == tokenizer.TT_WORD) ||						(tokenizer.ttype == DBDConstants.quoteChar)) md.setName(tokenizer.sval);					else throw (new DBDParseException("Invalid menu_name...", tokenizer, fileName));					processMenuChoices(md, tokenizer, fileName);					data.addMenu(md);				}								/******************* devices *********************/				else if (tokenizer.sval.equalsIgnoreCase(DEVICE)) {					dd = new DBDDeviceData();					// read record_type					tokenizer.nextToken();					if ((tokenizer.ttype == tokenizer.TT_WORD) ||						(tokenizer.ttype == DBDConstants.quoteChar)) dd.setRecord_type(tokenizer.sval);					else throw (new DBDParseException("Invalid record_type...", tokenizer, fileName));					// read link_type					tokenizer.nextToken();					if ((tokenizer.ttype == tokenizer.TT_WORD) ||						(tokenizer.ttype == DBDConstants.quoteChar)) dd.setLink_type(tokenizer.sval);					else throw (new DBDParseException("Invalid link_type...", tokenizer, fileName));					// read dset_name					tokenizer.nextToken();					if ((tokenizer.ttype == tokenizer.TT_WORD) ||						(tokenizer.ttype == DBDConstants.quoteChar)) dd.setDset_name(tokenizer.sval);					else throw (new DBDParseException("Invalid dset_name...", tokenizer, fileName));					// read choice_string					tokenizer.nextToken();					if (tokenizer.ttype == DBDConstants.quoteChar) dd.setChoice_string(tokenizer.sval);					else throw (new DBDParseException("Invalid choice_string...", tokenizer, fileName));					data.addDevice(dd);				}								/****************** include ********************/				else if (tokenizer.sval.equalsIgnoreCase(INCLUDE)) {					// read incude_filename					tokenizer.nextToken();					if (tokenizer.ttype == DBDConstants.quoteChar) include_filename=tokenizer.sval;					else throw (new DBDParseException("Invalid include_filename...", tokenizer, fileName));					// if not absulute fileName, do not use relative path					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);					inctokenizer = getStreamTokenizer(include_filename);					if (inctokenizer!=null) processDBD(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 yet supported...");										// driver, breaktable not read	} catch (Exception e) {		Console.getInstance().println("\n"+e);	}		}