I'm afraid this is not enough ...
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
+ if (c == '\n') {
+ c = fgetc(source);
+ tokenValue[i] = c;
+ i++;
+ goto initLV1;
+ }
if (c == '>') {
c = fgetc(source);
tokenValue[i] = c;
if (c == '>') {
c = fgetc(source);
tokenValue[i] = c;
- if (c == '\n') {
- c = fgetc(source);
- tokenValue[i] = c;
- i++;
- goto initLV1;
- }
if (c == EOF) {
goto FIN;
} else {
if (c == EOF) {
goto FIN;
} else {
- if (c == '\n' || c == '\t') {
+ if (c == ' ' || c == '\t') {
c = fgetc(source);
tokenValue[i] = c;
i++;
goto initLV1;
}
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;
if (istAlpha()) {
c = fgetc(source);
tokenValue[i] = c;
- if (c == '\n') {
- c = fgetc(source);
- tokenValue[i] = c;
- i++;
- goto initLV1LV2;
- }
if (c == EOF) {
goto FIN;
}
if (c == EOF) {
goto FIN;
}
+ if (istAlpha()) {
+ goto NPARA;
+ }
if (c == '>') {
c = fgetc(source);
tokenValue[i] = c;
if (c == '>') {
c = fgetc(source);
tokenValue[i] = c;
- if (istAlpha()) {
- goto NPARA;
- }
if (c == EOF) {
goto FIN;
}
if (c == EOF) {
goto FIN;
}
} else {
printf ("Token type found: %s\n", tokenTypestr[tokenType]);
}
} else {
printf ("Token type found: %s\n", tokenTypestr[tokenType]);
}
i = 0;
memset(tokenValue, 0, sizeof(tokenValue));
} while (c != EOF); // tant que la fin du fichier n'est pas atteinte
i = 0;
memset(tokenValue, 0, sizeof(tokenValue));
} while (c != EOF); // tant que la fin du fichier n'est pas atteinte
Vient ensuite un ou plusieurs paragraphes optionnels comme celui que vous
lisez.
Vient ensuite un ou plusieurs paragraphes optionnels comme celui que vous
lisez.
Les paragraphes sont separes par une ou plusieurs lignes blanches. Vous
etes donc entrain de lire un deuxieme paragraphe.
Les sections sont introduites par le symbole plus suivi du titre, comme
Les paragraphes sont separes par une ou plusieurs lignes blanches. Vous
etes donc entrain de lire un deuxieme paragraphe.
Les sections sont introduites par le symbole plus suivi du titre, comme