diff --git a/main.c b/main.c index d48877a..71f3277 100644 --- a/main.c +++ b/main.c @@ -6,22 +6,22 @@ int main(int argc, char * argv[]) { - /*struct Pile P; + struct Pile P; Init_Pile(&P); - Empiler(&P, '4'); - Empiler(&P, '5'); - struct Cell * res = Depiler(&P); + Empiler(&P, "4"); + Empiler(&P, "1.0"); + //struct Cell * res = Depiler(&P); //Supprimer(&P); Affichage(P.Pil); - Affiche_Nombre(res->Ent);*/ + //Affiche_Nombre(res->Ent); - Programme * P; + /*Programme * P; P = lexer(argv[1]); for(int i=0; itaille; i++) { printf("TOKEN : %s \n", P->tokens[i]); - } + }*/ /*for(int i=0; iProg->taille; i++) { diff --git a/pile.c b/pile.c index 89f41f4..1671fe3 100644 --- a/pile.c +++ b/pile.c @@ -45,9 +45,17 @@ void Empiler(struct Pile * P, char * nb) struct Nombre i = Typenum(nb); if (i.typ == Entier) - cel->Ent.nombr.ValEntier = i.nombr.ValEntier; + { + //cel->Ent.nombr.ValEntier = i.nombr.ValEntier; + //cel->Ent.typ = Entier; + cel->Ent = i; + } else if (i.typ == Reel) - cel->Ent.nombr.ValReel = i.nombr.ValReel; + { + //cel->Ent.nombr.ValReel = i.nombr.ValReel; + //cel->Ent.typ = Reel; + cel->Ent = i; + } cel->Suiv = P->Pil; P->Pil = cel; P->nbElements +=1;