Ejemplo n.º 1
0
        public ArglistContext arglist()
        {
            ArglistContext _localctx = new ArglistContext(_ctx, State);

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

            try {
                EnterOuterAlt(_localctx, 1);
                {
                    State = 41; expression(0);
                    State = 44;
                    _errHandler.Sync(this);
                    _la = _input.La(1);
                    do
                    {
                        {
                            {
                                State = 42; Match(T__0);
                                State = 43; expression(0);
                            }
                        }
                        State = 46;
                        _errHandler.Sync(this);
                        _la = _input.La(1);
                    } while (_la == T__0);
                }
            }
            catch (RecognitionException re) {
                _localctx.exception = re;
                _errHandler.ReportError(this, re);
                _errHandler.Recover(this, re);
            }
            finally {
                ExitRule();
            }
            return(_localctx);
        }
Ejemplo n.º 2
0
	public ArglistContext arglist() {
		ArglistContext _localctx = new ArglistContext(Context, State);
		EnterRule(_localctx, 148, RULE_arglist);
		int _la;
		try {
			int _alt;
			EnterOuterAlt(_localctx, 1);
			{
			State = 986;
			ErrorHandler.Sync(this);
			_alt = Interpreter.AdaptivePredict(TokenStream,137,Context);
			while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.InvalidAltNumber ) {
				if ( _alt==1 ) {
					{
					{
					State = 981; argument();
					State = 982; Match(COMMA);
					}
					} 
				}
				State = 988;
				ErrorHandler.Sync(this);
				_alt = Interpreter.AdaptivePredict(TokenStream,137,Context);
			}
			State = 1009;
			switch ( Interpreter.AdaptivePredict(TokenStream,141,Context) ) {
			case 1:
				{
				State = 989; argument();
				State = 991;
				_la = TokenStream.La(1);
				if (_la==COMMA) {
					{
					State = 990; Match(COMMA);
					}
				}

				}
				break;
			case 2:
				{
				State = 993; Match(STAR);
				State = 994; test();
				State = 999;
				ErrorHandler.Sync(this);
				_alt = Interpreter.AdaptivePredict(TokenStream,139,Context);
				while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.InvalidAltNumber ) {
					if ( _alt==1 ) {
						{
						{
						State = 995; Match(COMMA);
						State = 996; argument();
						}
						} 
					}
					State = 1001;
					ErrorHandler.Sync(this);
					_alt = Interpreter.AdaptivePredict(TokenStream,139,Context);
				}
				State = 1005;
				_la = TokenStream.La(1);
				if (_la==COMMA) {
					{
					State = 1002; Match(COMMA);
					State = 1003; Match(POWER);
					State = 1004; test();
					}
				}

				}
				break;
			case 3:
				{
				State = 1007; Match(POWER);
				State = 1008; test();
				}
				break;
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			ErrorHandler.ReportError(this, re);
			ErrorHandler.Recover(this, re);
		}
		finally {
			ExitRule();
		}
		return _localctx;
	}