Struct peel::Peel [] [src]

pub struct Peel<R, V, D> {
    pub graph: StableGraph<ParserBox<R, V, D>, ()>,
    pub root: Option<NodeIndex>,
    pub data: Option<D>,
}

The main peeling structure

Fields

The memory arena of the tree

The first node added will be the root

Additional data for which can be shared accross the parsers

Methods

impl<R, V, D> Peel<R, V, D> where V: Display
[src]

Create a new empty Peel instance

Set the global log level for reporting

Create a new boxed Parser and return a corresponding Node

Append the second node to the first one within the current tree structure

Create a new parser and link it with the provided node

Convenient function for recursive traversal with the root as starting point

Errors

When no tree root was found or the first parser already fails.

Do parsing until all possible paths failed. This is equivalent in finding the deepest possible parsing result within the tree. The result will be assembled together in the given result vector, which will be returned at the end.

Errors

When the first parser already fails.

Create a graphviz graph.dot file representation in the current directory

Display an error from a parser