readme.txt 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. DRAKON-Erlang state machine demo
  2. ================================
  3. DRAKON Editor can generate state machines for Erlang.
  4. There are 2 kinds of generated state machines:
  5. 1. gen_fsm-based behaviour.
  6. The generated state machine will live in a separate process.
  7. Benefits:
  8. - The machine can be a full member of the supervision tree, enjoying all benefits of OTP.
  9. - Timeouts can be used.
  10. - Process dictionary can be used.
  11. 2. Standalone state machine.
  12. The generated state machine will be just a tuple in the memory.
  13. Benefits:
  14. - Very lightweight.
  15. - No need to think about termination.
  16. code_door.drn contains an gen_fsm-based state machine.
  17. lexer.drn contains a standalone state machine.
  18. How to run
  19. ----------
  20. 1. Start Erlang from the current directory:
  21. erl
  22. 2. In the Erlang window, compile the gen_fsm state machine:
  23. c(code_door).
  24. Don't worry about the warnings. They come from unimplemented behaviour methods.
  25. You can implement them, if you want.
  26. 3. Compile the standalone state machine:
  27. c(lexer).
  28. 4. Compile the launcher:
  29. c(fsm_demo).
  30. 5. Run the demo:
  31. fsm_demo:run().