pub struct Builder {
pub aliases: HashMap<String, SrcRef>,
pub rules: HashMap<String, RuleBuild>,
pub imports: Vec<SrcRef>,
pub entry_type: String,
}Fields§
§aliases: HashMap<String, SrcRef>§rules: HashMap<String, RuleBuild>§imports: Vec<SrcRef>§entry_type: StringImplementations§
Source§impl Builder
impl Builder
pub fn new(entry_type: String) -> Self
pub fn get_program_instructions(ast: &Gramem) -> &Vec<Gramem> ⓘ
pub fn process(&mut self, ast: &Gramem, src: &str)
Sourcepub fn set_sub_aliases(
&self,
base: &ProductionBuild,
productions: &mut RuleBuild,
src: &str,
)
pub fn set_sub_aliases( &self, base: &ProductionBuild, productions: &mut RuleBuild, src: &str, )
Sets the aliases for each production as a optional item alias, except for the ones defined
in base. Also, adds a None alias for the productions that doesn’t have a alias defined
in another.
Sourcepub fn dump_grammar(&self, src: &str) -> String
pub fn dump_grammar(&self, src: &str) -> String
Sourcepub fn dump_reductor(&self, src: &str) -> String
pub fn dump_reductor(&self, src: &str) -> String
pub fn write_rule_reduction( out: &mut String, entry_type: &str, name: &str, prods: &RuleBuild, src: &str, )
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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