Пример #1
0
	public SubscriptContext subscript() {
		SubscriptContext _localctx = new SubscriptContext(Context, State);
		EnterRule(_localctx, 256, RULE_subscript);
		try {
			EnterOuterAlt(_localctx, 1);
			{
			State = 2616;
			switch ( Interpreter.AdaptivePredict(TokenStream,436,Context) ) {
			case 1:
				{
				State = 2611; valueStmt(0);
				State = 2612; Match(WS);
				State = 2613; Match(TO);
				State = 2614; Match(WS);
				}
				break;
			}
			State = 2618; valueStmt(0);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			ErrorHandler.ReportError(this, re);
			ErrorHandler.Recover(this, re);
		}
		finally {
			ExitRule();
		}
		return _localctx;
	}
Пример #2
0
	public SubscriptContext subscript() {
		SubscriptContext _localctx = new SubscriptContext(Context, State);
		EnterRule(_localctx, 136, RULE_subscript);
		int _la;
		try {
			State = 906;
			switch ( Interpreter.AdaptivePredict(TokenStream,122,Context) ) {
			case 1:
				EnterOuterAlt(_localctx, 1);
				{
				State = 895; test();
				}
				break;
			case 2:
				EnterOuterAlt(_localctx, 2);
				{
				State = 897;
				_la = TokenStream.La(1);
				if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & ((1L << (LAMBDA - 20)) | (1L << (NOT - 20)) | (1L << (NONE - 20)) | (1L << (TRUE - 20)) | (1L << (FALSE - 20)) | (1L << (NAME - 20)) | (1L << (STRING_LITERAL - 20)) | (1L << (BYTES_LITERAL - 20)) | (1L << (DECIMAL_INTEGER - 20)) | (1L << (OCT_INTEGER - 20)) | (1L << (HEX_INTEGER - 20)) | (1L << (BIN_INTEGER - 20)) | (1L << (FLOAT_NUMBER - 20)) | (1L << (IMAG_NUMBER - 20)) | (1L << (ELLIPSIS - 20)) | (1L << (STAR - 20)) | (1L << (OPEN_PAREN - 20)) | (1L << (OPEN_BRACK - 20)) | (1L << (ADD - 20)) | (1L << (MINUS - 20)) | (1L << (NOT_OP - 20)) | (1L << (OPEN_BRACE - 20)))) != 0)) {
					{
					State = 896; test();
					}
				}

				State = 899; Match(COLON);
				State = 901;
				_la = TokenStream.La(1);
				if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & ((1L << (LAMBDA - 20)) | (1L << (NOT - 20)) | (1L << (NONE - 20)) | (1L << (TRUE - 20)) | (1L << (FALSE - 20)) | (1L << (NAME - 20)) | (1L << (STRING_LITERAL - 20)) | (1L << (BYTES_LITERAL - 20)) | (1L << (DECIMAL_INTEGER - 20)) | (1L << (OCT_INTEGER - 20)) | (1L << (HEX_INTEGER - 20)) | (1L << (BIN_INTEGER - 20)) | (1L << (FLOAT_NUMBER - 20)) | (1L << (IMAG_NUMBER - 20)) | (1L << (ELLIPSIS - 20)) | (1L << (STAR - 20)) | (1L << (OPEN_PAREN - 20)) | (1L << (OPEN_BRACK - 20)) | (1L << (ADD - 20)) | (1L << (MINUS - 20)) | (1L << (NOT_OP - 20)) | (1L << (OPEN_BRACE - 20)))) != 0)) {
					{
					State = 900; test();
					}
				}

				State = 904;
				_la = TokenStream.La(1);
				if (_la==COLON) {
					{
					State = 903; sliceop();
					}
				}

				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			ErrorHandler.ReportError(this, re);
			ErrorHandler.Recover(this, re);
		}
		finally {
			ExitRule();
		}
		return _localctx;
	}