i++;
goto init;
}
+ if (c == '\n') {
+ c = fgetc(source);
+ tokenValue[i] = c;
+ i++;
+ goto initLV1;
+ }
if (c == '>') {
c = fgetc(source);
tokenValue[i] = c;
i++;
goto M1;
}
- if (c == '\n') {
- c = fgetc(source);
- tokenValue[i] = c;
- i++;
- goto initLV1;
- }
if (c == EOF) {
goto FIN;
} else {
}
initLV1:
- if (c == '\n' || c == '\t') {
+ if (c == ' ' || c == '\t') {
c = fgetc(source);
tokenValue[i] = c;
i++;
goto initLV1;
}
+ if (c == '\n') {
+ c = fgetc(source);
+ tokenValue[i] = c;
+ i++;
+ goto initLV1LV2;
+ }
if (istAlpha()) {
c = fgetc(source);
tokenValue[i] = c;
i++;
goto MC1;
}
- if (c == '\n') {
- c = fgetc(source);
- tokenValue[i] = c;
- i++;
- goto initLV1LV2;
- }
if (c == EOF) {
goto FIN;
}
i++;
goto initLV1LV2;
}
+ if (istAlpha()) {
+ goto NPARA;
+ }
if (c == '>') {
c = fgetc(source);
tokenValue[i] = c;
i++;
goto S1SS1;
}
- if (istAlpha()) {
- goto NPARA;
- }
if (c == EOF) {
goto FIN;
}
} else {
printf ("Token type found: %s\n", tokenTypestr[tokenType]);
}
- // reinit
+ // reinit tokenValue
i = 0;
memset(tokenValue, 0, sizeof(tokenValue));
} while (c != EOF); // tant que la fin du fichier n'est pas atteinte