#define BSIZE 256
typedef int token_t;
-typedef char text;
typedef struct PSI_Token {
token_t type;
unsigned line;
size_t size;
- text text[1];
+ char text[1];
} PSI_Token;
typedef struct impls impls;
typedef struct decl_typedefs decl_typedefs;
typedef struct PSI_Lexer {
- FILE *fp;
- char *fn;
- char *lib;
decl_typedefs *defs;
decls *decls;
impls *impls;
+ char *lib;
+ char *fn;
+ 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);