Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

34 řádky
1.0 KiB

  1. # Sugar
  2. ## Commands
  3. lex : string ➔ lexed_output
  4. > takes a filename to a file that must be compiled
  5. merge : lexed_output lexed_output ➔ lexed_output
  6. > merges two lexed modules together
  7. parse : lexed_output ➔ parsed_output
  8. > prepares code for generation
  9. generate : parsed_output string ➔ string
  10. > takes a root filename, it will be appended with ".s" and that will be the generated assembly file,
  11. > the filename will not be consumed
  12. assemble : string ➔ _
  13. > takes a root filename, it will be appended with ".s" and that file will be compiled,
  14. > the compiled output will be the given filename
  15. help : _ ➔ _
  16. > prints this help
  17. ## Examples
  18. - compile the file "example.mol" into the "potato.s" assembly file
  19. > `$ sugar example.mol lex parse potato generate`
  20. - compile the file "example.mol" into the "potato" executable
  21. > `$ sugar example.mol lex parse potato generate assemble`
  22. - compile the file "example.mol" and "2.mol" into the "potato" executable
  23. > `$ sugar example.mol lex 2.mol lex merge parse potato generate assemble`