Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Ludovic 'Archivist' Lagouardette 7d72930f9c Fixed faulty test pirms 1 gada
.idea Added tests for error messages on all build system known failure pirms 1 gada
include/molasses Added tests for error messages on all build system known failure pirms 1 gada
prototypes/molasses First unit test added pirms 1 gada
src Added tests for error messages on all build system known failure pirms 1 gada
tests Fixed faulty test pirms 1 gada
.clang-format Compiles and build completely pirms 1 gada
.clang-tidy Added several features pirms 1 gada
.gitignore Added tests for error messages on all build system known failure pirms 1 gada
CMakeLists.txt Added tests for error messages on all build system known failure pirms 1 gada
README.md Made help into a proper readme too pirms 1 gada

README.md

Sugar

Commands

lex : string ➔ lexed_output

takes a filename to a file that must be compiled

merge : lexed_output lexed_output ➔ lexed_output

merges two lexed modules together

parse : lexed_output ➔ parsed_output

prepares code for generation

generate : parsed_output string ➔ string

takes a root filename, it will be appended with ".s" and that will be the generated assembly file, the filename will not be consumed

assemble : string ➔ _

takes a root filename, it will be appended with ".s" and that file will be compiled, the compiled output will be the given filename

help : _ ➔ _

prints this help

Examples

  • compile the file "example.mol" into the "potato.s" assembly file

$ sugar example.mol lex parse potato generate

  • compile the file "example.mol" into the "potato" executable

$ sugar example.mol lex parse potato generate assemble

  • compile the file "example.mol" and "2.mol" into the "potato" executable

$ sugar example.mol lex 2.mol lex merge parse potato generate assemble