Mamannnnnnnnn !!!!!!!!!!!!!!

This commit is contained in:
2016-03-01 16:13:24 +01:00
parent 336d8d58bd
commit c400284b80
7 changed files with 807 additions and 20 deletions

View File

@@ -2,9 +2,11 @@
#include <stdlib.h>
#include "analyseur_lexical.h"
#include "analyseur_syntaxyque.h"
#include "affiche_arbre_abstrait.h"
#include "symboles.h"
extern int uniteCourante;
extern int afficheSyntaxyque;
char yytext[100];
FILE *yyin;
@@ -20,14 +22,22 @@ int main(int argc, char **argv) {
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 {
fprintf(stderr, "option Inconue");
exit(1);
}
uniteCourante = yylex();