47 lines
No EOL
737 B
C
47 lines
No EOL
737 B
C
#ifndef PILE_H
|
|
#define PILE_H
|
|
|
|
union Test {
|
|
int ValEntier;
|
|
float ValReel;
|
|
};
|
|
|
|
enum NumType {Entier, Reel};
|
|
|
|
struct Nombre{
|
|
union Test nombr;
|
|
enum NumType typ;
|
|
};
|
|
|
|
struct Cell{
|
|
struct Nombre Ent;
|
|
struct Cell * Suiv;
|
|
};
|
|
|
|
struct Pile{
|
|
int nbElements;
|
|
struct Cell * Pil;
|
|
};
|
|
|
|
typedef struct Programme {
|
|
char **tokens;
|
|
int taille;
|
|
} Programme;
|
|
|
|
typedef struct Etat{
|
|
struct Pile * Donnee;
|
|
Programme * Prog;
|
|
} Etat;
|
|
|
|
struct Nombre Typenum(string C);
|
|
void Init_Pile(struct Pile * new);
|
|
void Empiler(struct Pile * P, int i);
|
|
struct Cell * Depiler(struct Pile * P);
|
|
void Affichage(struct Cell * C);
|
|
|
|
int numberOfDelimiters(char* string);
|
|
Programme* lexer(char* chaine);
|
|
|
|
void Executer(Etat * etat);
|
|
|
|
#endif |