[−][src]Struct treebender::rules::Grammar
Fields
start: String
rules: HashMap<String, Vec<Rc<Rule>>>
Implementations
impl Grammar
[src]
pub fn new(rules: Vec<Rule>) -> Result<Self, Err>
[src]
pub fn is_nullable(&self, s: &str) -> bool
[src]
impl Grammar
[src]
pub fn parse_chart(&self, input: &[&str]) -> Chart
[src]
pub fn parse_forest(&self, input: &[&str]) -> Forest
[src]
pub fn unify_tree(
tree: SynTree<Rc<Rule>, String>
) -> Result<(SynTree<String, String>, NodeRef), Err>
[src]
tree: SynTree<Rc<Rule>, String>
) -> Result<(SynTree<String, String>, NodeRef), Err>
pub fn parse(&self, input: &[&str]) -> Vec<(SynTree<String, String>, NodeRef)>
[src]
pub fn read_from_file<P: AsRef<Path>>(path: P) -> Result<Self, Err>
[src]
Trait Implementations
impl Debug for Grammar
[src]
impl Display for Grammar
[src]
impl FromStr for Grammar
[src]
Parses a str into a tuple of (rules, nonterminals) Errors if the grammar doesn't parse or is malformed
Auto Trait Implementations
impl !RefUnwindSafe for Grammar
impl !Send for Grammar
impl !Sync for Grammar
impl Unpin for Grammar
impl !UnwindSafe for Grammar
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,