Struct parse_tree::BottomUpBuilder [−][src]
pub struct BottomUpBuilder { /* fields omitted */ }
A builder for creating parse trees by a bottom-up walk over the tree nodes.
Methods
impl BottomUpBuilder
[src]
impl BottomUpBuilder
pub fn new() -> BottomUpBuilder
[src]
pub fn new() -> BottomUpBuilder
Create a new builder.
pub fn finish(self) -> ParseTree
[src]
pub fn finish(self) -> ParseTree
Completes the building process and yields a ParseTree. Panics if there's unmatched
start_internal` calls.
pub fn shift(&mut self, symbol: Symbol, len: TextUnit)
[src]
pub fn shift(&mut self, symbol: Symbol, len: TextUnit)
Shifts a new leaf node to the stack.
pub fn reduce(&mut self, symbol: Symbol, n_nodes: usize)
[src]
pub fn reduce(&mut self, symbol: Symbol, n_nodes: usize)
Reduce top n_nodes
from the stack to a new node.
Trait Implementations
impl Debug for BottomUpBuilder
[src]
impl Debug for BottomUpBuilder
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for BottomUpBuilder
[src]
impl Default for BottomUpBuilder
fn default() -> BottomUpBuilder
[src]
fn default() -> BottomUpBuilder
Returns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for BottomUpBuilder
impl Send for BottomUpBuilder
impl Sync for BottomUpBuilder
impl Sync for BottomUpBuilder