code structure
[m6w6/ext-psi] / idl / main.c
diff --git a/idl/main.c b/idl/main.c
deleted file mode 100644 (file)
index db88740..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "parser.h"
-#include "validator.h"
-
-int main(int argc, char *argv[])
-{
-       PSI_Parser P;
-       PSI_Validator V;
-       unsigned flags = 0;
-
-       if (getenv("TRACE")) {
-               flags |= PSI_PARSER_DEBUG;
-       }
-
-       if (!PSI_ParserInit(&P, argv[1], flags)) {
-               perror("Failer to init parser");
-               return 1;
-       }
-
-       while (-1 != PSI_ParserScan(&P)) {
-               PSI_ParserParse(&P, PSI_TokenAlloc(&P));
-       };
-       PSI_ParserParse(&P, NULL);
-
-       if (!PSI_ValidatorInit(&V, &P)) {
-               perror("Failed to init validator");
-               return 2;
-       }
-
-       PSI_ParserDtor(&P);
-
-       if (PSI_ValidatorValidate(&V)) {
-               printf("Whoa! VALID.\n");
-       }
-       PSI_ValidatorDtor(&V);
-
-       return 0;
-}