Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/daniel-boll/pile

The oficial repo for the pile lang
https://github.com/daniel-boll/pile

compiler compiler-principles concatenative-programming-language lexer-analyzer programming-language stack-based

Last synced: about 1 month ago
JSON representation

The oficial repo for the pile lang

Awesome Lists containing this project

README

        

#

Pile Lang

> Pile is a Concatenative Stack-Oriented Programming Language. Pile's name come from the stack concept of _piling_ things.



## Lexer

- [X] BNF
- [X] 3 tipos de datos:
- Stack: `int`, `float`, `ptr`
- Memory: `int`, `string`, `ptr`
- [X] Operadores:
- [X] Aritméticos: `+`, `-`, `*`, `/`, `%`
- [X] Lógicos/relacional: `&&`, `||`, `!`, `==`, `!=`, `>`, `<`, `>=`, `<=`

- [X] Regras de identificadores
- [ ] Palavras reservadas
- [ ] mod, dump, dup, dup2, drop, swap, over, mem, st8, ld8, st32, ld32, sts, lds, syscall1, syscall1!, syscall3, syscall3!, if, else, while, for, do, macro, end, include, i32, i8, string
- [X] IO
- [X] `write`
- [ ] `dump` dump the stack
- [X] `read`
- [X] Implementação e descrição do autômato

## Implementação

## Installation

## TODO

- [ ] Documentation
- [ ] Refactor components to separatedly do
- [X] Lexical Analysis
- [ ] Semantic Analysis
- [ ] Syntactic Analysis
- [ ] CI/CD test automation
- [ ] Benchmark comparison

## Troubleshooting

\begin{bnfgrammar}
::=
;;
;;
::=
|
|
|
| \textbf{string\_literal}
| \textbf{id}
|
|
|
| \textbf{arithmetic\_op}
|
;;
;;
::= \textbf{\char"003A\char"003A}
;;
::= \textbf{i32} || \textbf{f32} || \textbf{f64} || \textbf{bool}
;;
::= \textbf{id}
;;
::= \textbf{@} \textbf{id}
;;
::= \textbf{integer\_literal} || \textbf{float\_literal} || \textbf{bool}
;;
;;
::= \textbf{swap} || \textbf{dup} || \textbf{drop} || \textbf{over} || \textbf{dup2} || \textbf{dump}
;;
::= ( || )
;;
;;
::= ||
;;
::= \textbf{if} \textbf{end}
;;
::= \textbf{if} \textbf{else} \textbf{end}
;;
;;
::= \textbf{comparison_op} || ||
;;
::= \textbf{while} + \textbf{do} \textbf{end}
;;
::= \textbf{range} ? \textbf{do} \textbf{end}
;;
\end{bnfgrammar}