![]() |
Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members
Parser.hGo to the documentation of this file.00001 #ifndef _PARSER_H 00002 #define _PARSER_H 00003 00004 //#include <map> 00005 00006 #define OBUFSIZE 1024 00007 00008 #define THIS ((Parser *)parser) 00009 00010 00011 class ParserIO; 00012 00013 class Parser 00014 { 00015 public: 00016 Parser(); 00017 Parser(char *program); 00018 ~Parser(); 00019 00020 void strupr(char *); 00021 void addlist(void *,void *); 00022 void removelist(void *,void *); 00023 void read_file(char *); 00024 void write_file(); 00025 VARIABLE *reg_variable(char *name,EXPRLIST *p); 00026 void verify_filename(char *s); 00027 void text_output(char *s); 00028 void pprintf(char *format, ...); 00029 void file_input(char *s,int l); 00030 void get_data(char *s); 00031 void read_data(VARLIST *vl); 00032 void SetParserIO(ParserIO *); 00033 void flush_obuf(); 00034 int inputstring(char *,int); 00035 void save_variables(); 00036 void load_variables(); 00037 VARIABLE *get_variable(char *name); 00038 int peek(int); 00039 void poke(int,int); 00040 void execute(void); 00041 void finish(void); 00042 void cmd(char *s); 00043 int editcmd(char *s); 00044 00045 ParserIO *m_pclParserIO; 00046 FILE *m_fil; 00047 LINE *m_linebase; 00048 LINE *m_current_line; 00049 LINE *m_next_line; 00050 LINE *m_onerror; 00051 NEXT *m_nextbase; 00052 DATA *m_database; 00053 DATA *m_current_data; 00054 SUB *m_subbase; 00055 FUNC *m_funcbase; 00056 VARIABLE *m_placeholder; 00057 int m_running; 00058 int m_the_ptr; 00059 int m_file_read; 00060 int m_file_write; 00061 int m_tab_pos; 00062 int m_dataptr; 00063 char m_run_program[40]; 00064 char m_the_str[1024]; 00065 char m_programname[40]; 00066 char m_program_cwd[200]; 00067 // map<int,int> m_mem; 00068 00069 private: 00070 VARIABLE *m_variablebase; 00071 OPEN *m_openbase; 00072 int m_obufptr; 00073 int m_load_ok; 00074 char m_obuf[OBUFSIZE]; 00075 }; 00076 00077 00078 #endif // _PARSER_H |