//============================ lex.c ================================
//===================================================================
struct lex_file {
- FILE *file;
- char peek [5];
+ FILE *file; /* file handler */
+ char *name; /* name of file */
+ char peek [5];
char lastok[8192];
- int line;
- int last;
- int current;
- int length;
- int size;
+
+ int last; /* last token */
+ int current; /* current token */
+
+ int length; /* bytes left to parse */
+ int size; /* never changes (size of file) */
+ int line; /* what line are we on? */
};
/*
#define LEX_STRLIT 1130
#define LEX_IDENT 1131
-int lex_token(struct lex_file *);
-void lex_reset(struct lex_file *);
-void lex_close(struct lex_file *);
-struct lex_file *lex_open (FILE *);
+int lex_token (struct lex_file *);
+void lex_reset (struct lex_file *);
+void lex_close (struct lex_file *);
+struct lex_file *lex_include(struct lex_file *, char *);
+struct lex_file *lex_open (FILE *);
//===================================================================
//========================== error.c ================================
//===================================================================
//========================== parse.c ================================
//===================================================================
-int parse_tree(struct lex_file *);
-struct parsenode {
- struct parsenode *next;
- int type; /* some token */
-};
+int parse_gen(struct lex_file *);
//===================================================================
//========================== typedef.c ==============================
INSTR_BITOR
};
-
void code_write();
#endif