throw new XPathException(qn_AST, "found wrong closing tag: " + name);
throw new XPathException(qn_AST, "found additional closing tag: " + name);
	public final void elementWithoutAttributes() throws RecognitionException, TokenStreamException, XPathException {				returnAST = null;		ASTPair currentAST = new ASTPair();		org.exist.xquery.parser.XQueryAST elementWithoutAttributes_AST = null;		org.exist.xquery.parser.XQueryAST q_AST = null;		org.exist.xquery.parser.XQueryAST content_AST = null;		org.exist.xquery.parser.XQueryAST qn_AST = null;		String name= null;				org.exist.xquery.parser.XQueryAST tmp305_AST = null;		tmp305_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1));		astFactory.addASTChild(currentAST, tmp305_AST);		match(LT);		name=qName();		q_AST = (org.exist.xquery.parser.XQueryAST)returnAST;		astFactory.addASTChild(currentAST, returnAST);		{		switch ( LA(1)) {		case SLASH:		{			{			match(SLASH);			match(GT);			if ( inputState.guessing==0 ) {				elementWithoutAttributes_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;												//lexer.wsExplicit= false;								if (!elementStack.isEmpty())									lexer.inElementContent= true;								elementWithoutAttributes_AST= (org.exist.xquery.parser.XQueryAST)astFactory.create(ELEMENT,name);											currentAST.root = elementWithoutAttributes_AST;				currentAST.child = elementWithoutAttributes_AST!=null &&elementWithoutAttributes_AST.getFirstChild()!=null ?					elementWithoutAttributes_AST.getFirstChild() : elementWithoutAttributes_AST;				currentAST.advanceChildToEnd();			}			}			break;		}		case GT:		{			{			match(GT);			if ( inputState.guessing==0 ) {												elementStack.push(name);								lexer.inElementContent= true;										}			mixedElementContent();			content_AST = (org.exist.xquery.parser.XQueryAST)returnAST;			astFactory.addASTChild(currentAST, returnAST);			match(END_TAG_START);			name=qName();			qn_AST = (org.exist.xquery.parser.XQueryAST)returnAST;			match(GT);			if ( inputState.guessing==0 ) {				elementWithoutAttributes_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;												if (elementStack.isEmpty())									throw new XPathException(qn_AST, "found wrong closing tag: " + name);								String prev= (String) elementStack.pop();								if (!prev.equals(name))									throw new XPathException(qn_AST, "found closing tag: " + name + "; expected: " + prev);								elementWithoutAttributes_AST= (org.exist.xquery.parser.XQueryAST)astFactory.make( (new ASTArray(2)).add((org.exist.xquery.parser.XQueryAST)astFactory.create(ELEMENT,name)).add(content_AST));								if (!elementStack.isEmpty()) {									lexer.inElementContent= true;									//lexer.wsExplicit= false;								}											currentAST.root = elementWithoutAttributes_AST;				currentAST.child = elementWithoutAttributes_AST!=null &&elementWithoutAttributes_AST.getFirstChild()!=null ?					elementWithoutAttributes_AST.getFirstChild() : elementWithoutAttributes_AST;				currentAST.advanceChildToEnd();			}			}			break;		}		default:		{			throw new NoViableAltException(LT(1), getFilename());		}		}		}		if ( inputState.guessing==0 ) {			elementWithoutAttributes_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;			elementWithoutAttributes_AST.copyLexInfo(q_AST);		}		elementWithoutAttributes_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;		returnAST = elementWithoutAttributes_AST;	}