While rlparser can work with other C headers, they must follow specific structural patterns to be parsed correctly:
Functions
Must be on a single line with this structure:
<retType> <name>(<paramType[0]> <paramName[0]>, <paramType[1]> <paramName[1]>); <desc>
Warning: Breaking functions into multiple lines will break the parsing process.
Structures
Must follow this multi-line format:
<desc>
typedef struct <name> {
<fieldType[0]> <fieldName[0]>; <fieldDesc[0]>
<fieldType[1]> <fieldName[1]>; <fieldDesc[1]>
} <name>;
Enums
Must follow this multi-line format:
<desc>
typedef enum {
<valueName[0]> = <valueInteger[0]>, <valueDesc[0]>
<valueName[1]>,
<valueName[2]>, <valueDesc[2]>
} <name>;
Enum Rules:
- If a value is not provided, it is assigned as
(<previous_value> + 1). - Value descriptions are optional.