r318: *** empty log message ***
[ctsim.git] / include / pol.h
index 262cccbc1c93aa557ac4374d66733c04db7e7e58..808b3803a45ea85282eb2cec78ef3b8656483e0f 100644 (file)
@@ -2,7 +2,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: pol.h,v 1.8 2000/12/27 20:09:19 kevin Exp $
+**  $Id: pol.h,v 1.9 2000/12/29 15:45:06 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -21,7 +21,7 @@
 #define __H_POL
 \r
 #include "hashtable.h"\r
-\r
+#include <stack>\r
 
 class POL {
   
@@ -167,6 +167,17 @@ private:
       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
+\r
   enum {\r
     MAXFILE = 8,\r
   };\r
@@ -178,12 +189,8 @@ private:
   char inputline[MAXLINE];             /* current input line */\r
   int lineptr;                 /* current position in inputline */\r
   \r
-  enum {\r
-    BUFSIZE = 100,\r
-  };\r
-  int bp;              // pointer to next free position \r
-  int buf[BUFSIZE];    // pushed back input characters \r
-  \r
+  std::stack<int> m_stackPushBackInput;\r
+\r
   bool skipSingleToken (char term[]);\r
   int tok (struct token_st *token);\r
   void dumptok (struct token_st *token);\r