pub struct Parser {
pub symbol_gen: SymbolGen,
/* private fields */
}Fields§
§symbol_gen: SymbolGenImplementations§
Source§impl Parser
impl Parser
pub fn get_program_from_string( &mut self, filename: Option<String>, input: &str, ) -> Result<Vec<Command>, ParseError>
pub fn get_expr_from_string( &mut self, filename: Option<String>, input: &str, ) -> Result<Expr, ParseError>
pub fn add_command_macro(&mut self, ma: Arc<dyn Macro<Vec<Command>>>)
pub fn add_action_macro(&mut self, ma: Arc<dyn Macro<Vec<Action>>>)
pub fn add_expr_macro(&mut self, ma: Arc<dyn Macro<Expr>>)
pub fn parse_command(&mut self, sexp: &Sexp) -> Result<Vec<Command>, ParseError>
pub fn schedule(&mut self, sexp: &Sexp) -> Result<Schedule, ParseError>
pub fn parse_action(&mut self, sexp: &Sexp) -> Result<Vec<Action>, ParseError>
pub fn parse_fact(&mut self, sexp: &Sexp) -> Result<Fact, ParseError>
pub fn parse_expr(&mut self, sexp: &Sexp) -> Result<Expr, ParseError>
pub fn rec_datatype( &mut self, sexp: &Sexp, ) -> Result<(Span, String, Subdatatypes), ParseError>
pub fn variant(&mut self, sexp: &Sexp) -> Result<Variant, ParseError>
pub fn parse_options<'a>( &self, sexps: &'a [Sexp], ) -> Result<Vec<(&'a str, &'a [Sexp])>, ParseError>
pub fn parse_schema( &self, input: &Sexp, output: &Sexp, ) -> Result<Schema, ParseError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parser
impl !RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl !UnwindSafe for Parser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more