boolean synPredMatched225 = false;
boolean synPredMatched226 = false;
	public final void primaryExpr() throws RecognitionException, TokenStreamException, XPathException {				returnAST = null;		ASTPair currentAST = new ASTPair();		org.exist.xquery.parser.XQueryAST primaryExpr_AST = null;		org.exist.xquery.parser.XQueryAST v_AST = null;		String varName= null;				switch ( LA(1)) {		case LT:		case XML_COMMENT:		case XML_PI:		{			directConstructor();			astFactory.addASTChild(currentAST, returnAST);			primaryExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;			break;		}		case SELF:		{			contextItemExpr();			astFactory.addASTChild(currentAST, returnAST);			primaryExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;			break;		}		case LPAREN:		{			parenthesizedExpr();			astFactory.addASTChild(currentAST, returnAST);			primaryExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;			break;		}		case DOLLAR:		{			match(DOLLAR);			varName=qName();			v_AST = (org.exist.xquery.parser.XQueryAST)returnAST;			astFactory.addASTChild(currentAST, returnAST);			if ( inputState.guessing==0 ) {				primaryExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;								primaryExpr_AST= (org.exist.xquery.parser.XQueryAST)astFactory.create(VARIABLE_REF,varName);				primaryExpr_AST.copyLexInfo(v_AST);								currentAST.root = primaryExpr_AST;				currentAST.child = primaryExpr_AST!=null &&primaryExpr_AST.getFirstChild()!=null ?					primaryExpr_AST.getFirstChild() : primaryExpr_AST;				currentAST.advanceChildToEnd();			}			primaryExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;			break;		}		case STRING_LITERAL:		case DOUBLE_LITERAL:		case DECIMAL_LITERAL:		case INTEGER_LITERAL:		{			literal();			astFactory.addASTChild(currentAST, returnAST);			primaryExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;			break;		}		default:			boolean synPredMatched225 = false;			if (((_tokenSet_10.member(LA(1))))) {				int _m225 = mark();				synPredMatched225 = true;				inputState.guessing++;				try {					{					{					switch ( LA(1)) {					case LITERAL_element:					{						match(LITERAL_element);						break;					}					case LITERAL_attribute:					{						match(LITERAL_attribute);						break;					}					case LITERAL_text:					{						match(LITERAL_text);						break;					}					case LITERAL_document:					{						match(LITERAL_document);						break;					}					case 138:					{						match(138);						break;					}					case LITERAL_comment:					{						match(LITERAL_comment);						break;					}					default:					{						throw new NoViableAltException(LT(1), getFilename());					}					}					}					match(LCURLY);					}				}				catch (RecognitionException pe) {					synPredMatched225 = false;				}				rewind(_m225);				inputState.guessing--;			}			if ( synPredMatched225 ) {				computedConstructor();				astFactory.addASTChild(currentAST, returnAST);				primaryExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;			}			else {				boolean synPredMatched228 = false;				if (((_tokenSet_10.member(LA(1))))) {					int _m228 = mark();					synPredMatched228 = true;					inputState.guessing++;					try {						{						{						switch ( LA(1)) {						case LITERAL_element:						{							match(LITERAL_element);							break;						}						case LITERAL_attribute:						{							match(LITERAL_attribute);							break;						}						case 138:						{							match(138);							break;						}						case LITERAL_namespace:						{							match(LITERAL_namespace);							break;						}						default:						{							throw new NoViableAltException(LT(1), getFilename());						}						}						}						qName();						match(LCURLY);						}					}					catch (RecognitionException pe) {						synPredMatched228 = false;					}					rewind(_m228);					inputState.guessing--;				}				if ( synPredMatched228 ) {					computedConstructor();					astFactory.addASTChild(currentAST, returnAST);					primaryExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;				}				else if ((_tokenSet_1.member(LA(1)))) {					functionCall();					astFactory.addASTChild(currentAST, returnAST);					primaryExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;				}			else {				throw new NoViableAltException(LT(1), getFilename());			}			}}			returnAST = primaryExpr_AST;		}