Tengo analizador lexico y sintactico
acabo de terminar analizador lexico-sintactico hecho en power builder...si les interesa escribanme a mi email..
Por favor, necesito urgentemente de ambos analizadores, si no fuera mucha molestia enviemelos a mi correo: [email protected]
de ante mano muchisimas gracias
de ante mano muchisimas gracias
#include"stdio.h" /*Las palabras que puedes utilizar en este progra ma son las iguientes*/
#include"conio.h" /*inicio, escribe, lee, si, fin, mientras*/
#include"alloc.h"
/*inicio es la cabesa del programa*/
#define FALSO 0 /*fin son los pies delprograma*/
#define CIERTO 1 /*escribe,lee,si,mientras son isntrucciones dadas por*/
/*la gramatica ya antes establecida*/
char palabra[30],palabr[30];
struct programa{struct inicio *inicio1; struct sentencias *sen1; struct fin *fin1;};
struct inicio{struct programa *anterior1;};
struct sentencias{struct sentencias *siguiente1; struct instrucciones *ins_sig; struct sentencias *anterior2; struct programa *raiz;};
struct instrucciones{struct escribe *esc; struct lee *lee; struct mientras *min; struct si *si; struct sentencias *sent;};
struct escribe{struct instrucciones *anterior3;};
struct lee{struct instrucciones *anterior4;};
struct mientras{struct instrucciones *anterior5;};
struct si{struct instrucciones *anterior6;};
struct fin{struct programa *anterior7;};
struct programa *nodo_raiz=NULL;
struct inicio *i=NULL;
struct sentencias *sent=NULL;
struct instrucciones *inst=NULL;
struct escribe *escb=NULL;
struct lee *le=NULL;
struct mientras *mi=NULL;
struct si *s=NULL;
struct fin *f=NULL;
int ins_sen(char palabra[50])
{if((strcmp(palabra,"escribe"))==0) return 1;
else if((strcmp(palabra,"lee"))==0) return 2;
else if((strcmp(palabra,"mientras"))==0) return 3;
else if((strcmp(palabra,"si"))==0) return 4;
else if((strcmp(palabra,"inicio"))==0) return 5;
else if((strcmp(palabra,"fin"))==0) return 6;
}
void mensage(){printf("NO HAY MEMORIA DISPONIBLE"); getch(); exit(1);};
void ins_lee()
{if((le=malloc(sizeof(le)))==NULL){mensage();}
le->anterior4=inst;
inst->lee=le;}
void ins_mientras()
{if((mi=malloc(sizeof(mi)))==NULL){mensage();}
mi->anterior5=inst;
inst->min=mi;
}
void ins_escribe()
{ if((escb=malloc(sizeof(escb)))==NULL){mensage();}
escb->anterior3=inst;
inst->esc=escb;}
void ins_si()
{ struct instrucciones *tem=inst;
if((inst=malloc(sizeof(inst)))==NULL){mensage();}
inst->esc=NULL; inst->lee=NULL;
inst->min=NULL; inst->si=NULL;
inst->sent=NULL;
if(!tem)
{ inst->esc=NULL;
inst->min=NULL;
inst->lee=NULL;
inst->si=NULL;
inst->sent=sent;}
else
{ inst->esc=NULL;
inst->min=NULL;
inst->lee=NULL;
inst->si=NULL;
inst->sent=tem; }
}
void ins_sentencias()
{ struct sentencias *tmp=sent ;
if((sent=malloc(sizeof(sent)))==NULL){mensage();}
if(!tmp){sent->siguiente1=NULL;
sent->ins_sig=NULL;
sent->anterior2=NULL;
nodo_raiz->sen1=sent;
sent->raiz=nodo_raiz;
}
else
{
sent->ins_sig=NULL;
sent->anterior2=tmp;
sent->siguiente1=NULL;
sent->raiz=NULL;
}
}
void ins_fin()
{ if((f=malloc(sizeof(f)))==NULL){mensage();}
f->anterior7=nodo_raiz; nodo_raiz->fin1=f; }
void ins_inicio()
{ if((i=malloc(sizeof(i)))==NULL){mensage();}
nodo_raiz->inicio1=i; i->anterior1=nodo_raiz; }
void ins_programa()
{ if((nodo_raiz=malloc(sizeof(nodo_raiz)))==NULL){mensage();}
nodo_raiz->inicio1=NULL; nodo_raiz->sen1=NULL; nodo_raiz->fin1=NULL;
}
void memoria(int que)
{ if(que==1){ins_escribe();}
else if(que==2){ins_lee();}
else if(que==3){ins_mientras();}
else if(que==4){ins_si();}
else if(que==5){ins_inicio();}
else if(que==6){ins_fin();}
}
void inicialisa(void) { int x; for(x=0;x<=29;x++){ palabra[x]='
#include"conio.h" /*inicio, escribe, lee, si, fin, mientras*/
#include"alloc.h"
/*inicio es la cabesa del programa*/
#define FALSO 0 /*fin son los pies delprograma*/
#define CIERTO 1 /*escribe,lee,si,mientras son isntrucciones dadas por*/
/*la gramatica ya antes establecida*/
char palabra[30],palabr[30];
struct programa{struct inicio *inicio1; struct sentencias *sen1; struct fin *fin1;};
struct inicio{struct programa *anterior1;};
struct sentencias{struct sentencias *siguiente1; struct instrucciones *ins_sig; struct sentencias *anterior2; struct programa *raiz;};
struct instrucciones{struct escribe *esc; struct lee *lee; struct mientras *min; struct si *si; struct sentencias *sent;};
struct escribe{struct instrucciones *anterior3;};
struct lee{struct instrucciones *anterior4;};
struct mientras{struct instrucciones *anterior5;};
struct si{struct instrucciones *anterior6;};
struct fin{struct programa *anterior7;};
struct programa *nodo_raiz=NULL;
struct inicio *i=NULL;
struct sentencias *sent=NULL;
struct instrucciones *inst=NULL;
struct escribe *escb=NULL;
struct lee *le=NULL;
struct mientras *mi=NULL;
struct si *s=NULL;
struct fin *f=NULL;
int ins_sen(char palabra[50])
{if((strcmp(palabra,"escribe"))==0) return 1;
else if((strcmp(palabra,"lee"))==0) return 2;
else if((strcmp(palabra,"mientras"))==0) return 3;
else if((strcmp(palabra,"si"))==0) return 4;
else if((strcmp(palabra,"inicio"))==0) return 5;
else if((strcmp(palabra,"fin"))==0) return 6;
}
void mensage(){printf("NO HAY MEMORIA DISPONIBLE"); getch(); exit(1);};
void ins_lee()
{if((le=malloc(sizeof(le)))==NULL){mensage();}
le->anterior4=inst;
inst->lee=le;}
void ins_mientras()
{if((mi=malloc(sizeof(mi)))==NULL){mensage();}
mi->anterior5=inst;
inst->min=mi;
}
void ins_escribe()
{ if((escb=malloc(sizeof(escb)))==NULL){mensage();}
escb->anterior3=inst;
inst->esc=escb;}
void ins_si()
{ struct instrucciones *tem=inst;
if((inst=malloc(sizeof(inst)))==NULL){mensage();}
inst->esc=NULL; inst->lee=NULL;
inst->min=NULL; inst->si=NULL;
inst->sent=NULL;
if(!tem)
{ inst->esc=NULL;
inst->min=NULL;
inst->lee=NULL;
inst->si=NULL;
inst->sent=sent;}
else
{ inst->esc=NULL;
inst->min=NULL;
inst->lee=NULL;
inst->si=NULL;
inst->sent=tem; }
}
void ins_sentencias()
{ struct sentencias *tmp=sent ;
if((sent=malloc(sizeof(sent)))==NULL){mensage();}
if(!tmp){sent->siguiente1=NULL;
sent->ins_sig=NULL;
sent->anterior2=NULL;
nodo_raiz->sen1=sent;
sent->raiz=nodo_raiz;
}
else
{
sent->ins_sig=NULL;
sent->anterior2=tmp;
sent->siguiente1=NULL;
sent->raiz=NULL;
}
}
void ins_fin()
{ if((f=malloc(sizeof(f)))==NULL){mensage();}
f->anterior7=nodo_raiz; nodo_raiz->fin1=f; }
void ins_inicio()
{ if((i=malloc(sizeof(i)))==NULL){mensage();}
nodo_raiz->inicio1=i; i->anterior1=nodo_raiz; }
void ins_programa()
{ if((nodo_raiz=malloc(sizeof(nodo_raiz)))==NULL){mensage();}
nodo_raiz->inicio1=NULL; nodo_raiz->sen1=NULL; nodo_raiz->fin1=NULL;
}
void memoria(int que)
{ if(que==1){ins_escribe();}
else if(que==2){ins_lee();}
else if(que==3){ins_mientras();}
else if(que==4){ins_si();}
else if(que==5){ins_inicio();}
else if(que==6){ins_fin();}
}
void inicialisa(void) { int x; for(x=0;x<=29;x++){ palabra[x]='
hola
estuve leyendoel comentario sobre el analizador lexico, me lo podrias enviar a mi mail para exponer un ejemplo de este tipo de progrmana analizador
gracias
atte
soma25
estuve leyendoel comentario sobre el analizador lexico, me lo podrias enviar a mi mail para exponer un ejemplo de este tipo de progrmana analizador
gracias
atte
soma25
hoa soy yo de nuevo, se me olvido anexar mi correo para que me envies el analizador.
[email protected]
gracias
atte
soma25
[email protected]
gracias
atte
soma25
enviame porfa el analizador lexico y sintactivo con su explicacion pero en c++
NECESITO TU ANALISADOR LEX-SINTAC SI ME LO PUEDES MANDAR A ESTE CORREO [email protected] TE LO VOY AGRADECER GRACIAS
bueno creo que seria de mucha ayuda revizar tu code para ver su funcionamiento enviamelo porfa...
Oye, si me pudieras enviar tu analizador me seria de mucha ayuda
te anexo mi correo
[email protected]
te anexo mi correo
[email protected]
me puedes mandar ese programa del analizador lexico por favor siiiiiiiiii a ese correo [email protected]
necesito el analisador lex sint. lo mas pronto posible si me lo pudiesen enviar a: saul:[email protected] ,se los agradeceria
necesitoel analisador lex sint. si me lo podrian enviar se los agradesco
Por favor envíame el analizador léxico, tu ayuda sería de gran importancia. Mi correo [email protected]
Hola... estoy interesada en tu mensaje. Me podrias mandar tu programa por favor?
Me interesa MUCHOOO!! tu programa lexico sintaxtico podrias proporcionarmelo? en serio q lo NECESITO URGENTEMENTE, de antemano GRACIAS!! y disculpa las molestias
hola amigo Necesito tu analizadorlexico-sintactico seria interesante que lo envies a este correo: [email protected]
sabes me interesa tu programa de analizador lexico y sintactico queria ver sime lo podrias proporcionar en estos dias por fa antes del Jueves y te lo agradeceria lo que pasa que necesito analizarlo y sacar los automatas.
podrias pasarme tu analizador lexico y sintactico porfa que me estan pidiendo uno vale
me urge mucho el analizador lexico y sintactico, te lo agradeseria mucho, mi correo [email protected]
