Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
Ludovic 'Archivist' Lagouardette 26724a3812 Added type checked support for GOTO and LABEL in prevision of adding conditionals jumps and loops 10 mesi fa
.idea Work on interpreter 1 anno fa
include Added type checked support for GOTO and LABEL in prevision of adding conditionals jumps and loops 10 mesi fa
prototypes/molasses First unit test added 1 anno fa
src Added type checked support for GOTO and LABEL in prevision of adding conditionals jumps and loops 10 mesi fa
tests Added type checked support for GOTO and LABEL in prevision of adding conditionals jumps and loops 10 mesi fa
.clang-format Compiles and build completely 1 anno fa
.clang-tidy Added several features 1 anno fa
.gitignore Added tests for error messages on all build system known failure 1 anno fa
CMakeLists.txt Added type checked support for GOTO and LABEL in prevision of adding conditionals jumps and loops 10 mesi fa
README.md Made help into a proper readme too 1 anno fa

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