A front-end Unix x86-64 compiler for the Goose programming language.
- Fast compilation
- Compiles to intel-syntax x86 assembly and uses NASM to assemble
- Goose code has a C-like syntax
- Can implement C standard library functions in Goose code
- Can output assembly files for advanced debugging
Basic hello world program (only 3 lines!):
UI0 main[] {
extern::printf["Hello world!\n"];
}
In Goose code, function arguments and parameters are encapsulated with the square brackets.
Arrays uses parenthesis.
Stucts are called "flock".
Enums are called "gaggle".
Int is "SI32".
Double is "FP64".
Boolean is "B8".
Char is "SC8".
Void is "UI0".
Switch statement is called "match".
The pre-processor directive symbol is "~". "~using FILE.goose" includes external .goose code file. "~macro NAME VALUE" is a pre-processor macro constant.
DaCompiler was made with simple compilation arguments in mind:
Syntax: dacompiler [OPTION] <input>
Options:
--asm output assembly file
--output <output> output file name (without extension)
- Change LR parsing to operator precedence based parsing
- Use stack arguments over register arguments (this is possible)
- Make a code optimizer
- Make a custom standard library
- Make a back-end assembler