/* MasC interpreter/compiler (Master Assembly Script Container) written by Jared Bruni After reading Writing Compilers and Interpreters A approach using C++ by Ronald Mak and the Dragon Book code completly re-written but using concepts teached in this book */ // Lexical Anaylizer header file #ifndef lex_H_ #define lex_H_ #include "backend.h" #include "parser.h" extern int err; int syntaxCheck(struct Token *tokens, int token_length, struct BackEnd *bend); int lexAnaylize(struct text_in *text_buffer); int lexProccess(char *sptr); int Anaylize(char *sptr, char *tmp_buf); int printerror(char *fmt, ...); char *getnexttoken(char *source, char *tmp_buf); char *putbacktoken(); void initLabelTable(char *ptr_c, char *tmp_buf); void initProcedureTable(char *ptr_c, char *tmp_buf); void checkCall(char *ptr_c, char *tmp_buf); int checkInstructions(char *ptr_c, char *tmp_buf); void checkVariables(char *ptr_c, char *tmp_buf); #endif