Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code emission #418

Open
2 of 42 tasks
StoneCypher opened this issue Feb 9, 2020 · 1 comment
Open
2 of 42 tasks

Code emission #418

StoneCypher opened this issue Feb 9, 2020 · 1 comment

Comments

@StoneCypher
Copy link
Owner

StoneCypher commented Feb 9, 2020

This is one of the really big deals. This is also one of the things that makes peg so powerful, and what almost got me to leave it for canopy and antlr to get semiportability.

Basically, this is a proper compiler, rather than an inline compiler, whose product is source code rather than a live object. This leaves a whole lot of questions open around hooks #255 and guards #412; still, this is progressively becoming more and more clear as the right next step, rather than another VM for target languages.

Properly, this should compile some intermediary, which in turn gets compiled down by a language driver. C, SQL, JS, and Erlang should be sufficiently different to make that doable.

This is different than Transcompile to other existing state machines #563 because this produces code for a single machine in another language, rather than a datastructure for a generic machine.

  • Emit JSSM compiled
  • Emit DOT Create to-dot button #170
  • Emit SVG Create to-svg button #169
  • Emit JS
  • Emit C
    • Should there be a specialized C++?
  • 🔥 Emit UML state chart
  • 😮 Emit Amazon States Language Amazon States Language #496
  • Emit Python
  • Emit Ruby
  • Emit Java
  • Emit Erlang
  • Emit some awful .NET thing
  • Emit some awful AWS thing
  • Emit a fully conceived Github Action machine
  • Emit PHP
  • Emit SQL
    • Emit MySQL
    • Emit PostgreSQL
    • Emit Oracle PL/I
    • Emit mssql
    • Emit sqlite
  • Emit Swift
  • Emit Go
  • Emit shells
    • Emit bash
    • Emit batch
    • Emit powershell
    • Emit dockerfile
  • Emit rust
  • Emit C#
  • Emit some kind of Unity nonsense
  • Emit some kind of Unreal3d nonsense
  • Emit Haskell, to keep the hipsters happy
  • Emit Harel state chart

Who knows? Even Fortran and COBOL would make the case for a legacy path out

Might be smart to target existing state machine libraries...

Lol can you imagine if this emitted assemblies or Verilog or VHDL or whatever

@StoneCypher
Copy link
Owner Author

It may be nice for the machines to be in at least some rudimentary sense interoperable, which probably just means taking transitions, actions, and providing end states as strings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment