Ajout analyse sémantique :
- Verif declaration var & tab - Verif appel var
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "analyseur_lexical.h"
|
||||
#include "analyseur_syntaxyque.h"
|
||||
#include "affiche_arbre_abstrait.h"
|
||||
#include "affiche_table_symbole.h"
|
||||
#include "symboles.h"
|
||||
|
||||
extern int uniteCourante;
|
||||
@@ -19,22 +20,24 @@ int main(int argc, char **argv) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
initialise_premiers();
|
||||
initialise_suivants();
|
||||
|
||||
if (!strcmp(argv[1], "-l")) {
|
||||
test_yylex_internal(yyin);
|
||||
} else if (!strcmp(argv[1], "-s")) {
|
||||
afficheSyntaxyque = 1;
|
||||
initialise_premiers();
|
||||
initialise_suivants();
|
||||
|
||||
uniteCourante = yylex();
|
||||
programme();
|
||||
} else if (!strcmp(argv[1], "-a")) {
|
||||
initialise_premiers();
|
||||
initialise_suivants();
|
||||
|
||||
uniteCourante = yylex();
|
||||
n_prog *p = programme();
|
||||
affiche_n_prog(p);
|
||||
} else if (!strcmp(argv[1], "-t")) {
|
||||
uniteCourante = yylex();
|
||||
n_prog *p = programme();
|
||||
affiche_t_table(p);
|
||||
} else {
|
||||
fprintf(stderr, "option Inconue");
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user