Here's my attempt. (Attached as ini rather than txt to get past the filesize limit.)
My regex:
Code:
Function:
^(?:stock Handle:| XS_LIBFUNC_ATTRIB bool:| XS_LIBFUNC_ATTRIB Float:| XS_LIBFUNC_ATTRIB | stock Float:| stock bool:| stock |stock Float:|stock bool:|forward |native bool:|native Float:|native |public |stock |Float:|bool:)?([\w_\-\d]+)[\s]?(\(.*?\))
Constant:
^(?:#define|new const)\s+([^_][A-Z\d_]+)
Macro:
^(?:#define|new const)\s+([^_][\w\d_]+\(.*?\))
enum: (Once I've collected all the enums sloppily, I use this to refine the collection.)
^\s([\w\d_-]{2,64})
EDIT: Added some enums