/// <summary>
        /// BoolExp_
        /// </summary>
        /// <param name="firstBoolE"></param>
        /// <returns></returns>
        private Property_BoolE BoolExp_Gram(Property_BoolE firstBoolE)
        {
            Property_BoolE BoolE = new Property_BoolE();

            bool LogicOptResult = LogicOptGram();

            if (!LogicOptResult)
            {
                return(firstBoolE);
            }
            string opString = this.varTable.GetItem(this.matchIndex - 1).varValue;

            Property_ME ME = new Property_ME(this.globalQuad);

            Property_BoolE secondBoolE = BoolExpGram();

            switch (opString)
            {
            case "and":
                BackPatch(firstBoolE.TrueList, ME.Quad);
                BoolE.TrueList  = secondBoolE.TrueList;
                BoolE.FalseList = Merge(firstBoolE.FalseList, secondBoolE.FalseList);
                break;

            case "or":
                BackPatch(firstBoolE.FalseList, ME.Quad);
                BoolE.TrueList  = Merge(firstBoolE.TrueList, secondBoolE.TrueList);
                BoolE.FalseList = secondBoolE.FalseList;
                break;
            }

            return(BoolExp_Gram(BoolE));
        }
        /// <summary>
        /// XHSentence
        /// </summary>
        /// <returns></returns>
        private Property_SE XHSentenceGram()
        {
            if (this.varTable.GetItem(this.matchIndex).varValue.Equals("while"))
            {
                this.matchIndex++;
            }

            Property_ME ME1 = new Property_ME(this.globalQuad);

            Property_BoolE BoolE = BoolExpGram();

            if (this.varTable.GetItem(this.matchIndex).varValue.Equals("do"))
            {
                this.matchIndex++;
            }

            Property_ME ME2 = new Property_ME(this.globalQuad);


            Property_SE SE1 = new Property_SE();

            if (this.varTable.GetItem(this.matchIndex).varType == ConstTable.VariableType.Identity)
            {
                SE1 = FillSentenceGram();
            }
            else if (this.varTable.GetItem(this.matchIndex).varValue.Equals("if"))
            {
                SE1 = FZSentenceGram();
            }
            else if (this.varTable.GetItem(this.matchIndex).varValue.Equals("while"))
            {
                SE1 = XHSentenceGram();
            }
            else if (this.varTable.GetItem(this.matchIndex).varValue.Equals("begin"))
            {
                SE1 = ComplexSentenceGram();
            }

            Property_SE SE = new Property_SE();

            BackPatch(SE1.NextList, ME1.Quad);
            BackPatch(BoolE.TrueList, ME2.Quad);
            SE.NextList = BoolE.FalseList;

            QuaternionItem item1 = new QuaternionItem(this.globalQuad, NullQuaternionElement, NullQuaternionElement, NullQuaternionElement, ME1.Quad, ConstTable.QuaternionType.WHILEEXP);

            this.QuaternionTb.Add(item1);
            this.globalQuad++;

            return(SE);
        }
        /// <summary>
        /// Sentence
        /// </summary>
        /// <returns></returns>
        private Property_SE SentenceGram(Property_SE firstSE)
        {
            Property_SE SE = new Property_SE();

            Property_SE secondSE = new Property_SE();

            if (this.varTable.GetItem(this.matchIndex).varType == ConstTable.VariableType.Identity)
            {
                Property_ME ME = new Property_ME(this.globalQuad);
                BackPatch(firstSE.NextList, ME.Quad);
                secondSE    = FillSentenceGram();
                SE.NextList = secondSE.NextList;
                return(SentenceGram(SE));
            }
            else if (this.varTable.GetItem(this.matchIndex).varValue.Equals("if"))
            {
                Property_ME ME = new Property_ME(this.globalQuad);
                BackPatch(firstSE.NextList, ME.Quad);
                secondSE    = FZSentenceGram();
                SE.NextList = secondSE.NextList;
                return(SentenceGram(SE));
            }
            else if (this.varTable.GetItem(this.matchIndex).varValue.Equals("while"))
            {
                Property_ME ME = new Property_ME(this.globalQuad);
                BackPatch(firstSE.NextList, ME.Quad);
                secondSE    = XHSentenceGram();
                SE.NextList = secondSE.NextList;
                return(SentenceGram(SE));
            }
            else if (this.varTable.GetItem(this.matchIndex).varValue.Equals("begin"))
            {
                Property_ME ME = new Property_ME(this.globalQuad);
                BackPatch(firstSE.NextList, ME.Quad);
                secondSE    = ComplexSentenceGram();
                SE.NextList = secondSE.NextList;
                return(SentenceGram(SE));
            }
            return(firstSE);
        }
        /// <summary>
        /// FZSentence
        /// </summary>
        /// <returns></returns>
        private Property_SE FZSentenceGram()
        {
            if (this.varTable.GetItem(this.matchIndex).varValue.Equals("if"))
            {
                this.matchIndex++;
            }

            Property_BoolE BoolE = BoolExpGram();

            if (this.varTable.GetItem(this.matchIndex).varValue.Equals("then"))
            {
                this.matchIndex++;
            }

            Property_ME ME1 = new Property_ME(this.globalQuad);


            Property_SE SE1 = new Property_SE();

            if (this.varTable.GetItem(this.matchIndex).varType == ConstTable.VariableType.Identity)
            {
                SE1 = FillSentenceGram();
            }
            else if (this.varTable.GetItem(this.matchIndex).varValue.Equals("if"))
            {
                SE1 = FZSentenceGram();
            }
            else if (this.varTable.GetItem(this.matchIndex).varValue.Equals("while"))
            {
                SE1 = XHSentenceGram();
            }
            else if (this.varTable.GetItem(this.matchIndex).varValue.Equals("begin"))
            {
                SE1 = ComplexSentenceGram();
            }

            Property_SE SE = new Property_SE();

            if (this.varTable.GetItem(this.matchIndex).varValue.Equals("else"))
            {
                Property_NE NE       = new Property_NE();
                List <int>  nextList = new List <int>();
                nextList.Add(this.globalQuad);
                NE.NextList = nextList;

                QuaternionItem item1 = new QuaternionItem(this.globalQuad, NullQuaternionElement, NullQuaternionElement, NullQuaternionElement, 0, ConstTable.QuaternionType.NEXP);
                this.QuaternionTb.Add(item1);
                this.globalQuad++;

                if (this.varTable.GetItem(this.matchIndex).varValue.Equals("else"))
                {
                    this.matchIndex++;
                }

                Property_ME ME2 = new Property_ME(this.globalQuad);

                Property_SE SE2 = new Property_SE();
                if (this.varTable.GetItem(this.matchIndex).varType == ConstTable.VariableType.Identity)
                {
                    SE2 = FillSentenceGram();
                }
                else if (this.varTable.GetItem(this.matchIndex).varValue.Equals("if"))
                {
                    SE2 = FZSentenceGram();
                }
                else if (this.varTable.GetItem(this.matchIndex).varValue.Equals("while"))
                {
                    SE2 = XHSentenceGram();
                }
                else if (this.varTable.GetItem(this.matchIndex).varValue.Equals("begin"))
                {
                    SE2 = ComplexSentenceGram();
                }

                BackPatch(BoolE.TrueList, ME1.Quad);
                BackPatch(BoolE.FalseList, ME2.Quad);
                SE.NextList = Merge(Merge(SE1.NextList, NE.NextList), SE2.NextList);
            }
            else
            {
                BackPatch(BoolE.TrueList, ME1.Quad);
                SE.NextList = Merge(BoolE.FalseList, SE1.NextList);
            }

            return(SE);
        }