iAdd in grammar :

- var
    - /
    - -
This commit is contained in:
2016-01-26 16:03:37 +01:00
parent e71dc9bae0
commit 1871e6f8c8
5 changed files with 12 additions and 4 deletions

View File

@@ -3,8 +3,6 @@
int uniteCourante;
extern char yytext[100];
void expArith (void) {
affiche_balise_ouvrante("expArith", 1);
@@ -17,7 +15,7 @@ void expArith (void) {
void expArithBis (void) {
affiche_balise_ouvrante("expArithBis", 1);
if(uniteCourante == PLUS) {
if(uniteCourante == PLUS || uniteCourante == MOINS ) {
uniteCourante = yylex();
affiche_xml_texte(yytext);
@@ -39,7 +37,7 @@ void terme (void) {
void termeBis (void) {
affiche_balise_ouvrante("termeBis", 1);
if(uniteCourante == FOIS) {
if(uniteCourante == FOIS || uniteCourante == DIVISE) {
uniteCourante = yylex();
affiche_xml_texte(yytext);
@@ -62,9 +60,15 @@ void facteur (void) {
printf("Erreur de syntaxe");
exit(-1);
}
uniteCourante = yylex();
affiche_xml_texte(yytext);
} else if(uniteCourante == NOMBRE) {
uniteCourante = yylex();
affiche_xml_texte(yytext);
} else if(uniteCourante == ID_VAR) {
uniteCourante = yylex();
affiche_xml_texte(yytext);
} else {
printf("Erreur de syntaxe");
exit(-1);