Lexeme class abstract
- Inheritance
- Available extensions
Constructors
- Lexeme.new({String? name, Grammar? grammar})
- Token Parser - Lexeme
- Lexeme.and(Pattern left, Pattern right, {String? name})
-
factory
-
Lexeme.andAll(List<
Pattern> children, {String? name}) -
factory
- Lexeme.any()
-
factory
- Lexeme.character(Pattern pattern, {String? name})
-
factory
- Lexeme.empty()
-
factory
- Lexeme.end()
-
factory
- Lexeme.full(Pattern pattern, {String? name})
-
factory
- Lexeme.global(Pattern pattern)
-
factory
- Lexeme.main(Pattern pattern)
-
factory
- Lexeme.multiple(Pattern pattern, {String? name})
-
factory
- Lexeme.not(Pattern pattern, {String? name})
-
factory
- Lexeme.optional(Pattern pattern, {String? name})
-
factory
- Lexeme.or(Pattern left, Pattern right, {String? name})
-
factory
-
Lexeme.orAll(List<
Pattern> children, {String? name}) -
factory
- Lexeme.pattern(Pattern pattern, {String? name})
-
factory
- Lexeme.ref(String name, {Grammar? grammar})
-
factory
- Lexeme.reference(String name, {Grammar? grammar})
-
factory
- Lexeme.regex(String pattern, {String? name})
-
factory
- Lexeme.repeat(Pattern pattern, int min, {int? max, String? name})
-
factory
- Lexeme.self()
-
factory
- Lexeme.start()
-
factory
- Lexeme.string(String pattern, {String? name})
-
factory
- Lexeme.until(Pattern pattern, Pattern until, {String? name})
-
factory
Properties
-
allChildren
→ List<
Lexeme> -
no setter
- asAfter → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
no setter - asBefore → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
no setter - asNotAfter → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
no setter - asNotBefore → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
no setter - character → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
Lexical Modifier - Characterno setter -
children
→ List<
Lexeme> -
no setter
- displayName → String
-
no setter
- full → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
Lexical Modifier - Fullno setter - grammar ↔ Grammar?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setteroverride
- multiple → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
Lexical Modifier - Multipleno setter - multipleOrNone → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
Lexical Modifier - Multiple, optionalno setter - name ↔ String?
-
getter/setter pair
- not → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
Lexical Modifier - Notno setter - optional → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
Lexical Modifier - Optionalno setter - optionalSpaced → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
Lexical Modifier - Optional spacedno setter - parent ↔ Lexeme?
-
getter/setter pair
-
path
→ List<
Lexeme> -
no setter
- plus → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
no setter - question → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
no setter - regex → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
Lexical Modifier - Regexno setter - regexString → String
-
The regex string of the lexeme, useful for debugging.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spaced → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
Lexical Modifier - Spacedno setter - star → Lexeme
-
Available on Pattern, provided by the LexicalAnalysisPattern extension
no setter
Methods
-
allMatches(
String string, [int start = 0]) → Set< Token< Lexeme> > -
Matches the current lexeme against the provided input.
override
-
bind(
Grammar grammar) → void - Binding a lexeme to a grammar will set the grammar as the lexeme's parent. Allowing the lexeme to access the grammar's lexemes, useful when tokenizing.
-
bindParent(
Lexeme parent) → void - Binding a lexeme to a parent will set the parent as the lexeme's parent. Allowing the lexeme to access the parent's lexemes, useful when debugging.
-
get<
T extends Lexeme> ({T? lexeme, String? name, bool? shallow}) → List< T> - Get all the lexemes that match the lexeme type or name, allows to analyze the lexical tree.
-
lexeme(
[String? name]) → Lexeme -
Available on Pattern, provided by the LexicalAnalysisPattern extension
Transforms the current pattern into a Lexeme that can be used for lexical analysis. If the pattern is already a Lexeme, it is returned as is. -
matchAsPrefix(
String string, [int start = 0]) → Token< Lexeme> -
Caution: Avoid using this method, use
.tokenize
instead.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
optionalTokenize(
String string, [int start = 0]) → Token< Lexeme> ? - Generates the resulting token from an input.
-
pad(
Pattern pattern) → Lexeme -
Available on Pattern, provided by the LexicalAnalysisPattern extension
Surrounds the current pattern with another pattern. -
repeat(
int min, [int? max]) → Lexeme -
Available on Pattern, provided by the LexicalAnalysisPattern extension
Repeat the current pattern a specific number of times. A maximum number of times can also be provided. -
tokenize(
String string, [int start = 0]) → Token< Lexeme> - Generates the resulting token from an input.
-
toString(
) → String -
A string representation of this object.
override
-
unbind(
) → void -
unbindParent(
) → void -
until(
Pattern pattern) → Lexeme -
Available on Pattern, provided by the LexicalAnalysisPattern extension
Match the current pattern until another pattern is matched.
Operators
-
operator &(
Pattern other) → Lexeme -
Available on Pattern, provided by the LexicalAnalysisPattern extension
-
operator *(
Pattern other) → Lexeme -
Available on Pattern, provided by the LexicalAnalysisPattern extension
Lexical Operator - And, optional spaced -
operator +(
Pattern other) → Lexeme -
Available on Pattern, provided by the LexicalAnalysisPattern extension
Lexical Operator - And, spaced -
operator ==(
Object other) → bool -
The equality operator.
override
-
operator unary-(
) → Lexeme -
Available on Pattern, provided by the LexicalAnalysisPattern extension
Lexical Operator - Not character -
operator |(
Pattern other) → Lexeme -
Available on Pattern, provided by the LexicalAnalysisPattern extension
-
operator ~(
) → Lexeme -
Available on Pattern, provided by the LexicalAnalysisPattern extension
Lexical Operator - Spaced around, optional