Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/daniel-boll/pile
- Owner: Daniel-Boll
- Created: 2022-09-11T03:30:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-30T22:09:53.000Z (almost 2 years ago)
- Last Synced: 2024-11-05T09:30:41.673Z (3 months ago)
- Topics: compiler, compiler-principles, concatenative-programming-language, lexer-analyzer, programming-language, stack-based
- Language: C++
- Homepage:
- Size: 128 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
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}