projects
/
m6w6
/
ext-psi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
flush
[m6w6/ext-psi]
/
idl
/
main.c
diff --git
a/idl/main.c
b/idl/main.c
index c4664be36b45d426523d69d9487a0bfb0f0520ea..b132bbd3813f6e97029103abe845ace2305138f7 100644
(file)
--- a/
idl/main.c
+++ b/
idl/main.c
@@
-2,8
+2,6
@@
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
-#include "main.h"
-
static int TRACE;
static void loop(PSI_Lexer *L, void *P)
static int TRACE;
static void loop(PSI_Lexer *L, void *P)
@@
-32,8
+30,8
@@
static void loop(PSI_Lexer *L, void *P)
int main(int argc, char *argv[])
{
PSI_Lexer L;
int main(int argc, char *argv[])
{
PSI_Lexer L;
+ PSI_Parser P;
PSI_Validator V;
PSI_Validator V;
- void *P = PSI_ParserAlloc(malloc);
TRACE = !!getenv("TRACE");
TRACE = !!getenv("TRACE");
@@
-41,8
+39,12
@@
int main(int argc, char *argv[])
perror("Failed to init lexer");
return 1;
}
perror("Failed to init lexer");
return 1;
}
+ if (!PSI_ParserInit(&P)) {
+ perror("Failer to init parser");
+ return 1;
+ }
-
loop(&L, P
);
+
while (PSI_ParserParse(&p, &L)
);
PSI_ParserFree(P, free);
PSI_ParserFree(P, free);