try {
// -------------------------------------------------------
// Get the menu definition file and create a parser for it
// -------------------------------------------------------
in = getClass().getResourceAsStream(menuFile);
SimpleParser parser = new SimpleParser(words, in);
// ----------------------------------------------------------
// Go recursively through the menus searching the desired one
// ----------------------------------------------------------
SimpleParser.Entity entity;
while((entity = parser.readEntity()) != null) {
if(entity.getKeyword() == MENU) {
// Get the next main menu and push it to the stack
SimpleParser.Record mainMenu = entity.getRecord();
menus.push(mainMenu);
if(searchMenuPath(menus, upItems, tabSetId)) {