mirror of
https://github.com/ParkerTenBroeck/automata.git
synced 2026-06-07 05:28:45 -04:00
loading machines visually now downs
This commit is contained in:
parent
c57a95b7b5
commit
62cda62b31
7 changed files with 230 additions and 64 deletions
|
|
@ -25,8 +25,8 @@ pub struct TransitionTo<'a> {
|
|||
|
||||
#[derive(Clone, Debug)]
|
||||
#[allow(unused)]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
|
||||
#[cfg_attr(feature = "serde", serde_with::serde_as)]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
|
||||
pub struct Fa<'a> {
|
||||
pub initial_state: State<'a>,
|
||||
pub states: HashMap<State<'a>, StateInfo>,
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ pub mod fa;
|
|||
pub mod pda;
|
||||
pub mod tm;
|
||||
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct Options {
|
||||
pub non_deterministic: bool,
|
||||
|
|
|
|||
|
|
@ -94,6 +94,9 @@ impl<'a> Context<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
|
||||
#[cfg_attr(feature = "serde", serde(tag = "type"))]
|
||||
#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
|
||||
pub enum Machine<'a> {
|
||||
Fa(fa::Fa<'a>),
|
||||
Pda(pda::Pda<'a>),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue