private void AgregarProduccionPila(int[] produccion)
 {
     Console.WriteLine("AGREGANDO PRODUCCION A LA PILA");
     if (produccion != null)
     {
         pila.EliminarUltimoElemento();
         if (produccion.Length == 0)
         {
             pila.AgregarElemento(Lexema.VACIO);
             ReduceVacio();
             VerificarAnulabilidad();
         }
         else
         {
             for (int i = produccion.Length; i > 0; i--)
             {
                 pila.AgregarElemento(produccion[i - 1]);
             }
         }
     }
     else
     {
         //PUEDE GENERAR ERRORES EN ESTE BLOQUE
         Console.WriteLine("NO HAY PRODUCCION DISPONIBLE");
         throw new Exception();
     }
 }
        private void AgregarProduccionPila(int[] produccion)
        {
            if (produccion != null)
            {
                string valorNodoPadre = pila.RecuperarValorProduccionLexemaUltimoElemento();

                pila.EliminarUltimoElemento();
                if (produccion.Length == 0)
                {
                    pila.AgregarElemento(Lexema.VACIO, arbol, valorNodoPadre);
                    ReduceVacio();
                    VerificarAnulabilidad();
                }
                else
                {
                    pila.LimpiarCodigos();

                    for (int i = produccion.Length; i > 0; i--)
                    {
                        pila.AgregarElemento(produccion[i - 1]);
                    }

                    //AGREGANDO VALORES
                    pila.AgregarCodigos(arbol, valorNodoPadre);
                }
            }
            else
            {
                throw new Exception();
            }
        }