52 #define strcasecmp _stricmp
55 RexxMethod2(
int, RegExp_Init, OPTIONAL_CSTRING, expression, OPTIONAL_CSTRING, matchtype)
61 if (matchtype != NULL)
63 if (strcasecmp(matchtype,
"MINIMAL") == 0)
67 else if (strcasecmp(matchtype,
"MAXIMAL") == 0)
78 if (expression != NULL)
80 iResult = pAutomaton->
parse(expression);
88 context->SetObjectVariable(
"CSELF", context->NewPointer(pAutomaton));
96 if (pAutomaton != NULL)
101 context->DropObjectVariable(
"CSELF");
109 OPTIONAL_CSTRING, matchtype)
114 if (matchtype != NULL)
116 if ( strcasecmp(matchtype,
"MINIMAL") == 0)
120 else if (strcasecmp(matchtype,
"MAXIMAL") == 0)
124 else if (strcasecmp(matchtype,
"CURRENT") == 0)
133 int i = pAutomaton->
parse( expression);
134 context->SetObjectVariable(
"!POS", context->WholeNumber(pAutomaton->
getCurrentPos()));
144 int i = pAutomaton->
match( context->StringData(
string), (int)context->StringLength(
string));
145 context->SetObjectVariable(
"!POS", context->WholeNumber(pAutomaton->
getCurrentPos()));
156 const char *pszString;
160 pszString = context->StringData(
string);
161 strlength = (int)context->StringLength(
string);
162 int matchPosition = 0;
172 i = pAutomaton->
match(pszString, strlength);
175 }
while (i == 0 && strlength >= 0);
179 i = (int) (pszString - context->StringData(
string));
181 if (fOldState ==
false)
186 while (strlength >= 0)
188 if (pAutomaton->
match(pszString, strlength) != 0)
198 context->SetObjectVariable(
"!POS", context->WholeNumber(matchPosition));
int match(const char *, int)
#define REXX_INTERPRETER_4_0_0
#define REXX_METHOD(n, e)
#define REXX_LAST_METHOD()
#define STANDARD_PACKAGE_HEADER
#define Rexx_Error_Incorrect_method
#define Rexx_Error_Invalid_template
struct _RexxStringObject * RexxStringObject
RexxMethod2(int, RegExp_Init, OPTIONAL_CSTRING, expression, OPTIONAL_CSTRING, matchtype)
RexxMethodEntry rxregexp_methods[]
RexxMethod3(int, RegExp_Parse, CSELF, self, CSTRING, expression, OPTIONAL_CSTRING, matchtype)
RexxMethod1(int, RegExp_Uninit, CSELF, self)
OOREXX_GET_PACKAGE(rxregexp)
RexxPackageEntry rxregexp_package_entry