public final ModelElementContext modelElement() throws RecognitionException {
		ModelElementContext _localctx = new ModelElementContext(_ctx, getState());
		enterRule(_localctx, 26, RULE_modelElement);
		try {
			setState(238);
			switch (_input.LA(1)) {
			case T__41:
				enterOuterAlt(_localctx, 1);
				{
				setState(230); constDeclaration();
				}
				break;
			case T__19:
				enterOuterAlt(_localctx, 2);
				{
				setState(231); enumDeclaration();
				}
				break;
			case T__30:
				enterOuterAlt(_localctx, 3);
				{
				setState(232); recordDeclaration();
				}
				break;
			case T__40:
				enterOuterAlt(_localctx, 4);
				{
				setState(233); globalVarsDeclaration();
				}
				break;
			case T__27:
				enterOuterAlt(_localctx, 5);
				{
				setState(234); procedureDeclaration();
				}
				break;
			case T__54:
				enterOuterAlt(_localctx, 6);
				{
				setState(235); funDeclaration();
				}
				break;
			case T__39:
				enterOuterAlt(_localctx, 7);
				{
				setState(236); extDeclaration();
				}
				break;
			case T__0:
				enterOuterAlt(_localctx, 8);
				{
				setState(237); typealiasDeclaration();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}