Struct Builder

Source
pub struct Builder {
    pub is_executable: bool,
    /* private fields */
}
Expand description

Main entry for the build script

Fields§

§is_executable: bool

if true, an executable called this function

Implementations§

Source§

impl Builder

Source

pub fn new() -> Self

Source

pub fn glr(&mut self, glr: bool) -> &mut Self

override the settings

Source

pub fn runtime(&mut self, runtime: bool) -> &mut Self

override the settings

Source

pub fn dense(&mut self, dense: bool) -> &mut Self

override the settings

Source

pub fn file(&mut self, filename: &str) -> &mut Self

set input file

Source

pub fn verbose(&mut self) -> &mut Self

turns on all verbose options

Source

pub fn verbose_conflicts(&mut self) -> &mut Self

when vebose is on, print debug information about any shift/reduce, reduce/reduce conflicts.

Source

pub fn verbose_conflicts_resolving(&mut self) -> &mut Self

when vebose is on, print debug information about conflicts resolving process by %left or %right for any shift/reduce, reduce/reduce conflicts.

Source

pub fn verbose_optimization(&mut self) -> &mut Self

Source

pub fn verbose_on_stderr(&mut self) -> &mut Self

print debug information to stderr.

Source

pub fn no_print_backtrace(&mut self) -> &mut Self

do not print backtrace rules in state when conflicts occured.

Source

pub fn build(&self, output_file: &str)

build and emit code to output file

Source

pub fn build_impl(&self) -> Result<Output, String>

for internal use

Trait Implementations§

Source§

impl Default for Builder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.