Ray 273c780b67 | 2 years ago | |
---|---|---|
.. | ||
LICENSE | 3 years ago | |
Makefile | 2 years ago | |
README.md | 2 years ago | |
raylib_api.json | 2 years ago | |
raylib_api.lua | 2 years ago | |
raylib_api.txt | 2 years ago | |
raylib_api.xml | 2 years ago | |
raylib_parser.c | 2 years ago |
This parser scans raylib.h
to get information about defines
, structs
, enums
and functions
.
All data is separated into parts, usually as strings. The following types are used for data:
struct DefineInfo
struct FunctionInfo
struct StructInfo
struct EnumInfo
Check raylib_parser.c
for details about those structs.
The parser can take a few options...
--help
Displays help information about the parser--json
Outputs the header information in JSON formatThis parser is specifically designed to work with raylib.h, so, it has some constraints:
<retType> <name>(<paramType[0]> <paramName[0]>, <paramType[1]> <paramName[1]>); <desc>
Be careful with functions broken into several lines, it breaks the process!
<desc>
typedef struct <name> {
<fieldType[0]> <fieldName[0]>; <fieldDesc[0]>
<fieldType[1]> <fieldName[1]>; <fieldDesc[1]>
<fieldType[2]> <fieldName[2]>; <fieldDesc[2]>
} <name>;
<desc>
typedef enum {
<valueName[0]> = <valueInteger[0]>, <valueDesc[0]>
<valueName[1]>,
<valueName[2]>, <valueDesc[2]>
<valueName[3]> <valueDesc[3]>
} <name>;
NOTE: For enums, multiple options are supported:
This parser could work with other C header files if mentioned constraints are followed.
This parser does not require <string.h>
library, all data is parsed directly from char buffers.
raylib-parser is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check LICENSE for further details.