tp3_C/pile.h
2022-12-06 20:07:39 +01:00

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