frame_transpiler
frame_transpiler copied to clipboard
Frame is a markdown language for creating state machines (automata) in Python as well as generating UML documentation.
framec doesn't catch that the interface call doesn't exist: ``` `import sys` #![generate_frame_event] fn main { var cst:# = #ChangeStateTest() cst.print() } #ChangeStateTest -interface- prnt -machine- $S0 |>| ->> $S1...
Explore more scenarios like these in our tests. ``` #TransitionParamsArgsTest -machine- $TransitionParamsTests |a| -> $ZeroEnterArgs ^ --- Ok |b| -> $OneEnterArg ^ --- Error. len(args) != len(params) |c| -> (1)...
``` `import sys` #![generate_frame_event] fn main { var hw:# = #HelloWorld() hw.speak() hw.speak() hw.speak() } #HelloWorld -interface- speak -machine- $Hello |speak| print("Hello") -> $World ^ $World |speak| print("World!") -> $Done...
Add "outer" attribute type `#![attr]` and gen code for autogen creation of a FrameEvent. This will be the first instance of a "module" attribute for the program (rather than the...
Currently, the frame_c parser is organized around parsing a single system. With the introduction of functions and the goal to create fully running programs, Frame needs to introduce some form...
frame_c now generates a working python program from this syntax: ``` fn main[a,b0,b1,c0,c1,d] { #Test($(a,b0), >(b1,c0), #(c1,d)) } #Test[$[a,b], >[b,c], #[c,d]] -machine- $S0[a,b] |>| [b,c] print("a = " + a...
Currently autoinc tokens ++/-- are parsed but permitted/forbidden per language. This is being done in the code generators. Need to add an additional stage to analyze AST for correctness for...
These might be useful to execute formatting instructions to the code generators. Once use case is when literal strings shouldn't just generate as an in place expression: ``` |e| `a++`...
Adding a main to a spec would enable compiled command line programs and easier testing scenarios. ``` fn main { #Test($(1,2), >(3,4), #(5,6)) } #Test[$[a,b], >[c,d], #[e,f]] -machine- $S0 [a,b]...
Look at code generated for action 'autoid1': ``` #TestAutoIncDec -machine- $S0 |>| autoid1() autoid2() ^ -actions- autoid1 { var i = 0 ++i == 2 ? print ("1") :> i++...