8000 GitHub - inkitori/aria-compiler: custom compiler · GitHub
[go: up one dir, main page]

Skip to content

About

custom compiler

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

63 Commits

Folders and files

Repository files navigation

aria lang

compiler written with handwritten lexer/parser/codegen

supports assignments (:), + - * /, comparisons (< > =), and while loops.

example

gcd.aria computes gcd(1071, 462) via the euclidean algorithm, using a - a / b * b as a mod b

a : 1071;
b : 462;
while (b > 0)
{
	t : a - a / b * b;
	a : b + 0;
	b : t + 0;
}

after the loop, a holds the gcd (21).

running

use ./run.sh, passing as an argument to print out its content at the end

./run.sh gcd.aria a
# exit=21

About

custom compiler

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0