- * Struct_classify.shape_field_struct list
- * Struct_classify.content_field_struct list) list ->
- Camlp4.PreCast.Syntax.Ast.str_item * Camlp4.PreCast.Syntax.Ast.sig_item
- (** [generate_types structures] generates the internal
- types used to store variants of each structure, including:
- - shape field structures
- - content field structures
+ * (string * (Pahole_parser.f_type * bool)) list) list ->
+ code
+ (** [generate_types structures] generates the
+ types used to store each structure.
+ *)
+
+(** {2 Generate offset functions}
+
+ [offset_of_<struct>_<field> kernel_version] functions.
+
+ These actually play a very minor role: We just use them when
+ adjusting [list_head] pointers which cross between structure
+ types, so we only generate functions for those right now.
+*)
+
+val generate_offsets :
+ (string * ((Pahole_parser.info * Pahole_parser.structure) list
+ * (string * (Pahole_parser.f_type * bool)) list)) list ->
+ code
+ (** [generate_offsets] generates the offset functions. *)
+
+(** {2 Generate parsers}
+
+ Functions which parse the different structures from bitstrings
+ into our internal types.
+*)
+
+val generate_parsers :
+ (string * ((string * (Pahole_parser.f_type * bool)) list
+ * Minimizer.parser_ list)) list ->
+ code * (string, string) Hashtbl.t
+ (** [generate_parsers] generates the parser functions.
+
+ We cannot generate the complete code here because we
+ don't want camlp4 parsing this file to substitute bitmatch
+ code yet. So we only generate labels, which get substituted
+ by the contents of the returned hash table in {!output_implem}.