Analyzer class

Helper to reflect on properties of a grammar.

Constructors

Analyzer(Parser root)
Constructs an analyzer on the parser graph starting at root.

Properties

hashCode → int
The hash code for this object.
no setterinherited
parsers → Iterable<Parser>
The set of all parsers reachable from root.
no setter
root → Parser
The start parser of analysis.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

allChildren(Parser parser) → Set<Parser>
Returns a set of all deep children reachable from parser.
cycleSet(Parser parser) → Iterable<Parser>
Returns the cycle-set of a parser.
findAllPaths(Parser source, Predicate<ParserPath> predicate) → Iterable<ParserPath>
Returns all paths starting at source that satisfy the given predicate.
findAllPathsTo(Parser source, Parser target) → Iterable<ParserPath>
Returns all paths starting at source that end in target.
findPath(Parser source, Predicate<ParserPath> predicate) → ParserPath?
Returns the shortest path from source that satisfies the given predicate, if any.
findPathTo(Parser source, Parser target) → ParserPath?
Returns the shortest path from source to target, if any.
firstSet(Parser parser) → Iterable<Parser>
Returns the first-set of parser.
followSet(Parser parser) → Iterable<Parser>
Returns the follow-set of a parser.
isNullable(Parser parser) → bool
Returns true if parser is transitively nullable, that is it can successfully parse nothing.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

sentinel → EpsilonParser<void>
Parser used as a marker in firstSet and followSet computations.
final