diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-09-06 22:26:31 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-09-06 22:26:31 -0700 |
commit | e131e81e72f37d29bd237d0052bb9f6febd7ffd0 (patch) | |
tree | 377e3e545eb115d9a188d9971df1674aa1159c64 /parser.y | |
parent | 2a99dce03f1e4c0662e945280ed0dc4c919272df (diff) | |
download | txr-e131e81e72f37d29bd237d0052bb9f6febd7ffd0.tar.gz txr-e131e81e72f37d29bd237d0052bb9f6febd7ffd0.tar.bz2 txr-e131e81e72f37d29bd237d0052bb9f6febd7ffd0.zip |
txr -i honored despite parse-time exception.
If an error is thrown while parsing a .txr file
or while reading and evaluating the forms of a .tl
file.
* parser.y (parse_once, parse): Wording change in message when
exception is caught. Only exceptions derived from error are
caught.
* txr.c (parse_once_noerr, read_eval_stream_noerr): New static
functions.
(txr_main): Use parse_once_noerr and read_eval_stream_noerr
instead of parse_once and read_eval_stream.
Don't exit if a TXR file has parser errors; in that situation,
exit only if interactive mode is not requested, otherwise
go interactive. Make sure *self-path* is registered to the
name of the input source in this case also.
* unwind.h (ignerr_func_body): New macro.
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1839,7 +1839,7 @@ int parse_once(val stream, val name, parser_t *parser) parser_resolve_circ(parser); uw_catch(esym, eobj) { - yyerrorf(parser->scanner, lit("exception during parse"), nao); + yyerrorf(parser->scanner, lit("error exception during parse"), nao); uw_throw(esym, eobj); } @@ -1878,7 +1878,7 @@ int parse(parser_t *parser, val name, enum prime_parser prim) parser_resolve_circ(parser); uw_catch(esym, eobj) { - yyerrorf(parser->scanner, lit("exception during parse"), nao); + yyerrorf(parser->scanner, lit("error exception during parse"), nao); uw_throw(esym, eobj); } |