Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Ludovic 'Archivist' Lagouardette 1c58c9f44b First unit test added il y a 1 an
.idea Compiles and build completely il y a 1 an
include/molasses Compiles and build completely il y a 1 an
prototypes/molasses First unit test added il y a 1 an
src First unit test added il y a 1 an
tests First unit test added il y a 1 an
.clang-format Compiles and build completely il y a 1 an
.clang-tidy Compiles and build completely il y a 1 an
.gitignore Git Ignores il y a 1 an
CMakeLists.txt First unit test added il y a 1 an
README.md Made help into a proper readme too il y a 1 an

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