Exemple #1
0
 private void sintacticoToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (FileName == null && scintilla1.SelectionStart == 0)
     {
     }
     else
     {
         LEXICO();
         Sintactico raiz = new Sintactico(tokens2);
         treeView1.Nodes.Clear();
         treeView1.Nodes.Add(raiz.main());
         treeView1.ExpandAll();
         ErroresSin.Text = raiz.getErrores();
     }
 }
Exemple #2
0
 private void sintacticoToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (FileName == null && scintilla1.SelectionStart == 0)
     {
     }
     else
     {
         LEXICO();
         Sintactico raiz = new Sintactico(tokens2);
         treeView1.Nodes.Clear();
         TreeNode temp = new TreeNode();
         temp = raiz.main();
         TreeNode   tn    = new TreeNode("error");
         TreeNode[] nodes = temp.Nodes.Find("error", true);
         if (nodes.Length > 0)
         {
             temp.Nodes.Remove(nodes[0]);
         }
         treeView1.Nodes.Add(temp);
         treeView1.ExpandAll();
         ErroresSin.Text = raiz.getErrores();
     }
 }