case LITERAL_element:
case LITERAL_node:
	public final void sequenceType(AST _t,		SequenceType type	) throws RecognitionException, XPathException {				org.exist.xquery.parser.XQueryAST sequenceType_AST_in = (_t == ASTNULL) ? null : (org.exist.xquery.parser.XQueryAST)_t;		org.exist.xquery.parser.XQueryAST t = null;		org.exist.xquery.parser.XQueryAST qn1 = null;		org.exist.xquery.parser.XQueryAST qn2 = null;				{		if (_t==null) _t=ASTNULL;		switch ( _t.getType()) {		case ATOMIC_TYPE:		{			AST __t45 = _t;			t = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t;			match(_t,ATOMIC_TYPE);			_t = _t.getFirstChild();										QName qn= QName.parse(context, t.getText());							int code= Type.getType(qn);							if(!Type.subTypeOf(code, Type.ATOMIC))								throw new XPathException(t, "Type " + qn.toString() + " is not an atomic type");							type.setPrimaryType(code);									_t = __t45;			_t = _t.getNextSibling();			break;		}		case LITERAL_empty:		{			AST __t46 = _t;			org.exist.xquery.parser.XQueryAST tmp39_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,LITERAL_empty);			_t = _t.getFirstChild();										type.setPrimaryType(Type.EMPTY);							type.setCardinality(Cardinality.EMPTY);									_t = __t46;			_t = _t.getNextSibling();			break;		}		case LITERAL_item:		{			AST __t47 = _t;			org.exist.xquery.parser.XQueryAST tmp40_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,LITERAL_item);			_t = _t.getFirstChild();			type.setPrimaryType(Type.ITEM);			_t = __t47;			_t = _t.getNextSibling();			break;		}		case LITERAL_node:		{			AST __t48 = _t;			org.exist.xquery.parser.XQueryAST tmp41_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,LITERAL_node);			_t = _t.getFirstChild();			type.setPrimaryType(Type.NODE);			_t = __t48;			_t = _t.getNextSibling();			break;		}		case LITERAL_element:		{			AST __t49 = _t;			org.exist.xquery.parser.XQueryAST tmp42_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,LITERAL_element);			_t = _t.getFirstChild();			type.setPrimaryType(Type.ELEMENT);			{			if (_t==null) _t=ASTNULL;			switch ( _t.getType()) {			case WILDCARD:			{				org.exist.xquery.parser.XQueryAST tmp43_AST_in = (org.exist.xquery.parser.XQueryAST)_t;				match(_t,WILDCARD);				_t = _t.getNextSibling();				break;			}			case QNAME:			{				qn1 = (org.exist.xquery.parser.XQueryAST)_t;				match(_t,QNAME);				_t = _t.getNextSibling();													QName qname= QName.parse(context, qn1.getText());									type.setNodeName(qname);												{				if (_t==null) _t=ASTNULL;				switch ( _t.getType()) {				case QNAME:				{					org.exist.xquery.parser.XQueryAST tmp44_AST_in = (org.exist.xquery.parser.XQueryAST)_t;					match(_t,QNAME);					_t = _t.getNextSibling();																throwException(qn1, "Tests of the form element(QName, TypeName) are not supported!");															break;				}				case 3:				{					break;				}				default:				{					throw new NoViableAltException(_t);				}				}				}				break;			}			case 3:			{				break;			}			default:			{				throw new NoViableAltException(_t);			}			}			}			_t = __t49;			_t = _t.getNextSibling();			break;		}		case ATTRIBUTE_TEST:		{			AST __t52 = _t;			org.exist.xquery.parser.XQueryAST tmp45_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,ATTRIBUTE_TEST);			_t = _t.getFirstChild();			type.setPrimaryType(Type.ATTRIBUTE);			{			if (_t==null) _t=ASTNULL;			switch ( _t.getType()) {			case WILDCARD:			{				org.exist.xquery.parser.XQueryAST tmp46_AST_in = (org.exist.xquery.parser.XQueryAST)_t;				match(_t,WILDCARD);				_t = _t.getNextSibling();				break;			}			case QNAME:			{				qn2 = (org.exist.xquery.parser.XQueryAST)_t;				match(_t,QNAME);				_t = _t.getNextSibling();													QName qname= QName.parse(context, qn2.getText());									type.setNodeName(qname);												{				if (_t==null) _t=ASTNULL;				switch ( _t.getType()) {				case QNAME:				{					org.exist.xquery.parser.XQueryAST tmp47_AST_in = (org.exist.xquery.parser.XQueryAST)_t;					match(_t,QNAME);					_t = _t.getNextSibling();																throwException(qn1, "Tests of the form attribute(QName, TypeName) are not supported!");															break;				}				case 3:				{					break;				}				default:				{					throw new NoViableAltException(_t);				}				}				}				break;			}			case 3:			{				break;			}			default:			{				throw new NoViableAltException(_t);			}			}			}			_t = __t52;			_t = _t.getNextSibling();			break;		}		case LITERAL_text:		{			AST __t55 = _t;			org.exist.xquery.parser.XQueryAST tmp48_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,LITERAL_text);			_t = _t.getFirstChild();			type.setPrimaryType(Type.TEXT);			_t = __t55;			_t = _t.getNextSibling();			break;		}		case 141:		{			AST __t56 = _t;			org.exist.xquery.parser.XQueryAST tmp49_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,141);			_t = _t.getFirstChild();			type.setPrimaryType(Type.PROCESSING_INSTRUCTION);			_t = __t56;			_t = _t.getNextSibling();			break;		}		case LITERAL_comment:		{			AST __t57 = _t;			org.exist.xquery.parser.XQueryAST tmp50_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,LITERAL_comment);			_t = _t.getFirstChild();			type.setPrimaryType(Type.COMMENT);			_t = __t57;			_t = _t.getNextSibling();			break;		}		case 142:		{			AST __t58 = _t;			org.exist.xquery.parser.XQueryAST tmp51_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,142);			_t = _t.getFirstChild();			type.setPrimaryType(Type.DOCUMENT);			_t = __t58;			_t = _t.getNextSibling();			break;		}		default:		{			throw new NoViableAltException(_t);		}		}		}		{		if (_t==null) _t=ASTNULL;		switch ( _t.getType()) {		case STAR:		{			org.exist.xquery.parser.XQueryAST tmp52_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,STAR);			_t = _t.getNextSibling();			type.setCardinality(Cardinality.ZERO_OR_MORE);			break;		}		case PLUS:		{			org.exist.xquery.parser.XQueryAST tmp53_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,PLUS);			_t = _t.getNextSibling();			type.setCardinality(Cardinality.ONE_OR_MORE);			break;		}		case QUESTION:		{			org.exist.xquery.parser.XQueryAST tmp54_AST_in = (org.exist.xquery.parser.XQueryAST)_t;			match(_t,QUESTION);			_t = _t.getNextSibling();			type.setCardinality(Cardinality.ZERO_OR_ONE);			break;		}		case 3:		{			break;		}		default:		{			throw new NoViableAltException(_t);		}		}		}		_retTree = _t;	}