00001 /**************************************************************************/ 00033 #ifndef EXPRESSIONS_H 00034 #define EXPRESSIONS_H 00035 00036 #include <wx/regex.h> 00037 00040 wxRegEx reClass(wxT( 00041 "^[[:space:]]*" // Space at the beginning of the line. 00042 "class[[:space:]]+" // The word class, followed by some space (at least one). 00043 "([^[:space:]\\:]+)" // The class name (made of no space and no colon). 00044 )); 00045 00048 wxRegEx reStruct(wxT( 00049 "^[[:space:]]*" // Space at the beginning of the line. 00050 "(?:typedef" // Maybe a typedef declaration. 00051 "[[:space:]]+)?" // Followed by at least one space. 00052 "struct[[:space:]]+" // The word struct, followed by some space (at least one). 00053 "([^[:space:]\\:\\{\\;]+)" // The struct name (made of no space, no colon, no bracket, no semicolon). 00054 )); 00055 00056 00059 wxRegEx reTypedef(wxT( 00060 "^[[:space:]]*" // Space at the beginning of the line. 00061 "typedef[[:space:]]+" // The typedef word followed by at least one space. 00062 "(.+)[[:space:]]+" // The original type, followed by at least one space. 00063 "([^\\{[:space:];]+)" // The new type, not made of any space nor braces, nor semicolon. 00064 )); 00065 00068 wxRegEx reEnum(wxT( 00069 "^[[:space:]]*" // Space at the beginning of the line. 00070 "enum[[:space:]]+" // The word class, followed by some space (at least one). 00071 "([^[:space:]\\:]+)" // The class name (made of no space and no colon). 00072 )); 00073 00079 wxRegEx reFunction(wxT( 00080 "^[[:space:]]*" // Space at the beginning of the line. 00081 "((.+)[[:space:]])" // The return type of the function. 00082 "([[:space:]]*)" // Possibly some space after the name. 00083 "([^[:space:]]+)\\(" // The name of the function, followed by a "(". 00084 "([^)]*)?" // The function's parameters. 00085 "\\)" // The closing parenthesis. 00086 ), 00087 wxRE_ADVANCED); 00088 00094 wxRegEx reClassFunction(wxT( 00095 "^[[:space:]]*" // Space at the beginning of the line. 00096 "((.+)[[:space:]])" // The return type of the function. 00097 "([[:space:]]*)" // Some space after the return type. 00098 "([^[:space:]]+)\\::" // The class name followed by "::". 00099 "([^[:space:]]+)\\(" // The name of the function, followed by a "(". 00100 "([^)]*)?" // The function's parameters. 00101 "\\)" // The closing parenthesis. 00102 ), 00103 wxRE_ADVANCED); 00104 00110 wxRegEx reClassFunctionNoRet(wxT( 00111 "^[[:space:]]*" // Space at the beginning of the line. 00112 "([^[:space:]]+)\\::" // The class name followed by "::". 00113 "([^[:space:]]+)\\(" // The name of the function, followed by a "(". 00114 "([^)]*)?" // The function's parameters. 00115 "\\)" // The closing parenthesis. 00116 )); 00117 00118 00119 #endif
1.7.1