Example #1
0
        private void btnContinuar_Click(object sender, EventArgs e)
        {
            string[] var  = textVariables.Text.Split(',');
            string[] term = textTerminales.Text.Split(',');

            List <string> variables = new List <string>();

            foreach (string s in var)
            {
                variables.Add(s);
            }

            List <string> terminales = new List <string>();

            foreach (string s in term)
            {
                terminales.Add(s);
            }

            gramatica = new Gramatica(variables, terminales);

            ventanaCyk         = new VentanaAlgoritmoCYK(this, gramatica);
            ventanaCyk.Visible = true;
            if (term.Contains("λ"))
            {
                ventanaCyk.lambdaEntra(true);
            }

            this.Visible = false;
        }
Example #2
0
 public VentanaAlgoritmoCYK(Interfaz inter, Gramatica grama)
 {
     InitializeComponent();
     interfaz  = inter;
     gramatica = grama;
     inicializarComboBox();
     btnValidarConCYK.Enabled     = false;
     btnAgregarProduccion.Enabled = true;
 }