Inheritance
Available extensions
Constructors
Lexeme ({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
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.
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.
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