pub trait Symbol<'input, G> {
type Output;
// Required methods
fn pretty_print(&self) -> String;
fn parse(
&self,
grammar: &mut G,
input: Input<'input>,
) -> ParseResult<'input, Self::Output>;
// Provided methods
fn parse_complete(
&self,
grammar: &mut G,
text: &'input str,
) -> Result<Self::Output, Error<'input>> { ... }
fn parse_prefix(
&self,
grammar: &mut G,
text: &'input str,
) -> ParseResult<'input, Self::Output> { ... }
}