Mercurial > hg > octave-nkf
changeset 4318:115bffcecfd3
[project @ 2003-02-13 05:52:16 by jwe]
author | jwe |
---|---|
date | Thu, 13 Feb 2003 05:52:16 +0000 |
parents | 1ced186d4b6b |
children | 05973ead74eb |
files | src/ChangeLog src/error.cc src/error.h src/lex.l src/parse.y src/toplev.cc |
diffstat | 6 files changed, 23 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2003-02-12 John W. Eaton <jwe@bevo.che.wisc.edu> + + * error.cc (reset_error_handler): New function. + * toplev.cc (main_loop): Use it here. + * lex.l (reset_parser): Don't set error_state and warning_state here. + * parse.y (eval_string): Reset parser before calling yyparse. + 2003-01-29 John W. Eaton <jwe@bevo.che.wisc.edu> * data.cc (Ffmod): New function.
--- a/src/error.cc +++ b/src/error.cc @@ -103,6 +103,15 @@ // The message buffer. static OSSTREAM *error_message_buffer = 0; +void +reset_error_handler (void) +{ + error_state = 0; + warning_state = 0; + buffer_error_messages = false; + discard_error_messages = false; +} + // Warning messages are never buffered. static void
--- a/src/error.h +++ b/src/error.h @@ -29,6 +29,8 @@ panic ("impossible state reached in file `%s' at line %d", \ __FILE__, __LINE__) +extern void reset_error_handler (void); + extern void message (const char *name, const char *fmt, ...); extern void usage (const char *fmt, ...); extern void warning (const char *fmt, ...);
--- a/src/lex.l +++ b/src/lex.l @@ -842,8 +842,7 @@ { // Start off on the right foot. BEGIN 0; - error_state = 0; - warning_state = 0; + parser_end_of_input = false; end_tokens_expected = 0;