summaryrefslogtreecommitdiffstats
path: root/Parser/tokenizer.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-05-12 08:24:20 (GMT)
committerGuido van Rossum <guido@python.org>1993-05-12 08:24:20 (GMT)
commit6ac258d381b5300e3ec935404a111e8dff4617d4 (patch)
tree476a8c807f8f91cc5c259af586b3470201a9c2c1 /Parser/tokenizer.h
parentad4fcd49fc5c9ec93743f93da518b84e0634ea59 (diff)
downloadcpython-6ac258d381b5300e3ec935404a111e8dff4617d4.zip
cpython-6ac258d381b5300e3ec935404a111e8dff4617d4.tar.gz
cpython-6ac258d381b5300e3ec935404a111e8dff4617d4.tar.bz2
* pythonrun.c: Print exception type+arg *after* stack trace instead of
before it. * ceval.c, object.c: moved testbool() to object.c (now extern visible) * stringobject.c: fix bugs in and rationalize string resize in formatstring() * tokenizer.[ch]: fix non-working code for lines longer than BUFSIZ
Diffstat (limited to 'Parser/tokenizer.h')
-rw-r--r--Parser/tokenizer.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/Parser/tokenizer.h b/Parser/tokenizer.h
index 636295a..9abc598 100644
--- a/Parser/tokenizer.h
+++ b/Parser/tokenizer.h
@@ -31,12 +31,13 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Tokenizer state */
struct tok_state {
/* Input state; buf <= cur <= inp <= end */
- /* NB an entire token must fit in the buffer */
- char *buf; /* Input buffer */
+ /* NB an entire line is held in the buffer */
+ char *buf; /* Input buffer, or NULL; malloc'ed if fp != NULL */
char *cur; /* Next character in buffer */
char *inp; /* End of data in buffer */
- char *end; /* End of input buffer */
- int done; /* 0 normally, 1 at EOF, -1 after error */
+ char *end; /* End of input buffer if buf != NULL */
+ int done; /* E_OK normally, E_EOF at EOF, otherwise error code */
+ /* NB If done != E_OK, cur must be == inp!!! */
FILE *fp; /* Rest of input; NULL if tokenizing a string */
int tabsize; /* Tab spacing */
int indent; /* Current indentation index */