Module Types.Parse_ctypes

This file handles translation and desugaring between the types concrete syntax (defined in Type_parser) to the abstract syntax (defined in TypedC).

val parse_file : infer_spec:bool -> string -> unit

Parse a file and fills the definitions using the TypedC imperative interface.

val type_of_string : string -> TypedC.typ

Parses a string as a Ctype.

val init : data_model:[< `ILP32 | `LLP64 | `LP64 ] -> unit

Initialize the library with base type, which require setting up a data model, i.e. the size of int, long, pointers etc in bytes. See https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models.

Must be call before we can parse types containing sizes that depend on a data model, like short/int/long/long long and pointers.