You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Ludovic 'Archivist' Lagouardette 0329cc5605 Made help into a proper readme too 1 jaar geleden
.idea Compiles and build completely 1 jaar geleden
include/molasses Compiles and build completely 1 jaar geleden
prototypes/molasses Added help 1 jaar geleden
src Made help into a proper readme too 1 jaar geleden
.clang-format Compiles and build completely 1 jaar geleden
.clang-tidy Compiles and build completely 1 jaar geleden
.gitignore Git Ignores 1 jaar geleden
CMakeLists.txt Compiles and build completely 1 jaar geleden
README.md Made help into a proper readme too 1 jaar geleden

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