[−][src]Struct lemon_tree::LemonMintBuilder
The state vector for the entire parser generator is recorded as follows. (LEMON uses no global variables and makes little use of static variables. Fields in the following structure can be thought of as begin global variables in the program.)
Implementations
impl LemonMintBuilder
[src]
pub fn new() -> LemonMintBuilder
[src]
pub fn load_y_file(
self,
filename: &Arc<String>
) -> Result<LemonMintBuilder, LemonMintError>
[src]
self,
filename: &Arc<String>
) -> Result<LemonMintBuilder, LemonMintError>
pub fn load_y<R>(
self,
filename: &Arc<String>,
input: R
) -> Result<LemonMintBuilder, LemonMintError> where
R: Read,
[src]
self,
filename: &Arc<String>,
input: R
) -> Result<LemonMintBuilder, LemonMintError> where
R: Read,
pub fn set_start_symbol(
self,
filename: &Arc<String>,
n_line: usize,
value: String
) -> Result<LemonMintBuilder, LemonMintError>
[src]
self,
filename: &Arc<String>,
n_line: usize,
value: String
) -> Result<LemonMintBuilder, LemonMintError>
Set the parser "%start_symbol".
pub fn set_token_type(
self,
value: String
) -> Result<LemonMintBuilder, LemonMintError>
[src]
self,
value: String
) -> Result<LemonMintBuilder, LemonMintError>
Set the parser "%token_type".
pub fn set_default_type(
self,
value: String
) -> Result<LemonMintBuilder, LemonMintError>
[src]
self,
value: String
) -> Result<LemonMintBuilder, LemonMintError>
Set the parser "%default_type".
pub fn set_trace_prompt(
self,
value: String
) -> Result<LemonMintBuilder, LemonMintError>
[src]
self,
value: String
) -> Result<LemonMintBuilder, LemonMintError>
Enable trace, and set prompt that will be printed before each message.
pub fn set_extra_argument_type(
self,
value: String
) -> Result<LemonMintBuilder, LemonMintError>
[src]
self,
value: String
) -> Result<LemonMintBuilder, LemonMintError>
Set the parser %extra_argument.
pub fn set_left(
self,
filename: &Arc<String>,
n_line: usize,
symbol_names: &str
) -> Result<LemonMintBuilder, LemonMintError>
[src]
self,
filename: &Arc<String>,
n_line: usize,
symbol_names: &str
) -> Result<LemonMintBuilder, LemonMintError>
Add the parser "%left NAME"
pub fn set_right(
self,
filename: &Arc<String>,
n_line: usize,
symbol_names: &str
) -> Result<LemonMintBuilder, LemonMintError>
[src]
self,
filename: &Arc<String>,
n_line: usize,
symbol_names: &str
) -> Result<LemonMintBuilder, LemonMintError>
Add the parser "%right NAME"
pub fn set_nonassoc(
self,
filename: &Arc<String>,
n_line: usize,
symbol_names: &str
) -> Result<LemonMintBuilder, LemonMintError>
[src]
self,
filename: &Arc<String>,
n_line: usize,
symbol_names: &str
) -> Result<LemonMintBuilder, LemonMintError>
Add the parser "%nonassoc NAME".
pub fn add_type(
self,
filename: &Arc<String>,
n_line: usize,
symbol_name: String,
type_name: String
) -> Result<LemonMintBuilder, LemonMintError>
[src]
self,
filename: &Arc<String>,
n_line: usize,
symbol_name: String,
type_name: String
) -> Result<LemonMintBuilder, LemonMintError>
Add the parser "%type symbol_name {Type}".
pub fn add_fallback(
self,
filename: &Arc<String>,
n_line: usize,
fallback_to_symbol_name: String,
symbol_names: &str
) -> Result<LemonMintBuilder, LemonMintError>
[src]
self,
filename: &Arc<String>,
n_line: usize,
fallback_to_symbol_name: String,
symbol_names: &str
) -> Result<LemonMintBuilder, LemonMintError>
Add the parser "%fallback FB A B C".
pub fn add_rule(
self,
filename: &Arc<String>,
n_line: usize,
lhs_name: String,
rhs_names_aliases: &str,
code: String
) -> Result<LemonMintBuilder, LemonMintError>
[src]
self,
filename: &Arc<String>,
n_line: usize,
lhs_name: String,
rhs_names_aliases: &str,
code: String
) -> Result<LemonMintBuilder, LemonMintError>
Add parser rule like "a", "b(v_b) COMMA c(v_c)", "vec![v_b, v_c]"
pub fn add_code(self, code: String) -> Result<LemonMintBuilder, LemonMintError>
[src]
Add the parser %code or %include
pub fn set_no_compress(
self,
new_no_compress: bool
) -> Result<LemonMintBuilder, LemonMintError>
[src]
self,
new_no_compress: bool
) -> Result<LemonMintBuilder, LemonMintError>
pub fn set_no_resort(
self,
new_no_resort: bool
) -> Result<LemonMintBuilder, LemonMintError>
[src]
self,
new_no_resort: bool
) -> Result<LemonMintBuilder, LemonMintError>
pub fn try_into_lemon(self) -> Result<LemonMint, LemonMintError>
[src]
The main program. Parse the command line and do it...
Trait Implementations
impl Debug for LemonMintBuilder
[src]
impl TryFrom<LemonMintBuilder> for LemonMint
[src]
type Error = LemonMintError
The type returned in the event of a conversion error.
fn try_from(builder: LemonMintBuilder) -> Result<LemonMint, LemonMintError>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for LemonMintBuilder
impl !Send for LemonMintBuilder
impl !Sync for LemonMintBuilder
impl Unpin for LemonMintBuilder
impl !UnwindSafe for LemonMintBuilder
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, 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>,