Juan
using System.Collections.Generic;
using System.Text;
namespace WindowsFormsApplication1
{
class SintAscSLR
{
public const int NOPROD = 10;
public constint NODDS = 1000;
public const int NOACTIONS = 1000;
public const int NOGOTOS = 1000;
string[] _vts = { "", "id", "=", ";", "+", "-", "*", "/", "num", "(", ")", "$" };string[] _vns = { "", "A", "E", "T", "F" };
int[,] _prod ={{1,4,-1,-2,2,-3}, // A->id = E ;
{2,3,2,-4,3,0}, // E->E + T{2,3,2,-5,3,0}, // E->E - T
{2,1,3,0,0,0}, // E->T
{3,3,3,-6,4,0}, // T->T * F
{3,3,3,-7,4,0},// T->T / F
{3,1,4,0,0,0}, // T->F
{4,1,-1,0,0,0}, // F->id
{4,1,-8,0,0,0}, // F->num{4,3,-9,2,-10,0} // F->( E )
};
int[,] _sig ={{0,0,0,0,0,0,0,0,0,0,0}, // Renglon que no se usa{1,11,0,0,0,0,0,0,0,0,0}, // SIG(A)={ $ }
{4,3,4,5,10,0,0,0,0,0,0}, // SIG(E)={ ; + - ) }
{6,6,7,3,4,5,10,0,0,0,0}, // SIG(T)={ * / ; + - ) }{6,6,7,3,4,5,10,0,0,0,0} // SIG(F)={ * / ; + - ) }
};
Pila _pila;
int[,] _action;
int _noActions;
int _noGoTos;int[,] _goTo;
int[] _dd;
int _noDds;
Item[] _c;
int _noItems;
//PROPIEDADES
public int NoAcciones
{
get {return _noActions; }
}
public int[,] Action
{
get { return _action; }
}
//---------------------------
public int NoItems
{...
Regístrate para leer el documento completo.