X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=lexer%2Fmain.c;h=4572d0267330eaa05ee1cdf382d17978c2236f43;hb=da74c1e073d935102c9a78bd3c839af3c340fa6e;hp=0cb3dba1eaaaac205a7d7ec6de1a422cc94dc462;hpb=fde9417f42248445f08321ce9ee57bc2876f0b2c;p=TP_AL_C.git diff --git a/lexer/main.c b/lexer/main.c index 0cb3dba..4572d02 100644 --- a/lexer/main.c +++ b/lexer/main.c @@ -44,9 +44,9 @@ bool isSeparator() { } int scanner() { -const char* Titre = "Titre"; -const char* Auteur = "Auteur"; -unsigned int j = 0; + const char* Titre = "Titre"; + const char* Auteur = "Auteur"; + unsigned int j = 0; // The main loop get the next character init: @@ -118,7 +118,6 @@ S1SS1: goto SECTION; } - SS2: if (isSeparator() || c == EOF) { goto SSECTION; @@ -250,7 +249,6 @@ int main (int argc, char const *argv[]) { do { c = fgetc(source); // lecture du caractere suivant du fichier source - //fputc(c, target); // ecrire c dans le fichier target tokenValue[i] = c; i++; int scanrt = scanner(); @@ -266,7 +264,7 @@ int main (int argc, char const *argv[]) { // reinit tokenValue i = 0; memset(tokenValue, 0, sizeof(tokenValue)); - } while (c != EOF); // tant que la fin du fichier n'est pas atteinte + } while (c != EOF); // tant que la fin du fichier n'est pas atteinte if (source != NULL) fclose(source); // fermeture du fichier source if (target != NULL) fclose(target); // fermeture du fichier target