SUMMARY: MODULE | CLASS | TYPE | PROC | VAR | CONST | DETAIL: TYPE | PROC | VAR | CONST |
Object Object RT0 StringSearch StringSearch:SubstringBF
Class List | |
Factory | This class implements the Boyer-Moore string searching algorithm. |
MatchObject | |
Matcher |
Class Summary: Factory [Detail] | |
+---RT0.Object | +---Object.Object | +---StringSearch.Factory | +--StringSearch:SubstringBM.Factory This class implements the Boyer-Moore string searching algorithm. With a pattern length of M and a string length of N, a search operation never requires more than M+N character comparisons, and about N/M steps if the alphabet is not small and the pattern is not long. | |
Constructor Summary | |
InitFactory(Factory) | |
Method Summary | |
Compile(String8, Flags): Matcher Compile a expression, for example a regular expression pattern, into a Matcher expression object. | |
Inherited Methods | |
From RT0.Object: From Object.Object: From StringSearch.Factory: |
Class Summary: MatchObject [Detail] | |
+---RT0.Object | +---Object.Object | +---StringSearch.MatchObject | +---StringSearch:SubstringBF.MatchObject | +--StringSearch:SubstringBM.MatchObject | |
Inherited Fields | |
From StringSearch.MatchObject: | |
Inherited Methods | |
From RT0.Object: From Object.Object: |
Class Summary: Matcher [Detail] | |
+---RT0.Object | +---Object.Object | +---StringSearch.Matcher | +---StringSearch:SubstringBF.Matcher | +--StringSearch:SubstringBM.Matcher | |
Inherited Fields | |
From StringSearch.Matcher: | |
Method Summary | |
Search(String8, LONGINT, LONGINT): MatchObject Like Matcher.SearchChars, but works on an instance of Object.String8. | |
SearchChars(ARRAY OF CHAR, LONGINT, LONGINT): MatchObject Scans through string looking for a location where this Matcher produces a match, and return a corresponding MatchObject instance. | |
Inherited Methods | |
From RT0.Object: From Object.Object: From StringSearch.Matcher: From StringSearch:SubstringBF.Matcher: |
Procedure Summary | |
SearchStart(Matcher, ARRAY OF CHAR, LONGINT, LONGINT): LONGINT PRIVATE. |
Variable Summary | |
factory-: Factory |
Constant Summary | |
copyString See StringSearch.copyString. | |
ignoreCase See StringSearch.ignoreCase. |
Class Detail: Factory |
Constructor Detail |
PROCEDURE InitFactory(f: Factory)
Method Detail |
PROCEDURE (f: Factory) Compile(pattern: String8; flags: Flags): Matcher
Compile a expression, for example a regular expression pattern, into a Matcher expression object. The matcher object can be used for matching using its Matcher.MatchChars and Matcher.SearchChars methods.
The pattern's behaviour can be modified by specifying a flags value. The set can include of the following variables: ignoreCase, copyString.
Result is NIL if the given pattern is invalid.
Pre-condition: The value of pattern does not contain the character 0X.
[Description inherited from Compile]
Redefines: Compile
Class Detail: MatchObject |
Class Detail: Matcher |
Method Detail |
PROCEDURE (matcher: Matcher) Search(string: String8; pos: LONGINT; endpos: LONGINT): MatchObject
Like Matcher.SearchChars, but works on an instance of Object.String8.
[Description inherited from Search]
PROCEDURE (matcher: Matcher) SearchChars(string: ARRAY OF CHAR; pos: LONGINT; endpos: LONGINT): MatchObject
Scans through string looking for a location where this Matcher produces a match, and return a corresponding MatchObject instance. Returns NIL if no position in the string matches the pattern. Note that this is different from finding a zero-length match at some point in the string.
The pos and endpos parameters have the same meaning as for the Matcher.MatchChars method.
[Description inherited from SearchChars]
Redefines: SearchChars, SearchChars
Procedure Detail |
PROCEDURE SearchStart(matcher: Matcher; string: ARRAY OF CHAR; pos: LONGINT; endpos: LONGINT): LONGINT
PRIVATE. Used by module RegexpDFA.
Variable Detail |
VAR factory-: Factory
Constant Detail |
CONST copyString
CONST ignoreCase