public Reference_internalsContext reference_internals()
    {
        Reference_internalsContext _localctx = new Reference_internalsContext(Context, State);

        EnterRule(_localctx, 6, RULE_reference_internals);
        int _la;

        try {
            State = 53;
            ErrorHandler.Sync(this);
            switch (Interpreter.AdaptivePredict(TokenStream, 7, Context))
            {
            case 1:
                _localctx = new FullRecursiveContext(_localctx);
                EnterOuterAlt(_localctx, 1);
                {
                    {
                        State = 30; Match(REF_CMND_NAME);
                        State = 31; Match(REF_CMND_VAL);
                        State = 32; Match(REF_CMND_SEP);
                        State = 33; reference();
                    }
                }
                break;

            case 2:
                _localctx = new FullReferenceContext(_localctx);
                EnterOuterAlt(_localctx, 2);
                {
                    {
                        State = 34; Match(REF_CMND_NAME);
                        State = 35; Match(REF_CMND_VAL);
                        State = 37;
                        ErrorHandler.Sync(this);
                        _la = TokenStream.LA(1);
                        if (_la == REF_CMND_SEP)
                        {
                            {
                                State = 36; Match(REF_CMND_SEP);
                            }
                        }
                    }
                }
                break;

            case 3:
                _localctx = new ValueRecursiveContext(_localctx);
                EnterOuterAlt(_localctx, 3);
                {
                    {
                        State = 39; Match(REF_CMND_VAL);
                        State = 40; Match(REF_CMND_SEP);
                        State = 41; reference();
                    }
                }
                break;

            case 4:
                _localctx = new ValueReferenceContext(_localctx);
                EnterOuterAlt(_localctx, 4);
                {
                    {
                        State = 42; Match(REF_CMND_VAL);
                        State = 44;
                        ErrorHandler.Sync(this);
                        _la = TokenStream.LA(1);
                        if (_la == REF_CMND_SEP)
                        {
                            {
                                State = 43; Match(REF_CMND_SEP);
                            }
                        }
                    }
                }
                break;

            case 5:
                _localctx = new CommandRecursiveContext(_localctx);
                EnterOuterAlt(_localctx, 5);
                {
                    {
                        State = 46; Match(REF_CMND_NAME);
                        State = 47; Match(REF_CMND_SEP);
                        State = 48; reference();
                    }
                }
                break;

            case 6:
                _localctx = new CommandReferenceContext(_localctx);
                EnterOuterAlt(_localctx, 6);
                {
                    {
                        State = 49; Match(REF_CMND_NAME);
                        State = 51;
                        ErrorHandler.Sync(this);
                        _la = TokenStream.LA(1);
                        if (_la == REF_CMND_SEP)
                        {
                            {
                                State = 50; Match(REF_CMND_SEP);
                            }
                        }
                    }
                }
                break;
            }
        }
        catch (RecognitionException re) {
            _localctx.exception = re;
            ErrorHandler.ReportError(this, re);
            ErrorHandler.Recover(this, re);
        }
        finally {
            ExitRule();
        }
        return(_localctx);
    }
 public ValueReferenceContext(Reference_internalsContext context)
 {
     CopyFrom(context);
 }
 public FullRecursiveContext(Reference_internalsContext context)
 {
     CopyFrom(context);
 }
 public CommandRecursiveContext(Reference_internalsContext context)
 {
     CopyFrom(context);
 }
 public virtual void CopyFrom(Reference_internalsContext context)
 {
     base.CopyFrom(context);
 }