summaryrefslogtreecommitdiff
path: root/src/pdarun.c
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2018-05-14 21:01:48 -0400
committerAdrian Thurston <thurston@colm.net>2018-05-14 21:01:48 -0400
commit8b79a2ca4b955742bee4f6f73fff0fad9a30f26a (patch)
treecc0eabeec5c6cad5cc475ab0b6bf691450c6140a /src/pdarun.c
parentbd0042d9fa75bd7c2c638a747fc7ab03601e859c (diff)
downloadcolm-8b79a2ca4b955742bee4f6f73fff0fad9a30f26a.tar.gz
don't issue parse finish instructions if parse stop enabled
Diffstat (limited to 'src/pdarun.c')
-rw-r--r--src/pdarun.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/pdarun.c b/src/pdarun.c
index c1d45796..2914e562 100644
--- a/src/pdarun.c
+++ b/src/pdarun.c
@@ -2249,26 +2249,24 @@ long colm_parse_finish( program_t *prg, tree_t **sp,
switch ( entry ) {
case PCR_START:
- if ( pda_run->stop_target <= 0 ) {
- si = stream_to_impl( input );
- si->funcs->set_eof( si );
+ si = stream_to_impl( input );
+ si->funcs->set_eof( si );
- if ( ! pda_run->parse_error ) {
- si = stream_to_impl( input );
- long pcr = colm_parse_loop( prg, sp, pda_run, si, entry );
+ if ( ! pda_run->parse_error ) {
+ si = stream_to_impl( input );
+ long pcr = colm_parse_loop( prg, sp, pda_run, si, entry );
- while ( pcr != PCR_DONE ) {
+ while ( pcr != PCR_DONE ) {
- /* COROUTINE */
- return pcr;
- case PCR_REDUCTION:
- case PCR_GENERATION:
- case PCR_PRE_EOF:
- case PCR_REVERSE:
+ /* COROUTINE */
+ return pcr;
+ case PCR_REDUCTION:
+ case PCR_GENERATION:
+ case PCR_PRE_EOF:
+ case PCR_REVERSE:
- si = stream_to_impl( input );
- pcr = colm_parse_loop( prg, sp, pda_run, si, entry );
- }
+ si = stream_to_impl( input );
+ pcr = colm_parse_loop( prg, sp, pda_run, si, entry );
}
}