summaryrefslogtreecommitdiff
path: root/src/struct.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2015-10-05 15:58:31 -0400
committerAdrian Thurston <thurston@complang.org>2015-10-05 15:58:31 -0400
commitcbca35717204e8a02e71c3a3e67eaf9f5a0f4019 (patch)
tree0140ea6f6fd2c6efc341e370afafb9d44e3a61d1 /src/struct.h
parent2c8090f0b665281827c7867f957a224f1d1b6cae (diff)
downloadcolm-cbca35717204e8a02e71c3a3e67eaf9f5a0f4019.tar.gz
put reducer code in its own file, use local parse tree pool
Diffstat (limited to 'src/struct.h')
-rw-r--r--src/struct.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/struct.h b/src/struct.h
index ce3d374a..25000fbb 100644
--- a/src/struct.h
+++ b/src/struct.h
@@ -5,6 +5,8 @@
extern "C" {
#endif
+#include <stdbool.h>
+
typedef void (*colm_destructor_t)( struct colm_program *prg,
tree_t **sp, struct colm_struct *s );
@@ -128,7 +130,8 @@ struct colm_struct *colm_struct_inbuilt( struct colm_program *prg, int size,
#define colm_struct_to_map_el( prg, obj, genId ) \
colm_struct_get_addr( obj, map_el_t*, prg->rtd->generic_info[genId].el_offset )
-parser_t *colm_parser_new( struct colm_program *prg, struct generic_info *gi );
+parser_t *colm_parser_new( struct colm_program *prg,
+ struct generic_info *gi, bool reducer );
stream_t *colm_stream_new( struct colm_program *prg );
stream_t *colm_stream_new_struct( struct colm_program *prg );
@@ -148,6 +151,7 @@ struct colm_struct *colm_map_get( struct colm_program *prg, map_t *map,
word_t gen_id, word_t field );
struct colm_struct *colm_construct_generic( struct colm_program *prg, long generic_id );
+struct colm_struct *colm_construct_reducer( struct colm_program *prg, long generic_id );
#define STRUCT_INBUILT_ID -1