RodrigoDornelles / 3bc-lang

Low-level language, tiny virtual machine, minimal runtime, intermediate representation, embeddable, easy for beginners. (Friendly Punched cards)
https://3bc-lang.org
GNU General Public License v3.0
242 stars 27 forks source link

document FSM in sourcecode (doxygen) #397

Open RodrigoDornelles opened 1 year ago

RodrigoDornelles commented 1 year ago
@startuml

[*] --> FSM_3BC_DEFAULT
FSM_3BC_DEFAULT --> FSM_3BC_STARTING
FSM_3BC_STARTING --> FSM_3BC_RUNNING
FSM_3BC_RUNNING --> FSM_3BC_INTERPRETER
FSM_3BC_RUNNING --> FSM_3BC_SYSCALL
FSM_3BC_RUNNING --> FSM_3BC_COUNTING
FSM_3BC_RUNNING --> FSM_3BC_EXITING
FSM_3BC_SYSCALL --> FSM_3BC_RUNNING
FSM_3BC_INTERPRETER --> FSM_3BC_RUNNING
FSM_3BC_COUNTING --> FSM_3BC_RUNNING
FSM_3BC_EXITING --> FSM_3BC_STOPED
FSM_3BC_STOPED --> [*]

state FSM_3BC_SYSCALL {
[*] --> FSM_3BC_IO_WRITE
[*] --> FSM_3BC_IO_READ
[*] --> FSM_3BC_RAM_WRITE
[*] --> FSM_3BC_RAM_READ
[*] --> FSM_3BC_WAITING
FSM_3BC_IO_WRITE --> [*]
FSM_3BC_IO_READ --> [*]
FSM_3BC_RAM_WRITE --> [*]
FSM_3BC_RAM_READ --> [*]
FSM_3BC_RAM_WRITE --> [*]
FSM_3BC_WAITING --> [*]
}

state FSM_3BC_INTERPRETER {
[*] --> FSM_3BC_EXPAND
FSM_3BC_EXPAND --> FSM_3BC_READING
FSM_3BC_READING --> FSM_3BC_COMMIT
FSM_3BC_EXPAND  --> [*]
FSM_3BC_READING --> [*]
FSM_3BC_COMMIT --> [*]
}

@enduml