Пример #1
0
        private string getVarNameByVarIndex(int varIndex)
        {
            string varStr = "X" + varIndex.ToString();

            if (m_showOriginalVarNamesInAST && BJKParse.parserLastVarToIndexMap().ContainsKey(varIndex))
            {
                varStr = BJKParse.parserLastVarToIndexMap()[varIndex];
            }
            return(varStr);
        }
Пример #2
0
 private void Analyze()
 {
     try
     {
         m_lastAST = BJKParse.astBreakNestedExpressions(BJKParse.aString(CodeTextBox.Text));
         updateAST(m_lastAST);
         textBoxAnalysisResult.Clear();
         textBoxAnalysisResult.Text = "Analysing...\n";
         Analysis.AbstractSemantics.resultType result = Analysis.AbstractSemantics.analyse(m_lastAST);
         Console.WriteLine(result.toString());
         textBoxAnalysisResult.Multiline = true;
         textBoxAnalysisResult.Text      = result.toString();
     }
     catch (Util.Fail f)
     {
         MessageBox.Show(f.Data0, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }