View Single Post
stupok
Veteran Member
Join Date: Feb 2006
Old 03-08-2009 , 14:49   Re: AMXX Keywords for Syntax Highlighting
Reply With Quote #13

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
Attached Files
File Type: ini constants.ini (12.4 KB, 218 views)
File Type: ini macros.ini (895 Bytes, 199 views)
File Type: ini functions.ini (21.6 KB, 198 views)
File Type: ini functions with prototypes.ini (54.7 KB, 237 views)
File Type: ini enums.ini (12.8 KB, 196 views)
__________________

Last edited by stupok; 03-09-2009 at 00:58. Reason: some more
stupok is offline