start validator
[m6w6/ext-psi] / idl / lexer.h
index e3f7c5f2d350d9cbbbd439338e744cf267ed2339..be1ee574be95de0c64442ba340c246cfc07fcefd 100644 (file)
@@ -1,30 +1,27 @@
 #define BSIZE 256
 
 typedef int token_t;
-typedef unsigned char text;
 
 typedef struct PSI_Token {
        token_t type;
        unsigned line;
-       text text[1];
+       size_t size;
+       char text[1];
 } PSI_Token;
 
-typedef struct impl impl;
-typedef struct decl decl;
+typedef struct impls impls;
+typedef struct decls decls;
+typedef struct decl_typedefs decl_typedefs;
 
 typedef struct PSI_Lexer {
-       FILE *fp;
+       decl_typedefs *defs;
+       decls *decls;
+       impls *impls;
+       char *lib;
        char *fn;
-       struct {
-               size_t count;
-               decl **list;
-       } decl;
-       struct {
-               size_t count;
-               impl **list;
-       } impl;
+       FILE *fp;
        size_t line;
-       text *cur, *tok, *lim, *eof, *ctx, *mrk, buf[BSIZE];
+       char *cur, *tok, *lim, *eof, *ctx, *mrk, buf[BSIZE];
 } PSI_Lexer;
 
 PSI_Lexer *PSI_LexerInit(PSI_Lexer *L, const char *filename);