Exemplo n.º 1
0
        public Parameter_declarationContext parameter_declaration()
        {
            Parameter_declarationContext _localctx = new Parameter_declarationContext(Context, State);

            EnterRule(_localctx, 4, RULE_parameter_declaration);
            int _la;

            try {
                EnterOuterAlt(_localctx, 1);
                {
                    State = 33; Match(T__1);
                    State = 35;
                    ErrorHandler.Sync(this);
                    _la = TokenStream.LA(1);
                    if (_la == NAME)
                    {
                        {
                            State = 34; Match(NAME);
                        }
                    }

                    State = 41;
                    ErrorHandler.Sync(this);
                    _la = TokenStream.LA(1);
                    while (_la == T__2)
                    {
                        {
                            {
                                State = 37; Match(T__2);
                                State = 38; Match(NAME);
                            }
                        }
                        State = 43;
                        ErrorHandler.Sync(this);
                        _la = TokenStream.LA(1);
                    }
                    State = 44; Match(T__3);
                }
            }
            catch (RecognitionException re) {
                _localctx.exception = re;
                ErrorHandler.ReportError(this, re);
                ErrorHandler.Recover(this, re);
            }
            finally {
                ExitRule();
            }
            return(_localctx);
        }
Exemplo n.º 2
0
	public Parameter_declarationContext parameter_declaration() {
		Parameter_declarationContext _localctx = new Parameter_declarationContext(_ctx, State);
		EnterRule(_localctx, 170, RULE_parameter_declaration);
		try {
			EnterOuterAlt(_localctx, 1);
			{
			State = 971; declaration_specifiers();
			State = 976;
			switch ( Interpreter.AdaptivePredict(_input,106,_ctx) ) {
			case 1:
				{
				State = 973;
				switch ( Interpreter.AdaptivePredict(_input,105,_ctx) ) {
				case 1:
					{
					State = 972; declarator();
					}
					break;
				}
				}
				break;

			case 2:
				{
				State = 975; abstract_declarator();
				}
				break;
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.ReportError(this, re);
			_errHandler.Recover(this, re);
		}
		finally {
			ExitRule();
		}
		return _localctx;
	}