tp3_C/pile.h
2022-12-06 21:37:58 +01:00

48 wiersze
No EOL
781 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(char * C);
void Init_Pile(struct Pile * new);
void Empiler(struct Pile * P, char * nb);
struct Cell * Depiler(struct Pile * P);
void Affiche_Nombre(struct Nombre nb);
void Affichage(struct Cell * C);
int numberOfDelimiters(char* string);
Programme* lexer(char * chaine);
void Executer(Etat * etat);
#endif