Releases: vorotynsky/Kroha
Kroha v1.3
Better syntax
- Multiple parser error messages.
- Optional semicolons.
- Optional braces and parenthesis.
- Optional program declaration (
program {}
). It can be an omitted, single line or with braces.
Kroha v1.2
Growing tree
Syntax tree
- Applied some ideas from the "Tree that grows".
Errors
- New format of error messages, added source position.
- Fix bug: lose same errors on one line.
Kroha v1.1
Features
Backend:
- Extract common things to
Kroha.Backend.Common
. - Type system config for backends. A backend can define allowed registers, types, sizes and allowed casts.
Error handling:
- User friendly errors.
- Same operations can throw many errors.
- Exit status code
Fixes
- Global scope behaviour. Now declarations available before definitions.
Kroha
Kroha
Kroha is a new language.
Changed syntax for loops and other elements.
Assembly output is formated (with indents).
Fixed bug with call stack (add sp, X
).
Inline registers
Inline registers
Added inline registers. Now you can use registers like %ax
.
Fixed stack alignment, after function call (add sp, size
).
Global variables pushed as pointers, but counted as variables.
Global scope
Globals
Language
Added program
keyword. All code should be inside program { }
. It allows for creating multiple frames in the program.
Support for ip
, sp
, bp
, si
, di
, cs
, ds
, ss
, es
, fs
registers.
Added global variables and constants. Global variables are placed in .data
, constants are in .rodata
.
Added fake variables and frames. A fake variable or a label added their name into the global scope but creates nothing in assembly code.
Backend
Downgraded NASM backend to 16-bit.
Fixes
Fixed bug with variables started from do
.
Errors
Created error handling with Eiter
The parser was remade with parsec
It works!
The minimal valuable compiler generates NASM.