VB-Regex

RegexCompilationError
A RegexCompilationError is xxxxxxxxx.
Instance Variables
RegexError
A RegexError is xxxxxxxxx.
Instance Variables
RegexMatchingError
A RegexMatchingError is xxxxxxxxx.
Instance Variables
RegexSyntaxError
A RegexSyntaxError is xxxxxxxxx.
Instance Variables
RxCharSetParser
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
I am a parser created to parse the insides of a character set ([...]) construct. I create and answer a collection of "elements", each being an instance of one of: RxsCharacter, RxsRange, or RxsPredicate.
Instance Variables:
source <Stream> open on whatever is inside the square brackets we have to parse.
lookahead <Character> The current lookahead character
elements <Collection of: <RxsCharacter|RxsRange|RxsPredicate>> Parsing result
addChar:
addRangeFrom:to:
initialize:
match:
on:
parse
parseCharOrRange
parseEscapeChar
parseNamedSet
parseStep
RxMatchOptimizer
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
A match start optimizer, handy for searching a string. Takes a regex syntax tree and sets itself up so that prefix characters or matcher states that cannot start a match are later recognized with #canStartMatch:in: method.
Used by RxMatcher, but can be used by other matchers (if implemented) as well.
canStartMatch:in:
Answer whether a match could commence at the given lookahead
character, or in the current state of <aMatcher>. True answered
by this method does not mean a match will definitly occur, while false
answered by this method *does* guarantee a match will never occur.
conditionTester
#any condition is filtered at the higher level;
it cannot appear among the conditions here.
determineTestMethod
Answer a block closure that will work as a can-match predicate.
Answer nil if no viable optimization is possible (too many chars would
be able to start a match).
initialize:ignoreCase:
Set `testMethod' variable to a can-match predicate block:
two-argument block which accepts a lookahead character
and a matcher (presumably built from aRegex) and answers
a boolean indicating whether a match could start at the given
lookahead.
methodPredicateTester
nonMethodPredicateTester
nonPredicateTester
nonPrefixTester
optimizeSet:
If a set is small, convert it to array to speed up lookup
(Array has no hashing overhead, beats Set on small number
of elements).
predicateTester
prefixTester
syntaxAny
Any special char is among the prefixes.
syntaxBeginningOfLine
Beginning of line is among the prefixes.
syntaxBeginningOfWord
Beginning of line is among the prefixes.
syntaxBranch:
If the head piece of the branch is transparent (allows 0 matches),
we must recurse down the branch. Otherwise, just the head atom
is important.
syntaxCharSet:
All these (or none of these) characters is the prefix.
syntaxCharacter:
This character is the prefix, of one of them.
syntaxEndOfLine
Beginning of line is among the prefixes.
syntaxEndOfWord
syntaxEpsilon
Empty string, terminate the recursion (do nothing).
syntaxMessagePredicate:
syntaxNonWordBoundary
syntaxPiece:
Pass on to the atom.
syntaxPredicate:
syntaxRegex:
All prefixes of the regex's branches should be combined.
Therefore, just recurse.
syntaxWordBoundary
RxMatcher
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
This is a recursive regex matcher. Not strikingly efficient, but simple. Also, keeps track of matched subexpressions. The life cycle goes as follows:
1. Initialization. Accepts a syntax tree (presumably produced by RxParser) and compiles it into a matcher built of other classes in this category.
2. Matching. Accepts a stream or a string and returns a boolean indicating whether the whole stream or its prefix -- depending on the message sent -- matches the regex.
3. Subexpression query. After a successful match, and before any other match, the matcher may be queried about the range of specific stream (string) positions that matched to certain parenthesized subexpressions of the original expression.
Any number of queries may follow a successful match, and any number or matches may follow a successful initialization.
Note that `matcher' is actually a sort of a misnomer. The actual matcher is a web of Rxm* instances built by RxMatcher during initialization. RxMatcher is just the interface facade of this network. It is also a builder of it, and also provides a stream-like protocol to easily access the stream being matched.
Instance variables:
matcher <RxmLink> The entry point into the actual matcher.
stream <Stream> The stream currently being matched against.
markerPositions <Array of: Integer> Positions of markers' matches.
markerCount <Integer> Number of markers.
lastResult <Boolean> Whether the latest match attempt succeeded or not.
lastChar <Character | nil> character last seen in the matcher stream
allocateMarker
Answer an integer to use as an index of the next marker.
atBeginningOfLine
atBeginningOfWord
atEnd
atEndOfLine
atEndOfWord
atWordBoundary
buildFrom:
Private - Entry point of matcher build process.
copy:replacingMatchesWith:
Copy <aString>, except for the matches. Replace each match with <aString>.
copy:translatingMatchesUsing:
Copy <aString>, except for the matches. For each match, evaluate <aBlock> passing the matched substring as the argument. Expect the block to answer a String, and replace the match with the answer.
copyStream:to:replacingMatchesWith:
Copy the contents of <aStream> on the <writeStream>, except for the matches. Replace each match with <aString>.
copyStream:to:translatingMatchesUsing:
Copy the contents of <aStream> on the <writeStream>, except for the matches. For each match, evaluate <aBlock> passing the matched substring as the argument. Expect the block to answer a String, and write the answer to <writeStream> in place of the match.
currentState
Answer an opaque object that can later be used to restore the
matcher's state (for backtracking).
for:
for:ignoreCase:
forString:
forString:ignoreCase:
hookBranchOf:onto:
Private - Recurse down the chain of regexes starting at
regexNode, compiling their branches and hooking their tails
to the endMarker node.
initialize
Subclasses should redefine this method to perform initializations on instance creation
initialize:ignoreCase:
Compile thyself for the regex with the specified syntax tree.
See comment and `building' protocol in this class and
#dispatchTo: methods in syntax tree components for details
on double-dispatch building.
The argument is supposedly a RxsRegex.
isWordChar:
Answer whether the argument is a word constituent character:
alphanumeric or _.
lastResult
makeOptional:
Private - Wrap this matcher so that the result would match 0 or 1
occurrences of the matcher.
makePlus:
Private - Wrap this matcher so that the result would match 1 and more
occurrences of the matcher.
makeStar:
Private - Wrap this matcher so that the result would match 0 and more
occurrences of the matcher.
markerPositionAt:add:
Remember position of another instance of the given marker.
matches:
Match against a string.
matchesIn:
Search aString repeatedly for the matches of the receiver. Answer an OrderedCollection of all matches (substrings).
matchesIn:collect:
Search aString repeatedly for the matches of the receiver. Evaluate aBlock for each match passing the matched substring as the argument, collect evaluation results in an OrderedCollection, and return in. The following example shows how to use this message to split a string into words.
matchesIn:do:
Search aString repeatedly for the matches of the receiver.
Evaluate aBlock for each match passing the matched substring
as the argument.
matchesOnStream:
matchesOnStream:collect:
matchesOnStream:do:
Be extra careful about successful matches which consume no input.
After those, make sure to advance or finish if already at end.
matchesPrefix:
Match against a string.
matchesStream:
Match thyself against a positionable stream.
matchesStreamPrefix:
Match thyself against a positionable stream.
matchingRangesIn:
Search aString repeatedly for the matches of the receiver. Answer an OrderedCollection of ranges of each match (index of first character to: index of last character).
next
notAtWordBoundary
position
proceedSearchingStream:
restoreState:
search:
Search the string for occurrence of something matching myself.
Answer a Boolean indicating success.
searchStream:
Search the stream for occurrence of something matching myself.
After the search has occurred, stop positioned after the end of the
matched substring. Answer a Boolean indicating success.
split:
subBeginning:
subEnd:
subexpression:
Answer a string that matched the subexpression at the given index.
If there are multiple matches, answer the last one.
If there are no matches, answer nil.
(NB: it used to answer an empty string but I think nil makes more sense).
subexpressionCount
subexpressions:
Answer an array of all matches of the subexpression at the given index.
The answer is always an array; it is empty if there are no matches.
supportsSubexpressions
syntaxAny
Double dispatch from the syntax tree.
Create a matcher for any non-null character.
syntaxBeginningOfLine
Double dispatch from the syntax tree.
Create a matcher for beginning-of-line condition.
syntaxBeginningOfWord
Double dispatch from the syntax tree.
Create a matcher for beginning-of-word condition.
syntaxBranch:
Double dispatch from the syntax tree.
Branch node is a link in a chain of concatenated pieces.
First build the matcher for the rest of the chain, then make
it for the current piece and hook the rest to it.
syntaxCharSet:
Double dispatch from the syntax tree.
A character set is a few characters, and we either match any of them,
or match any that is not one of them.
syntaxCharacter:
Double dispatch from the syntax tree.
We get here when no merging characters into strings was possible.
syntaxEndOfLine
Double dispatch from the syntax tree.
Create a matcher for end-of-line condition.
syntaxEndOfWord
Double dispatch from the syntax tree.
Create a matcher for end-of-word condition.
syntaxEpsilon
Double dispatch from the syntax tree. Match empty string. This is unlikely
to happen in sane expressions, so we'll live without special epsilon-nodes.
syntaxMessagePredicate:
Double dispatch from the syntax tree.
Special link can handle predicates.
syntaxNonWordBoundary
Double dispatch from the syntax tree.
Create a matcher for the word boundary condition.
syntaxPiece:
Double dispatch from the syntax tree.
Piece is an atom repeated a few times. Take care of a special
case when the atom is repeated just once.
syntaxPredicate:
Double dispatch from the syntax tree.
A character set is a few characters, and we either match any of them,
or match any that is not one of them.
syntaxRegex:
Double dispatch from the syntax tree.
Regex node is a chain of branches to be tried. Should compile this
into a bundle of parallel branches, between two marker nodes.
syntaxWordBoundary
Double dispatch from the syntax tree.
Create a matcher for the word boundary condition.
tryMatch
Match thyself against the current stream.
RxParser
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
The regular expression parser. Translates a regular expression read from a stream into a parse tree. ('accessing' protocol). The tree can later be passed to a matcher initialization method. All other classes in this category implement the tree. Refer to their comments for any details.
Instance variables:
input <Stream> A stream with the regular expression being parsed.
lookahead <Character>
a:introduction:
atom
An atom is one of a lot of possibilities, see below.
b:whatsNewInThisRelease:
branch
<branch> ::= e | <piece> <branch>
c:syntax:
characterSet
Match a range of characters: something between `[' and `]'.
Opening bracked has already been seen, and closing should
not be consumed as well. Set spec is as usual for
sets in regexes.
characterSetFrom:
<setSpec> is what goes between the brackets in a charset regex
(a String). Make a string containing all characters the spec specifies.
Spec is never empty.
compileRegex:into:
d:usage:
doHandlingMessageNotUnderstood:
e:implementationNotes:
f:boringStuff:
ifSpecial:then:
If the character is such that it defines a special node when follows a $\,
then create that node and evaluate aBlock with the node as the parameter.
Otherwise just return.
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeBackslashConstants
initializeBackslashSpecials
inputUpTo:errorMessage:
Accumulate input stream until <aCharacter> is encountered
and answer the accumulated chars as String, not including
<aCharacter>. Signal error if end of stream is encountered,
passing <aString> as the error description.
inputUpTo:nestedOn:errorMessage:
Accumulate input stream until <aCharacter> is encountered
and answer the accumulated chars as String, not including
<aCharacter>. Signal error if end of stream is encountered,
passing <aString> as the error description.
match:
<aCharacter> MUST match the current lookeahead.
If this is the case, advance the input. Otherwise, blow up.
messagePredicate
Match a message predicate specification: a selector (presumably
understood by a Character) enclosed in :'s .
next
Advance the input storing the just read character
as the lookahead.
parse:
Parse input from a string <aString>.
On success, answers an RxsRegex -- parse tree root.
On error, raises `RxParser syntaxErrorSignal' with the current
input stream position as the parameter.
parseStream:
Parse an input from a character stream <aStream>.
On success, answers an RxsRegex -- parse tree root.
On error, raises `RxParser syntaxErrorSignal' with the current
input stream position as the parameter.
piece
<piece> ::= <atom> | <atom>* | <atom>+ | <atom>?
preferredMatcherClass
regex
<regex> ::= e | <branch> `|' <regex>
runProtocolTestsForMatcher:
runRegexTestsForMatcher:
runTestsForMatcher:
safelyParse:
signalCompilationException:
signalMatchException:
signalParseError
signalParseError:
signalSyntaxException:
test:with:expect:withSubexpressions:
testSuite
RxmBranch
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
This is a branch of a matching process. Either `next' chain should match, or `alternative', if not nil, should match. Since this is also used to build loopbacks to match repetitions, `loopback' variable indicates whether the instance is a loopback: it affects the matcher-building operations (which of the paths through the branch is to consider as the primary when we have to find the "tail" of a matcher construct).
Instance variables
alternative <RxmLink> to match if `next' fails to match.
loopback <Boolean>
alternative:
See class comment for instance variable description.
beLoopback
See class comment for instance variable description.
initialize
See class comment for instance variable description.
matchAgainst:
Match either `next' or `alternative'. Fail if the alternative is nil.
pointTailTo:
See superclass for explanations.
terminateWith:
See superclass for explanations.
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
A matcher is built of a number of links interconnected into some intricate structure. Regardless of fancy stuff, any link (except for the terminator) has the next one. Any link can match against a stream of characters, recursively propagating the match to the next link. Any link supports a number of matcher-building messages. This superclass does all of the above.
The class is not necessarily abstract. It may double as an empty string matcher: it recursively propagates the match to the next link, thus always matching nothing successfully.
Principal method:
matchAgainst: aMatcher
Any subclass will reimplement this to test the state of the matcher, most
probably reading one or more characters from the matcher's stream, and
either decide it has matched and answer true, leaving matcher stream
positioned at the end of match, or answer false and restore the matcher
stream position to whatever it was before the matching attempt.
Instance variables:
next <RxmLink | RxmTerminator> The next link in the structure.
matchAgainst:
If a link does not match the contents of the matcher's stream,
answer false. Otherwise, let the next matcher in the chain match.
next
next:
Set the next link, either an RxmLink or an RxmTerminator.
pointTailTo:
Propagate this message along the chain of links.
Point `next' reference of the last link to <anRxmLink>.
If the chain is already terminated, blow up.
terminateWith:
Propagate this message along the chain of links, and
make aTerminator the `next' link of the last link in the chain.
If the chain is already reminated with the same terminator,
do not blow up.
RxmMarker
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
A marker is used to remember positions of match of certain points of a regular expression. The marker receives an identifying key from the Matcher and uses that key to report positions of successful matches to the Matcher.
Instance variables:
index <Object> Something that makes sense for the Matcher. Received from the latter during initalization and later passed to it to identify the receiver.
index:
An index is a key that makes sense for the matcher.
This key can be passed to marker position getters and
setters to access position for this marker in the current
matching session.
matchAgainst:
If the rest of the link chain matches successfully, report the
position of the stream *before* the match started to the matcher.
RxmPredicate
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
Instance holds onto a one-argument block and matches exactly one character if the block evaluates to true when passed the character as the argument.
Instance variables:
predicate <BlockClosure>
bePerform:
Match any single character that answers true to this message.
bePerformNot:
Match any single character that answers false to this message.
matchAgainst:
Match if the predicate block evaluates to true when given the
current stream character as the argument.
predicate:
This link will match any single character for which <aBlock>
evaluates to true.
with:
RxmSpecial
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
A special node that matches a specific matcher state rather than any input character.
The state is either at-beginning-of-line or at-end-of-line.
beBeginningOfLine
beBeginningOfWord
beEndOfLine
beEndOfWord
beNotWordBoundary
beWordBoundary
matchAgainst:
Match without consuming any input, if the matcher is
in appropriate state.
RxmSubstring
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
Instance holds onto a string and matches exactly this string, and exactly once.
Instance variables:
string <String>
beCaseInsensitive
beCaseSensitive
character:ignoreCase:
Match exactly this character.
initialize
Subclasses should redefine this method to perform initializations on instance creation
matchAgainst:
Match if my sample stream is exactly the current prefix
of the matcher stream's contents.
sampleStream
substring:ignoreCase:
Match exactly this string.
RxmTerminator
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
Instances of this class are used to terminate matcher's chains. When a match reaches this (an instance receives #matchAgainst: message), the match is considered to succeed. Instances also support building protocol of RxmLinks, with some restrictions.
matchAgainst:
If got here, the match is successful.
pointTailTo:
Branch tails are never redirected by the build algorithm.
Healthy terminators should never receive this.
terminateWith:
Branch terminators are never supposed to change.
Make sure this is the case.
RxsBranch
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
A Branch is a Piece followed by a Branch or an empty string.
Instance variables:
piece <RxsPiece>
branch <RxsBranch|RxsEpsilon>
branch
dispatchTo:
Inform the matcher of the kind of the node, and it
will do whatever it has to.
initializePiece:branch:
See class comment for instance variables description.
isNullable
True if the node can match an empty sequence of characters.
piece
tryMergingInto:
Concatenation of a few simple characters can be optimized
to be a plain substring match. Answer the node to resume
syntax tree traversal at. Epsilon node used to terminate the branch
will implement this to answer nil, thus indicating that the branch
has ended.
RxsCharSet
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
A character set corresponds to a [...] construct in the regular expression.
Instance variables:
elements <OrderedCollection> An element can be one of: RxsCharacter, RxsRange, or RxsPredicate.
negated <Boolean>
dispatchTo:
Inform the matcher of the kind of the node, and it
will do whatever it has to.
enumerablePartPredicateIgnoringCase:
enumerableSetIgnoringCase:
Answer a collection of characters that make up the portion of me
that can be enumerated.
hasPredicates
initializeElements:negated:
See class comment for instance variables description.
isEnumerable
isNegated
optimalSetIgnoringCase:
Assuming the client with search the `set' using #includes:,
answer a collection with the contents of `set', of the class
that will provide the fastest lookup. Strings are faster than
Sets for short strings.
predicateIgnoringCase:
predicatePartPredicate
Answer a predicate that tests all of my elements that cannot be
enumerated.
predicates
RxsCharacter
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
A character is a literal character that appears either in the expression itself or in a character set within an expression.
Instance variables:
character <Character>
character
dispatchTo:
Inform the matcher of the kind of the node, and it
will do whatever it has to.
enumerateTo:ignoringCase:
initializeCharacter:
See class comment for instance variable description.
isAtomic
A character is always atomic.
isEnumerable
isNullable
True if the node can match an empty sequence of characters.
with:
RxsContextCondition
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
One of a few special nodes more often representing special state of the match rather than a predicate on a character. The ugly exception is the #any condition which *is* a predicate on a character.
Instance variables:
kind <Selector>
beAny
Matches anything but a newline.
beBeginningOfLine
Matches empty string at the beginning of a line.
beBeginningOfWord
Matches empty string at the beginning of a word.
beEndOfLine
Matches empty string at the end of a line.
beEndOfWord
Matches empty string at the end of a word.
beNonWordBoundary
Analog of \B.
beWordBoundary
Analog of \w (alphanumeric plus _).
dispatchTo:
isNullable
True if the node can match an empty sequence of characters.
RxsEpsilon
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
This is an empty string. It terminates some of the recursive constructs.
dispatchTo:
Inform the matcher of the kind of the node, and it
will do whatever it has to.
isNullable
See comment in the superclass.
RxsMessagePredicate
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
A message predicate represents a condition on a character that is tested (at the match time) by sending a unary message to the character expecting a Boolean answer.
Instance variables:
selector <Symbol>
dispatchTo:
Inform the matcher of the kind of the node, and it
will do whatever it has to.
initializeSelector:
The selector must be a one-argument message understood by Character.
initializeSelector:negated:
The selector must be a one-argument message understood by Character.
negated
selector
RxsNode
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
A generic syntax tree node, provides some common responses to the standard tests, as well as tree structure printing -- handy for debugging.
indentCharacter
Normally, #printOn:withIndent: method in subclasses
print several characters returned by this method to indicate
the tree structure.
isAtomic
Answer whether the node is atomic, i.e. matches exactly one
constant predefined normal character. A matcher may decide to
optimize matching of a sequence of atomic nodes by glueing them
together in a string.
isNullable
True if the node can match an empty sequence of characters.
RxsPiece
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
A piece is an atom, possibly optional or repeated a number of times.
Instance variables:
atom <RxsCharacter|RxsCharSet|RxsPredicate|RxsRegex|RxsSpecial>
min <Integer>
max <Integer|nil> nil means infinity
atom
character
If this node is atomic, answer the character it
represents. It is the caller's responsibility to make sure this
node is indeed atomic before using this.
dispatchTo:
Inform the matcher of the kind of the node, and it
will do whatever it has to.
initializeAtom:
This piece is exactly one occurrence of the specified RxsAtom.
initializeAtom:min:max:
This piece is from <minOccurrences> to <maxOccurrences>
occurrences of the specified RxsAtom.
initializeOptionalAtom:
This piece is 0 or 1 occurrences of the specified RxsAtom.
initializePlusAtom:
This piece is one or more occurrences of the specified RxsAtom.
initializeStarAtom:
This piece is any number of occurrences of the atom.
isAtomic
A piece is atomic if only it contains exactly one atom
which is atomic (sic).
isNullable
A piece is nullable if it allows 0 matches.
This is often handy to know for optimization.
isOptional
isPlus
isSingular
A piece with a range is 1 to 1 needs can be compiled
as a simple match.
isStar
max
The value answered may be nil, indicating infinity.
min
RxsPredicate
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
This represents a character that satisfies a certain predicate.
Instance Variables:
predicate <BlockClosure> A one-argument block. If it evaluates to the value defined by <negated> when it is passed a character, the predicate is considered to match.
negation <BlockClosure> A one-argument block that is a negation of <predicate>.
beAlphaNumeric
beAlphabetic
beBackslash
beControl
beDigit
beGraphics
beHexDigit
beLowercase
beNotDigit
beNotSpace
beNotWordConstituent
bePrintable
bePunctuation
beSpace
beUppercase
beWordConstituent
dispatchTo:
forEscapedLetter:
forNamedClass:
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeEscapedLetterSelectors
initializeNamedClassSelectors
isAtomic
A predicate is a single character but the character is not known in advance.
isEnumerable
negate
negated
predicate
predicateNegation
value:
RxsRange
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
I represent a range of characters as appear in character classes such as
[a-ZA-Z0-9].
I appear in a syntax tree only as an element of RxsCharSet.
Instance Variables:
first <Character>
last <Character>
enumerateTo:ignoringCase:
Add all of the elements I represent to the collection.
from:to:
initializeFirst:last:
isEnumerable
RxsRegex
-- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
-- See `documentation' protocol of RxParser class for user's guide.
--
The body of a parenthesized thing, or a top-level expression, also an atom.
Instance variables:
branch <RxsBranch>
regex <RxsRegex | RxsEpsilon>
branch
dispatchTo:
Inform the matcher of the kind of the node, and it
will do whatever it has to.
initializeBranch:regex:
See class comment for instance variable description.
isNullable
True if the node can match an empty sequence of characters.
regex