projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r323: *** empty log message ***
[ctsim.git]
/
include
/
pol.h
diff --git
a/include/pol.h
b/include/pol.h
index 262cccbc1c93aa557ac4374d66733c04db7e7e58..1d149896801205c8621c6fe971ecaaf0bb70644f 100644
(file)
--- a/
include/pol.h
+++ b/
include/pol.h
@@
-2,7
+2,7
@@
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
** 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.
10 2000/12/29 20:11:42
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
**
** 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
#define __H_POL
\r
#include "hashtable.h"
\r
-
\r
+#include <stack>
\r
class POL {
class POL {
@@
-38,7
+38,7
@@
class POL {
~POL();
void init ();
~POL();
void init ();
- void addSkipWord (const char
const *
w);
+ void addSkipWord (const char
* const
w);
void addSkipChar (int c);
void addKeyword (const char* const str, int code);
bool readWord (char *search, int nlet);
void addSkipChar (int c);
void addKeyword (const char* const str, int code);
bool readWord (char *search, int nlet);
@@
-167,6
+167,17
@@
private:
PC_DUMP,
\r
};
\r
\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
+
\r
enum {
\r
MAXFILE = 8,
\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
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
bool skipSingleToken (char term[]);
\r
int tok (struct token_st *token);
\r
void dumptok (struct token_st *token);
\r