8 int main(int argc
, char *argv
[])
14 if (getenv("TRACE")) {
15 flags
|= PSI_PARSER_DEBUG
;
18 if (!PSI_ParserInit(&P
, argv
[1], flags
)) {
19 perror("Failer to init parser");
23 while (-1 != PSI_ParserScan(&P
)) {
24 PSI_ParserParse(&P
, PSI_TokenAlloc(&P
));
26 PSI_ParserParse(&P
, NULL
);
28 if (!PSI_ValidatorInit(&V
, &P
)) {
29 perror("Failed to init validator");
35 if (PSI_ValidatorValidate(&V
)) {
36 printf("Whoa! VALID.\n");
38 PSI_ValidatorDtor(&V
);