public final DeclaratorContext declarator() throws RecognitionException {
		DeclaratorContext _localctx = new DeclaratorContext(_ctx, getState());
		enterRule(_localctx, 102, RULE_declarator);
		int _la;
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			setState(749);
			_la = _input.LA(1);
			if (_la==Star || _la==Caret) {
				{
				setState(748); pointer();
				}
			}

			setState(751); directDeclarator(0);
			 
					String name=_localctx.getText();
					
						
					if(name.indexOf('(')==-1&& name.indexOf('[')==-1){
					
						if(!globalLists.get(1).contains(name))
						globalLists.get(1).add(name);
					}
					else{
						if(name.indexOf('(')!=-1){
							name=name.substring(0,name.indexOf('('));
							if(!globalLists.get(1).contains(name))
							globalLists.get(1).add(name);
						}else{
							name=name.substring(0,name.indexOf('['));
							if(!globalLists.get(1).contains(name))
							
							globalLists.get(1).add(name);
						}
						
					}
					
				
				
			setState(756);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,57,_ctx);
			while ( _alt!=2 && _alt!=-1 ) {
				if ( _alt==1 ) {
					{
					{
					setState(753); gccDeclaratorExtension();
					}
					} 
				}
				setState(758);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,57,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}