Add includes to avoid missing prototype warning.
[TP_AL_C.git] / lexer / syntactic_analyzer.c
index 5f14600699f60354ca18cf31189703244c7996d4..0f1b1818b3a6c2ced9a65c8cc912fe3bd61385e2 100644 (file)
@@ -1,12 +1,12 @@
 /* Syntactic analyzer */
 
 #include <stdbool.h>
-#include <stdarg.h>
 #include <stdlib.h>
 
 #include "global_vars.h"
-#include "lexical_analyzer.h"
 #include "print_helper.h"
+#include "syntactic_analyzer.h"
+#include "lexical_analyzer.h"
 
 #define PRINT_TOKEN 1
 
@@ -47,10 +47,10 @@ static void analyze_P() {
         #if PRINT_TOKEN
         wprint_ctoken(stdout);
         #endif /* PRINT_TOKEN */
-        scanner();
         if (target != NULL) {
             fputws(L"<p>\n", target);
         }
+        scanner();
         analyze_TEXT();
         if (target != NULL) {
             fputws(L"\n</p>\n", target);
@@ -84,8 +84,8 @@ static void analyze_HEAD() {
             #if PRINT_TOKEN
             wprint_ctoken(stdout);
             #endif /* PRINT_TOKEN */
-            scanner();
             fputws(L"<meta name=\"author\" content=\"", target);
+            scanner();
             analyze_TEXT();
             fputws(L"\">", target);
         } else if (tokenType != NPARA && tokenType != SECTION && tokenType != FIN) {
@@ -195,7 +195,7 @@ static void analyze_BODY() {
     #endif
 }
 
-void analyze_AXIOME() {
+void analyze_AXIOME(void) {
     #if DEBUG
     fprintf(stdout, "entering %s\n", __func__);
     #endif
@@ -217,6 +217,9 @@ void analyze_AXIOME() {
     if (target != NULL) {
         fputws(L"\n<body>\n", target);
     }
+    #if PRINT_TOKEN
+    wprint_ctoken(stdout);
+    #endif /* PRINT_TOKEN */
     if (tokenType != FIN) {
         fprintf(stderr, "%s follows error on %s\n", __func__, tokenTypestr[tokenType]);
         fflush(stderr);