diff options
author | Adrian Thurston <thurston@complang.org> | 2015-11-30 16:26:39 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-11-30 16:26:39 -0500 |
commit | 5e75abcbc165994b9c28fe98c1944da4ce31a7cb (patch) | |
tree | ef1fc4a4c275b4fe01a3458c5b4da2e348a42940 /src/pdarun.h | |
parent | dd66b443403b72ef2e2a076db471d6d819d95e05 (diff) | |
download | colm-5e75abcbc165994b9c28fe98c1944da4ce31a7cb.tar.gz |
allow omission of location in reductions
There is code in here for omission of location and data in reductions.
Unfortunately we cannot enable the omission of data unless we make changes to
the backtracking. In the current implementation we push the token data with an
mcopy from the data in the token.
Diffstat (limited to 'src/pdarun.h')
-rw-r--r-- | src/pdarun.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/pdarun.h b/src/pdarun.h index 7af9ac0f..434f6631 100644 --- a/src/pdarun.h +++ b/src/pdarun.h @@ -454,13 +454,17 @@ long colm_parse_undo_frag( struct colm_program *prg, tree_t **sp, struct pda_run void commit_clear_parse_tree( program_t *prg, tree_t **sp, struct pda_run *pda_run, parse_tree_t *pt ); -void commit_reduce_forward( program_t *prg, tree_t **root, - struct pda_run *pda_run, parse_tree_t *pt ); void commit_reduce( program_t *prg, tree_t **root, struct pda_run *pda_run ); -long commit_union_sz( int reducer ); +/* Supplied by generated code. */ +void commit_reduce_forward( program_t *prg, tree_t **root, + struct pda_run *pda_run, parse_tree_t *pt ); +long commit_union_sz( int reducer ); +void init_need(); +int reducer_need_tok( program_t *prg, struct pda_run *pda_run, int id ); +int reducer_need_ign( program_t *prg, struct pda_run *pda_run ); #ifdef __cplusplus } |