This module parses the header string, produces an AST for the C code and
extracts type information for a requested set of functions. This implies
it finds the function prototypes and recursively unwraps typedefs until
it reaches types defined by the C language. This process is split in
- Find involved declarations from the AST (prototypes//2)
- Unwrap the types (expand_types//1)
- c99_types(+Header, +Flags, +Functions, -Types) is det
- c99_types(+Header, +Flags, +Functions, -Types, Consts) is det
- True when Types contains the necessary declarations for Functions.
Types are expanded to scalar types, structs, unions and enums.
|Functions||- is a list of function names. Optionally, a name may
be embedded in a list to indicate it is not an error if the funtion
is not present.|
- ast_constant(+AST, -Constant) is det
- ast_constant(+AST, -Constant, +Types) is det
- Evaluate an AST expression to a constant.
- To be done
- - : complete operators. Clarify what to do with limited range
integers and overflows.
- c99_header_ast(+Header, +Flags, -AST)
The following predicates are exported, but not or incorrectly documented.
- c99_types(Arg1, Arg2, Arg3, Arg4, Arg5)