コード例 #1
0
        //	Identify self
        public override void Identify(ref string szData)
        {
            szData += "<";
            szData += "IFStatement";
            szData += ">";

            szData += "<";
            szData += "Expression";
            szData += ">";
            if (m_pExpression != null)
            {
                m_pExpression.Identify(ref szData);
            }
            szData += "</";
            szData += "Expression";
            szData += ">";
            if (m_pStatement != null)
            {
                m_pStatement.Identify(ref szData);
            }

            szData += "</";
            szData += "IFStatement";
            szData += ">";

            if (m_pElse != null)
            {
                m_pElse.Identify(ref szData);
            }
        }
コード例 #2
0
        public override void Identify(ref string szData)
        {
            string sz1 = "BRACK";
            string sz2;

            if (m_Operator == RUL_TOKEN_SUBTYPE.RUL_RPAREN)
            {
                sz2 = sz1;
            }
            else
            {
                sz2 = szTokenSubstrings[(int)m_Operator];
            }

            szData += "<";
            szData += sz2;
            szData += ">";
            if (m_pFirstExp != null)
            {
                m_pFirstExp.Identify(ref szData);
            }
            if (m_pSecondExp != null)
            {
                m_pSecondExp.Identify(ref szData);
            }
            szData += "</";
            szData += sz2;
            szData += ">";
        }
コード例 #3
0
        //	Identify self
        public override void Identify(ref string szData)
        {
            szData += "<";
            szData += "WHILEStatement";
            szData += ">";

            szData += "<";
            szData += "Expression";
            szData += ">";
            if (expressionNodeType == GRAMMAR_NODE_TYPE.NODE_TYPE_EXPRESSION)
            {
                m_pExpression.Identify(ref szData);
            }
            else
            {
                m_pExpressionStatement.Identify(ref szData);
            }
            szData += "</";
            szData += "Expression";
            szData += ">";
            m_pStatement.Identify(ref szData);

            szData += "</";
            szData += "WHILEStatement";
            szData += ">";
        }
コード例 #4
0
 //	Identify self
 public override void Identify(ref string szData)
 {
     szData += "<";
     szData += szTokenSubstrings[(int)RUL_TOKEN_SUBTYPE.RUL_ASSIGN];
     szData += ">";
     if (m_pVariable != null)
     {
         m_pVariable.Identify(ref szData);
     }
     else if (m_pArrayExp != null)
     {
         m_pArrayExp.Identify(ref szData);
     }
     else if (m_pOMExp != null)
     {
         m_pOMExp.Identify(ref szData);
     }
     m_pExpression.Identify(ref szData);
     szData += "</";
     szData += szTokenSubstrings[(int)RUL_TOKEN_SUBTYPE.RUL_ASSIGN];
     szData += ">";
 }
コード例 #5
0
ファイル: CASEStatement.cs プロジェクト: Wotingfengyu12/11
        //	Identify self
        public override void Identify(ref string szData)
        {
            if (m_bIsDefaultCase)
            {
                szData += "<";
                szData += "DEFAULT";
                szData += ">";
            }
            else
            {
                szData += "<";
                szData += "CASEStatement";
                szData += ">";
            }


            if (m_pExpression != null)
            {
                m_pExpression.Identify(ref szData);
            }

            if (m_pStatementList != null)
            {
                m_pStatementList.Identify(ref szData);
            }

            if (m_bIsDefaultCase)
            {
                szData += "</";
                szData += "DEFAULT";
                szData += ">";
            }
            else
            {
                szData += "</";
                szData += "CASEStatement";
                szData += ">";
            }
        }