{ switch ( LA(1)) { case QUOT: { match(QUOT); if ( inputState.guessing==0 ) { lexer.inAttributeContent= true; } attributeValue(); astFactory.addASTChild(currentAST, returnAST); if ( inputState.guessing==0 ) { lexer.inAttributeContent= false; } match(QUOT); if ( inputState.guessing==0 ) {  lexer.parseStringLiterals= true; lexer.inAttributeContent= false;  } break; } case APOS: { match(APOS); if ( inputState.guessing==0 ) { lexer.inAttributeContent= true; } attributeValue(); astFactory.addASTChild(currentAST, returnAST); match(APOS); if ( inputState.guessing==0 ) {  lexer.parseStringLiterals= true; lexer.inAttributeContent= false;  } break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } }
attributeValue(); astFactory.addASTChild(currentAST, returnAST);
	public final void attributeDef() throws RecognitionException, TokenStreamException, XPathException {				returnAST = null;		ASTPair currentAST = new ASTPair();		org.exist.xquery.parser.XQueryAST attributeDef_AST = null;		org.exist.xquery.parser.XQueryAST q_AST = null;					String name= null;			lexer.parseStringLiterals= false;						name=qName();		q_AST = (org.exist.xquery.parser.XQueryAST)returnAST;		match(EQ);		{		switch ( LA(1)) {		case QUOT:		{			match(QUOT);			if ( inputState.guessing==0 ) {				lexer.inAttributeContent= true;			}			attributeValue();			astFactory.addASTChild(currentAST, returnAST);			if ( inputState.guessing==0 ) {				lexer.inAttributeContent= false;			}			match(QUOT);			if ( inputState.guessing==0 ) {											lexer.parseStringLiterals= true;							lexer.inAttributeContent= false;									}			break;		}		case APOS:		{			match(APOS);			if ( inputState.guessing==0 ) {				lexer.inAttributeContent= true;			}			attributeValue();			astFactory.addASTChild(currentAST, returnAST);			match(APOS);			if ( inputState.guessing==0 ) {											lexer.parseStringLiterals= true;							lexer.inAttributeContent= false;									}			break;		}		default:		{			throw new NoViableAltException(LT(1), getFilename());		}		}		}		if ( inputState.guessing==0 ) {			attributeDef_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;								attributeDef_AST= (org.exist.xquery.parser.XQueryAST)astFactory.make( (new ASTArray(2)).add((org.exist.xquery.parser.XQueryAST)astFactory.create(ATTRIBUTE,name)).add(attributeDef_AST));					attributeDef_AST.copyLexInfo(q_AST);							currentAST.root = attributeDef_AST;			currentAST.child = attributeDef_AST!=null &&attributeDef_AST.getFirstChild()!=null ?				attributeDef_AST.getFirstChild() : attributeDef_AST;			currentAST.advanceChildToEnd();		}		attributeDef_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root;		returnAST = attributeDef_AST;	}