+ \r
+private:\r
+ \r
+ // codes for pol_int and pol_float \r
+ // if in reject catagory, get new number from terminal \r
+ enum {\r
+ P_FLTINT = 1, // get a real or integer number \r
+ P_BFLTINT, // get a real or integer number, clip against bounds \r
+ P_CBFLTINT, // get real or int, reject if outside bounds \r
+ P_FLT, // get a real number \r
+ P_BFLT, // get a real, clip against bounds \r
+ P_CBFLT, // get a floating, reject if outside bounds \r
+ P_INT, // get a integer number \r
+ P_BINT, // get a integer, clip against bounds \r
+ P_CBINT, // get a integer, reject if outside bounds \r
+ };\r
+ \r
+#define LETTER 'a'\r
+#define DIGIT '0'\r
+ \r
+ \r
+// typedef std::map<std::string,int> KeywordCodeList;\r
+ \r
+ struct token_st {\r
+ int ready; // TRUE if token is ready \r
+ // std::string tokstr; // token string \r
+ char tokstr[MAXTOK+1];\r
+ int type; // type of token 'TT_' \r
+ int code; // holds code for user defined tokens \r
+ double fnum; // real value of token \r
+ int inum; // integer value of token \r
+ };\r
+ typedef struct token_st TOKEN;\r
+ struct token_st token; // current token \r
+ \r
+ // Tables words stored with install() & found with lookup() \r
+ KeywordCodeHashTable skiptable; // words to ignore and skip \r
+ KeywordCodeHashTable cmdtable; // pol parameter commands \r
+ KeywordCodeHashTable usertable; // user defined symbols \r
+ \r
+ struct metachar {\r
+ char eoc; /* end of command character */\r
+ char str; /* string delimiter */\r
+ char com; /* comment character */\r
+ char cmd; /* pol parameter command character */\r
+ char prg; /* program load character */\r
+ char con; /* continuation across newline character */\r
+ char out; /* character that delimits output to terminal */\r
+ char ter; /* character indicates insertion of input from terminal */\r
+ char inb; /* input from graphics device */\r
+ } meta;\r
+ \r
+ \r
+ char m_szSkipChars [MAXSKIPCHAR]; // characters to skip\r
+ bool m_bTrace;\r
+ bool m_bNewlineIsEOC;\r
+ \r
+ struct KeywordCodeList {\r
+ char *keyword;\r
+ int code;\r
+ };\r
+ \r
+ static const struct KeywordCodeList cmdlist[];\r
+ static const unsigned int NUMCMD;\r
+ \r
+ // Internal codes for pol commands \r
+ enum {\r
+ PC_EOC = 1,\r
+ PC_STR,\r
+ PC_COM,\r
+ PC_CMD,\r
+ PC_PRG,\r
+ PC_CON, \r
+ PC_OUT,\r
+ PC_TER,\r
+ PC_INB, \r
+ PC_NL_EOC,\r
+ PC_NL_NEOC,\r
+ PC_TRON,\r
+ PC_TROFF,\r
+ PC_FILE,\r
+ PC_DUMP,\r
+ };\r
+ \r
+ enum {\r
+ INPUT_STREAM = 1,\r
+ INPUT_FILE,\r
+ INPUT_STRING,\r
+ };\r
+\r
+ int m_iInputType;\r
+ std::istream* m_pInputStream;\r
+ FILE* m_pInputFile;\r
+ char* m_pszInputString;\r