DebugGrammar class

Inheritance

Constructors

DebugGrammar({bool showAll = false, bool showPath = false, Duration delay = Duration.zero, Pattern? main, Pattern? remove, Map<String, Pattern>? rules})

Properties

debugIndex ↔ int
getter/setter pair
delay → Duration
final
hashCode → int
The hash code for this object.
no setterinherited
main ↔ Lexeme?
The main lexeme is the lexeme that will be used to tokenize the input when parsing.
getter/setter pairinherited
remover ↔ Lexeme?
The remove lexeme is the lexeme that will be used to remove a pattern from the input when parsing.
getter/setter pairinherited
rules → Set<Lexeme>
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showAll → bool
final
showPath → bool
final

Methods

add(String name, Pattern lemexe) → Lexeme
Add a lexeme to the grammar. This will bind the lexeme to the grammar, so it can be referenced.
inherited
addAll(Map<String, Pattern> lexemes) → Set<Lexeme>
Add a list of lexemes to the grammar. This will bind the lexemes to the grammar, so they can be referenced.
inherited
addLexeme(Lexeme lexeme) → void
Add a lexeme to the grammar. This will bind the lexeme to the grammar, so it can be referenced.
inherited
addLexemes(Iterable<Lexeme> tokens) → void
Add a list of lexemes to the grammar. This will bind the lexemes to the grammar, so they can be referenced.
inherited
addMain(Lexeme lexeme) → void
Sets the main lexeme of the grammar.
inherited
addRemover(Lexeme lexeme) → void
Sets the remover lexeme of the grammar.
inherited
lexeme<LexemeT extends Lexeme>(String name) → LexemeT?
Get a previously binded lexeme by its name, from the grammar.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
optionalParse(String input, [Lexeme? main]) → Token<Lexeme>?
Parses the provided input and returns the resulting token. If the input is invalid, null is returned.
inherited
parse(String string, [Lexeme? main]) → Token<Lexeme>
Parses the provided input and returns the resulting token. If the input is invalid, LexicalSyntaxError is thrown.
override
tokenizing(Lexeme lexeme, String string, [int start = 0]) → void
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

debug(Lexeme lexeme, String string, [int start = 0]) → void