pub struct ExplicitWithSignature {
pub automaton: Explicit,
pub states: Interner<String>,
pub signature: Signature,
}Expand description
An explicit automaton together with the symbol signature and state names used by its source.
Alto’s .auto format writes rules top-down, for example
S! -> f(A,A) [1.0]. This reader builds the equivalent bottom-up
Explicit automaton, i.e. the rule above becomes f(A,A) -> S.
Fields§
§automaton: ExplicitBottom-up explicit automaton built from the Alto rules.
states: Interner<String>Mapping from Alto state names to dense state IDs.
signature: SignatureMapping from Alto terminal symbols to symbol IDs.
Trait Implementations§
Source§impl Clone for ExplicitWithSignature
impl Clone for ExplicitWithSignature
Source§fn clone(&self) -> ExplicitWithSignature
fn clone(&self) -> ExplicitWithSignature
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExplicitWithSignature
impl Debug for ExplicitWithSignature
Source§impl InputCodec<ExplicitWithSignature> for AltoTreeAutomatonInputCodec
impl InputCodec<ExplicitWithSignature> for AltoTreeAutomatonInputCodec
Source§fn metadata(&self) -> &'static CodecMetadata
fn metadata(&self) -> &'static CodecMetadata
Return static codec metadata. This must not read or parse input.
Source§fn read(
&self,
reader: &mut dyn Read,
) -> Result<ExplicitWithSignature, InputCodecError>
fn read( &self, reader: &mut dyn Read, ) -> Result<ExplicitWithSignature, InputCodecError>
Decode a byte stream.
Source§fn read_path(&self, path: &Path) -> Result<T, InputCodecError>
fn read_path(&self, path: &Path) -> Result<T, InputCodecError>
Decode a file. Codecs with path-relative semantics may override this method.
Source§fn read_bytes(&self, input: &[u8]) -> Result<T, InputCodecError>
fn read_bytes(&self, input: &[u8]) -> Result<T, InputCodecError>
Decode an in-memory byte sequence.
Auto Trait Implementations§
impl !Freeze for ExplicitWithSignature
impl RefUnwindSafe for ExplicitWithSignature
impl Send for ExplicitWithSignature
impl Sync for ExplicitWithSignature
impl Unpin for ExplicitWithSignature
impl UnsafeUnpin for ExplicitWithSignature
impl UnwindSafe for ExplicitWithSignature
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