X-Git-Url: https://git.piment-noir.org/?p=TP_AL_C.git;a=blobdiff_plain;f=lexer%2Fsyntactic_analyzer.c;h=5f14600699f60354ca18cf31189703244c7996d4;hp=65997ddfed47b40dad0ef4008599cbd8cb2a5828;hb=4a12843dc39175cab8102af9cd3397e2eb29a027;hpb=15ad4b5ab7b62ce2e966730ccd1932877d658b66 diff --git a/lexer/syntactic_analyzer.c b/lexer/syntactic_analyzer.c index 65997dd..5f14600 100644 --- a/lexer/syntactic_analyzer.c +++ b/lexer/syntactic_analyzer.c @@ -46,7 +46,7 @@ static void analyze_P() { if (tokenType == NPARA) { #if PRINT_TOKEN wprint_ctoken(stdout); - #endif + #endif /* PRINT_TOKEN */ scanner(); if (target != NULL) { fputws(L"

\n", target); @@ -70,8 +70,7 @@ static void analyze_HEAD() { #if DEBUG fprintf(stdout, "entering %s\n", __func__); #endif - if (tokenType == MOTCLE) { - //FIXME: Check if the MOTCLE token value is set to >Titre + if (tokenType == MOTCLE && wcscmp(L">Titre", (const wchar_t*)tokenValue) == 0) { if (target != NULL) { fputws(L"\n", target); fputws(L" ", target); @@ -81,12 +80,11 @@ static void analyze_HEAD() { if (target != NULL) { fputws(L"\n\n", target); } - if (tokenType == MOTCLE) { + if (tokenType == MOTCLE && wcscmp(L">Auteur", (const wchar_t*)tokenValue) == 0) { #if PRINT_TOKEN wprint_ctoken(stdout); #endif /* PRINT_TOKEN */ scanner(); - //The text contain the author fputws(L"", target);