Nfa class
A nondeterministic finite automaton (NFA) for executing regular expression patterns.
Implements RegexpPattern to match strings according to Thompson's construction.
For example:
final nfa = Nfa.fromString('a*b+');
print(nfa.matchAsPrefix('aaabb')?.group(0)); // 'aaabb'
- Inheritance
-
- Object
- RegexpPattern
- Nfa
Constructors
Properties
Methods
-
allMatches(
String input, [int start = 0]) → Iterable< Match> -
Matches this pattern against the string repeatedly.
inherited
-
matchAsPrefix(
String input, [int start = 0]) → Match? -
Matches this pattern against the start of
string.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
tryMatch(
String input, int start, int end) → int -
Returns the end index (exclusive) of the longest prefix of
inputmatched by this pattern, or-1if no prefix ofinputmatches.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited