summaryrefslogtreecommitdiffstats
path: root/parser.y
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-09-06 22:26:31 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-09-06 22:26:31 -0700
commite131e81e72f37d29bd237d0052bb9f6febd7ffd0 (patch)
tree377e3e545eb115d9a188d9971df1674aa1159c64 /parser.y
parent2a99dce03f1e4c0662e945280ed0dc4c919272df (diff)
downloadtxr-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.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parser.y b/parser.y
index 265e4e30..a29403f0 100644
--- a/parser.y
+++ b/parser.y
@@ -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);
}