39 lines
No EOL
701 B
C
39 lines
No EOL
701 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <ctype.h>
|
|
#include "pile.h"
|
|
|
|
int main(int argc, char * argv[])
|
|
{
|
|
/*struct Pile P;
|
|
Init_Pile(&P);
|
|
Empiler(&P, 4);
|
|
Empiler(&P, 5);
|
|
struct Cell * res = Depiler(&P);
|
|
//Supprimer(&P);
|
|
Affichage(P.Pil);
|
|
printf("%d \n", res->Ent);
|
|
|
|
Programme * P;
|
|
P = lexer(argv[1]);
|
|
|
|
for(int i=0; i<P->taille; i++)
|
|
{
|
|
printf("TOKEN : %s \n", P->tokens[i]);
|
|
}*/
|
|
/*for(int i=0; i<E->Prog->taille; i++)
|
|
{
|
|
printf("TOKEN : %s \n", E->Prog->tokens[i]);
|
|
}*/
|
|
|
|
Etat * E;
|
|
E= malloc(sizeof(Etat));
|
|
E->Donnee = malloc(sizeof(struct Pile));
|
|
Init_Pile(E->Donnee);
|
|
E->Prog = malloc(sizeof(Programme));
|
|
E->Prog = lexer(argv[1]);
|
|
|
|
|
|
Executer(E);
|
|
} |