push(action.defineVariable(def, id));
push(action.defineSymbol(QUERY, def, id));
	public final void definequerystate(AST _t) throws RecognitionException {				AST definequerystate_AST_in = (_t == ASTNULL) ? null : (AST)_t;		AST def = null;		AST id = null;				AST __t952 = _t;		def = _t==ASTNULL ? null :(AST)_t;		match(_t,DEFINE);		_t = _t.getFirstChild();		{		if (_t==null) _t=ASTNULL;		switch ( _t.getType()) {		case NEW:		{			AST __t954 = _t;			AST tmp792_AST_in = (AST)_t;			match(_t,NEW);			_t = _t.getFirstChild();			{			if (_t==null) _t=ASTNULL;			switch ( _t.getType()) {			case GLOBAL:			{				AST tmp793_AST_in = (AST)_t;				match(_t,GLOBAL);				_t = _t.getNextSibling();				break;			}			case SHARED:			{				break;			}			default:			{				throw new NoViableAltException(_t);			}			}			}			AST tmp794_AST_in = (AST)_t;			match(_t,SHARED);			_t = _t.getNextSibling();			_t = __t954;			_t = _t.getNextSibling();			break;		}		case SHARED:		{			AST tmp795_AST_in = (AST)_t;			match(_t,SHARED);			_t = _t.getNextSibling();			break;		}		case QUERY:		{			break;		}		default:		{			throw new NoViableAltException(_t);		}		}		}		AST tmp796_AST_in = (AST)_t;		match(_t,QUERY);		_t = _t.getNextSibling();		id = (AST)_t;		match(_t,ID);		_t = _t.getNextSibling();		if ( inputState.guessing==0 ) {			push(action.defineVariable(def, id));		}		AST tmp797_AST_in = (AST)_t;		match(_t,FOR);		_t = _t.getNextSibling();		tbl(_t,CQ.INIT);		_t = _retTree;		{		if (_t==null) _t=ASTNULL;		switch ( _t.getType()) {		case EXCEPT:		case FIELDS:		{			record_fields(_t);			_t = _retTree;			break;		}		case EOF:		case PERIOD:		case CACHE:		case RCODEINFORMATION:		case SCROLLING:		case COMMA:		{			break;		}		default:		{			throw new NoViableAltException(_t);		}		}		}		{		_loop959:		do {			if (_t==null) _t=ASTNULL;			if ((_t.getType()==COMMA)) {				AST tmp798_AST_in = (AST)_t;				match(_t,COMMA);				_t = _t.getNextSibling();				tbl(_t,CQ.INIT);				_t = _retTree;				{				if (_t==null) _t=ASTNULL;				switch ( _t.getType()) {				case EXCEPT:				case FIELDS:				{					record_fields(_t);					_t = _retTree;					break;				}				case EOF:				case PERIOD:				case CACHE:				case RCODEINFORMATION:				case SCROLLING:				case COMMA:				{					break;				}				default:				{					throw new NoViableAltException(_t);				}				}				}			}			else {				break _loop959;			}					} while (true);		}		{		_loop962:		do {			if (_t==null) _t=ASTNULL;			switch ( _t.getType()) {			case CACHE:			{				AST __t961 = _t;				AST tmp799_AST_in = (AST)_t;				match(_t,CACHE);				_t = _t.getFirstChild();				expression(_t);				_t = _retTree;				_t = __t961;				_t = _t.getNextSibling();				break;			}			case SCROLLING:			{				AST tmp800_AST_in = (AST)_t;				match(_t,SCROLLING);				_t = _t.getNextSibling();				break;			}			case RCODEINFORMATION:			{				AST tmp801_AST_in = (AST)_t;				match(_t,RCODEINFORMATION);				_t = _t.getNextSibling();				break;			}			default:			{				break _loop962;			}			}		} while (true);		}		state_end(_t);		_t = _retTree;		_t = __t952;		_t = _t.getNextSibling();		if ( inputState.guessing==0 ) {			action.addToScope(pop());		}		_retTree = _t;	}