No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
Ludovic 'Archivist' Lagouardette ee0243bd8a Added __JUMP_IF__ operation, its generator, and a a test hace 8 meses
.idea Work on interpreter hace 1 año
include Added __JUMP_IF__ operation, its generator, and a a test hace 8 meses
prototypes/molasses First unit test added hace 1 año
src Added __JUMP_IF__ operation, its generator, and a a test hace 8 meses
tests Added __JUMP_IF__ operation, its generator, and a a test hace 8 meses
.clang-format Compiles and build completely hace 1 año
.clang-tidy Added several features hace 1 año
.gitignore Added tests for error messages on all build system known failure hace 1 año
CMakeLists.txt Added __JUMP_IF__ operation, its generator, and a a test hace 8 meses
README.md Made help into a proper readme too hace 1 año

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