case LITERAL_module: case LITERAL_namespace: case XQUERY: case VERSION: case LITERAL_default: case LITERAL_function: case LITERAL_variable: case LITERAL_element: case LITERAL_import: case LITERAL_at: case LITERAL_as: case LITERAL_empty: case LITERAL_item: case LITERAL_for: case LITERAL_let: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_order: case LITERAL_by: case LITERAL_then: case LITERAL_else: case LITERAL_or: case LITERAL_and: case LITERAL_cast: case LITERAL_is: case LITERAL_isnot: case LITERAL_to: case LITERAL_div: case LITERAL_mod: case LITERAL_union: case LITERAL_intersect: case LITERAL_except: case LITERAL_text: case LITERAL_node: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 124: case 125: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 129: case 130: case LITERAL_comment: case LITERAL_document: case LITERAL_collection: case LITERAL_preceding: { name=reservedKeywords(); astFactory.addASTChild(currentAST, returnAST); ncnameOrKeyword_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } returnAST = ncnameOrKeyword_AST; return name; } finally { traceOut("ncnameOrKeyword");
ncnameOrKeyword_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break;
	public final String  ncnameOrKeyword() throws RecognitionException, TokenStreamException {		String name;				traceIn("ncnameOrKeyword");		try { // debugging			returnAST = null;			ASTPair currentAST = new ASTPair();			org.exist.xquery.parser.XQueryAST ncnameOrKeyword_AST = null;			Token  n1 = null;			org.exist.xquery.parser.XQueryAST n1_AST = null;			name= null;						switch ( LA(1)) {			case NCNAME:			{				n1 = LT(1);				n1_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(n1);				astFactory.addASTChild(currentAST, n1_AST);				match(NCNAME);				if ( inputState.guessing==0 ) {					name= n1.getText();				}				ncnameOrKeyword_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;				break;			}			case LITERAL_module:			case LITERAL_namespace:			case XQUERY:			case VERSION:			case LITERAL_default:			case LITERAL_function:			case LITERAL_variable:			case LITERAL_element:			case LITERAL_import:			case LITERAL_at:			case LITERAL_as:			case LITERAL_empty:			case LITERAL_item:			case LITERAL_for:			case LITERAL_let:			case LITERAL_some:			case LITERAL_every:			case LITERAL_if:			case LITERAL_return:			case LITERAL_order:			case LITERAL_by:			case LITERAL_then:			case LITERAL_else:			case LITERAL_or:			case LITERAL_and:			case LITERAL_cast:			case LITERAL_is:			case LITERAL_isnot:			case LITERAL_to:			case LITERAL_div:			case LITERAL_mod:			case LITERAL_union:			case LITERAL_intersect:			case LITERAL_except:			case LITERAL_text:			case LITERAL_node:			case LITERAL_child:			case LITERAL_self:			case LITERAL_attribute:			case LITERAL_descendant:			case 124:			case 125:			case LITERAL_following:			case LITERAL_parent:			case LITERAL_ancestor:			case 129:			case 130:			case LITERAL_comment:			case LITERAL_document:			case LITERAL_collection:			case LITERAL_preceding:			{				name=reservedKeywords();				astFactory.addASTChild(currentAST, returnAST);				ncnameOrKeyword_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;				break;			}			default:			{				throw new NoViableAltException(LT(1), getFilename());			}			}			returnAST = ncnameOrKeyword_AST;			return name;		} finally { // debugging			traceOut("ncnameOrKeyword");		}	}