50 RexxMethod2(
int, RegExp_Init, OPTIONAL_CSTRING, expression, OPTIONAL_CSTRING, matchtype)
56 if (matchtype != NULL)
58 if (strcmp(matchtype,
"MINIMAL") == 0)
65 if (expression != NULL)
67 iResult = pAutomaton->
parse(expression);
75 context->SetObjectVariable(
"CSELF", context->NewPointer(pAutomaton));
83 if (pAutomaton != NULL)
88 context->DropObjectVariable(
"CSELF");
96 OPTIONAL_CSTRING, matchtype)
101 if (matchtype != NULL)
103 if ( strcmp(matchtype,
"MINIMAL") == 0)
107 else if (strcmp(matchtype,
"CURRENT") != 0)
112 int i = pAutomaton->
parse( expression);
113 context->SetObjectVariable(
"!POS", context->WholeNumber(pAutomaton->
getCurrentPos()));
123 int i = pAutomaton->
match( context->StringData(
string), (int)context->StringLength(
string));
124 context->SetObjectVariable(
"!POS", context->WholeNumber(pAutomaton->
getCurrentPos()));
135 const char *pszString;
139 pszString = context->StringData(
string);
140 strlength = context->StringLength(
string);
141 int matchPosition = 0;
152 i = pAutomaton->
match(pszString, (
int)strlength);
155 }
while (i == 0 && strlength != 0);
159 i = (int) (pszString - context->StringData(
string));
161 if (fOldState ==
false)
166 while (strlength != 0)
168 if (pAutomaton->
match(pszString, (
int)strlength) != 0)
178 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_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