diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-06 22:50:52 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-06 22:50:52 -0700 |
commit | dcc75348c720acd6c2a0587bca34f7851e6c1283 (patch) | |
tree | 2eb725ccba3e27da07ad81344113ce2219377ebd /stream.c | |
parent | a17db859170976269eb79ddb0bbcbd5afabd45d7 (diff) | |
download | txr-dcc75348c720acd6c2a0587bca34f7851e6c1283.tar.gz txr-dcc75348c720acd6c2a0587bca34f7851e6c1283.tar.bz2 txr-dcc75348c720acd6c2a0587bca34f7851e6c1283.zip |
Reset flex scanner if exception thrown during read.
We must tear down and rebuild the Flex scanner, otherwise
it is left in a bad state causing it to abort.
* parser.c (parser_cleanup): After destroying scanner,
null out the pointer.
(parser_reset): Destroy the Flex scanner, and
instantiate a new one in its place.
(lisp_parse): Set up an unwind catch which will
reset the parser if it was aborted by an exception.
* parser.h (parser_reset): Declared.
Diffstat (limited to 'stream.c')
0 files changed, 0 insertions, 0 deletions