public final PrimaryContext primary() throws RecognitionException {
		PrimaryContext _localctx = new PrimaryContext(_ctx, getState());
		enterRule(_localctx, 124, RULE_primary);
		int _la;
		try {
			int _alt;
			setState(1437);
			switch ( getInterpreter().adaptivePredict(_input,192,_ctx) ) {
			case 1:
				_localctx = new NameExpContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(1312); match(ID);
				}
				break;
			case 2:
				_localctx = new GlobalNameExpContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(1313); match(GID);
				}
				break;
			case 3:
				_localctx = new ConstantLitContext(_localctx);
				enterOuterAlt(_localctx, 3);
				{
				setState(1314); constant();
				}
				break;
			case 4:
				_localctx = new PTupleExpContext(_localctx);
				enterOuterAlt(_localctx, 4);
				{
				setState(1315); tupleExp();
				}
				break;
			case 5:
				_localctx = new LetExpContext(_localctx);
				enterOuterAlt(_localctx, 5);
				{
				setState(1316); match(T__34);
				setState(1317); binding();
				setState(1322);
				_errHandler.sync(this);
				_la = _input.LA(1);
				while (_la==T__45) {
					{
					{
					setState(1318); match(T__45);
					setState(1319); binding();
					}
					}
					setState(1324);
					_errHandler.sync(this);
					_la = _input.LA(1);
				}
				setState(1325); match(T__4);
				setState(1326); exp(0);
				}
				break;
			case 6:
				_localctx = new RangedListExpContext(_localctx);
				enterOuterAlt(_localctx, 6);
				{
				setState(1328); newK();
				setState(1329); match(T__9);
				setState(1330); exp(0);
				setState(1331); match(T__51);
				setState(1332); exp(0);
				setState(1333); match(T__37);
				}
				break;
			case 7:
				_localctx = new ListExpContext(_localctx);
				enterOuterAlt(_localctx, 7);
				{
				setState(1335); newK();
				setState(1336); match(T__9);
				setState(1345);
				_la = _input.LA(1);
				if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__53) | (1L << T__52) | (1L << T__49) | (1L << T__47) | (1L << T__46) | (1L << T__44) | (1L << T__34) | (1L << T__29) | (1L << T__20) | (1L << GID) | (1L << ID) | (1L << MSTRING))) != 0) || ((((_la - 72)) & ~0x3f) == 0 && ((1L << (_la - 72)) & ((1L << (AddOP - 72)) | (1L << (MulOP - 72)) | (1L << (UnaryOP - 72)) | (1L << (HEX - 72)) | (1L << (DEC - 72)) | (1L << (OCT - 72)) | (1L << (BIN - 72)) | (1L << (FLOAT - 72)) | (1L << (CHAR - 72)) | (1L << (STRING - 72)))) != 0)) {
					{
					setState(1337); exp(0);
					setState(1342);
					_errHandler.sync(this);
					_la = _input.LA(1);
					while (_la==T__45) {
						{
						{
						setState(1338); match(T__45);
						setState(1339); exp(0);
						}
						}
						setState(1344);
						_errHandler.sync(this);
						_la = _input.LA(1);
					}
					}
				}

				setState(1347); match(T__37);
				}
				break;
			case 8:
				_localctx = new SetExpContext(_localctx);
				enterOuterAlt(_localctx, 8);
				{
				setState(1349); newK();
				setState(1350); match(T__52);
				setState(1359);
				_la = _input.LA(1);
				if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__53) | (1L << T__52) | (1L << T__49) | (1L << T__47) | (1L << T__46) | (1L << T__44) | (1L << T__34) | (1L << T__29) | (1L << T__20) | (1L << GID) | (1L << ID) | (1L << MSTRING))) != 0) || ((((_la - 72)) & ~0x3f) == 0 && ((1L << (_la - 72)) & ((1L << (AddOP - 72)) | (1L << (MulOP - 72)) | (1L << (UnaryOP - 72)) | (1L << (HEX - 72)) | (1L << (DEC - 72)) | (1L << (OCT - 72)) | (1L << (BIN - 72)) | (1L << (FLOAT - 72)) | (1L << (CHAR - 72)) | (1L << (STRING - 72)))) != 0)) {
					{
					setState(1351); exp(0);
					setState(1356);
					_errHandler.sync(this);
					_la = _input.LA(1);
					while (_la==T__45) {
						{
						{
						setState(1352); match(T__45);
						setState(1353); exp(0);
						}
						}
						setState(1358);
						_errHandler.sync(this);
						_la = _input.LA(1);
					}
					}
				}

				setState(1361); match(T__21);
				}
				break;
			case 9:
				_localctx = new MapExpContext(_localctx);
				enterOuterAlt(_localctx, 9);
				{
				setState(1363); newK();
				setState(1364); match(T__52);
				setState(1374);
				switch (_input.LA(1)) {
				case T__14:
					{
					setState(1365); match(T__14);
					}
					break;
				case T__53:
				case T__52:
				case T__49:
				case T__47:
				case T__46:
				case T__44:
				case T__34:
				case T__29:
				case T__20:
				case GID:
				case ID:
				case MSTRING:
				case AddOP:
				case MulOP:
				case UnaryOP:
				case HEX:
				case DEC:
				case OCT:
				case BIN:
				case FLOAT:
				case CHAR:
				case STRING:
					{
					setState(1366); mapping();
					setState(1371);
					_errHandler.sync(this);
					_la = _input.LA(1);
					while (_la==T__45) {
						{
						{
						setState(1367); match(T__45);
						setState(1368); mapping();
						}
						}
						setState(1373);
						_errHandler.sync(this);
						_la = _input.LA(1);
					}
					}
					break;
				default:
					throw new NoViableAltException(this);
				}
				setState(1376); match(T__21);
				}
				break;
			case 10:
				_localctx = new MultiSeqExpContext(_localctx);
				enterOuterAlt(_localctx, 10);
				{
				setState(1378); newK();
				setState(1379); match(T__9);
				setState(1388);
				_la = _input.LA(1);
				if (_la==T__9) {
					{
					setState(1380); newMultiSeqFragment();
					setState(1385);
					_errHandler.sync(this);
					_la = _input.LA(1);
					while (_la==T__45) {
						{
						{
						setState(1381); match(T__45);
						setState(1382); newMultiSeqFragment();
						}
						}
						setState(1387);
						_errHandler.sync(this);
						_la = _input.LA(1);
					}
					}
				}

				setState(1390); match(T__37);
				}
				break;
			case 11:
				_localctx = new RecordExpContext(_localctx);
				enterOuterAlt(_localctx, 11);
				{
				setState(1392); newK();
				setState(1393); match(ID);
				setState(1395);
				_la = _input.LA(1);
				if (_la==T__38) {
					{
					setState(1394); typeTuple();
					}
				}

				setState(1397); match(T__52);
				setState(1406);
				_la = _input.LA(1);
				if (_la==ID) {
					{
					setState(1398); fieldInit();
					setState(1403);
					_errHandler.sync(this);
					_la = _input.LA(1);
					while (_la==T__45) {
						{
						{
						setState(1399); match(T__45);
						setState(1400); fieldInit();
						}
						}
						setState(1405);
						_errHandler.sync(this);
						_la = _input.LA(1);
					}
					}
				}

				setState(1408); match(T__21);
				}
				break;
			case 12:
				_localctx = new ArrayExpContext(_localctx);
				enterOuterAlt(_localctx, 12);
				{
				setState(1410); newK();
				setState(1411); baseType();
				setState(1415);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,189,_ctx);
				while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
					if ( _alt==1 ) {
						{
						{
						setState(1412); newMultiSeqTypeFragment();
						}
						} 
					}
					setState(1417);
					_errHandler.sync(this);
					_alt = getInterpreter().adaptivePredict(_input,189,_ctx);
				}
				setState(1421);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,190,_ctx);
				while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
					if ( _alt==1 ) {
						{
						{
						setState(1418); typeFragment();
						}
						} 
					}
					setState(1423);
					_errHandler.sync(this);
					_alt = getInterpreter().adaptivePredict(_input,190,_ctx);
				}
				}
				break;
			case 13:
				_localctx = new TypeExpContext(_localctx);
				enterOuterAlt(_localctx, 13);
				{
				setState(1424); match(T__49);
				setState(1425); type();
				}
				break;
			case 14:
				_localctx = new ClosureExpContext(_localctx);
				enterOuterAlt(_localctx, 14);
				{
				setState(1426); match(T__52);
				setState(1427); matching();
				setState(1432);
				_errHandler.sync(this);
				_la = _input.LA(1);
				while (_la==T__8) {
					{
					{
					setState(1428); match(T__8);
					setState(1429); matching();
					}
					}
					setState(1434);
					_errHandler.sync(this);
					_la = _input.LA(1);
				}
				setState(1435); match(T__21);
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}