{
boolean synPredMatched315 = false; if (((LA(1)==LCURLY))) { int _m315 = mark(); synPredMatched315 = true; inputState.guessing++; try { { match(LCURLY); match(LCURLY); } } catch (RecognitionException pe) { synPredMatched315 = false; } rewind(_m315); inputState.guessing--; } if ( synPredMatched315 ) { org.exist.xquery.parser.XQueryAST tmp325_AST = null; tmp325_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp325_AST); match(LCURLY); org.exist.xquery.parser.XQueryAST tmp326_AST = null; tmp326_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp326_AST); match(LCURLY); if ( inputState.guessing==0 ) { elementContent_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;  lexer.inElementContent= true; elementContent_AST= (org.exist.xquery.parser.XQueryAST)astFactory.create(TEXT,"{");  currentAST.root = elementContent_AST; currentAST.child = elementContent_AST!=null &&elementContent_AST.getFirstChild()!=null ? elementContent_AST.getFirstChild() : elementContent_AST; currentAST.advanceChildToEnd(); } elementContent_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; } else if ((LA(1)==LCURLY)) { enclosedExpr(); astFactory.addASTChild(currentAST, returnAST); elementContent_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; } else {
	public final void elementContent() throws RecognitionException, TokenStreamException, XPathException {				returnAST = null;		ASTPair currentAST = new ASTPair();		org.exist.xquery.parser.XQueryAST elementContent_AST = null;		Token  content = null;		org.exist.xquery.parser.XQueryAST content_AST = null;				switch ( LA(1)) {		case LT:		{			elementConstructor();			astFactory.addASTChild(currentAST, returnAST);			elementContent_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;			break;		}		case ELEMENT_CONTENT:		{			content = LT(1);			content_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(content);			astFactory.addASTChild(currentAST, content_AST);			match(ELEMENT_CONTENT);			if ( inputState.guessing==0 ) {				elementContent_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;				elementContent_AST= (org.exist.xquery.parser.XQueryAST)astFactory.create(TEXT,content.getText());				currentAST.root = elementContent_AST;				currentAST.child = elementContent_AST!=null &&elementContent_AST.getFirstChild()!=null ?					elementContent_AST.getFirstChild() : elementContent_AST;				currentAST.advanceChildToEnd();			}			elementContent_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;			break;		}		case XML_COMMENT:		{			xmlComment();			astFactory.addASTChild(currentAST, returnAST);			elementContent_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;			break;		}		case XML_CDATA:		{			cdataSection();			astFactory.addASTChild(currentAST, returnAST);			elementContent_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;			break;		}		case LCURLY:		{			enclosedExpr();			astFactory.addASTChild(currentAST, returnAST);			elementContent_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;			break;		}		default:		{			throw new NoViableAltException(LT(1), getFilename());		}		}		returnAST = elementContent_AST;	}