diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-09-02 19:46:18 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-09-02 19:46:18 -0700 |
commit | 1572c93478c55ff14738a4b6f1b38dc41878a816 (patch) | |
tree | 3d02c3c2ab4c76af0ae6ce7f049edfa64405d04c /txr.1 | |
parent | 0207bdeab644efddce25225c7344aabfb6d73f1f (diff) | |
download | txr-1572c93478c55ff14738a4b6f1b38dc41878a816.tar.gz txr-1572c93478c55ff14738a4b6f1b38dc41878a816.tar.bz2 txr-1572c93478c55ff14738a4b6f1b38dc41878a816.zip |
* eval.c (eval_init): Update registration of lisp-parse and read
to account for new parameter.
* lib.c (syntax_error_s): New symbol_variable.
(obj_init): New symbol variable initialized.
* lib.h (syntax_error_s): Declared.
* parser.h (lisp_parse): Declaration updated.
* parser.l (lisp_parse): Takes third parameter.
* txr.1: Third parameter of read described.
* txr.c (txr_main): Pass colon_k to third parameter of lisp_parse
to obtain exception throwing behavior.
* unwind.c (uw_init): Register syntax-error as subtype of error.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -13572,8 +13572,7 @@ Examples of strings which are not absolute paths. .TP Syntax: - (read [ <source> [<error-stream>] ]) - (lisp-parse <source> [<error-stream>]) ;; obsolescent synonym for read + (read [<source> [<error-stream> [<error-return-value>]]]) .TP Description: @@ -13591,8 +13590,10 @@ to convert it to a string stream. The optional <error-stream> argument can be used to specify a stream to which parse errors diagnostics are sent. If absent, the diagnostics are suppressed. -If there are parse errors, the function returns nil; otherwise, it returns the -parsed data structure. +If there are no parse errors, the function returns the parsed data +structure. If there are parse errors, and the <error-return-value> parameter is +present, its value is returned. If the <error-return-value> parameter +is not present, then an exception of type syntax-error is thrown. .SH FILESYSTEM ACCESS |