1 /***********************************************************************
2 * Program: rule_info_dumper.c
3 * Function: Dumps C source code containig information about the
4 * generated GrGen rules into a .h file to be included
5 * when the compiler is recompiled to use the new GrGen
7 * Author: Andreas Schoesser
9 ************************************************************************/
11 #ifndef __RULE_INFO_DUMPER__
12 #define __RULE_INFO_DUMPER__
15 #include "create_pattern_t.h"
19 typedef struct // Holds information throughout the lifetime of a rule_info_dumper instance
21 FILE *output_file; // The file the rule information is written to
22 int num_rules; // Holds the number of rules dumped so far
26 rule_info_env_t *init_rule_info_dumper(int max_num_rules);
27 void deinit_rule_info_dumper(rule_info_env_t *rule_info_env);
28 void dump_rule_info(rule_info_env_t *rule_info_env, graph_ana_info_t *graph_ana_info, int arity);