Este é o meu projeto utilizando Java a ANTLR para participar da Rinha de Compiladores.
# Build the image
docker build -t rinha-compilers .
# Run
docker run rinha-compilers
let fib = fn (n) => {
if (n < 2) {
n
} else {
fib(n - 1) + fib(n - 2)
}
};
print(fib(46))
- Remove escape chars in the print output
- fix print \n
- use labels in expressions with multiples derivations like term and try to remove the op and binop token labels
- use -no-listener option in scripts to not generate listeners
- analyze to use ParseTreeProperty<T>
- define reserved words
- create tests to make enhancements more safely