PTTB (Português Técnico do Brasil) - A Brazilian-themed programming language
Project description
PTTB - Português Técnico do Brasil 🇧🇷
A linguagem de programação conceitual 100% brasileira, focada no desenvolvedor CLT, agora rodando em Python como um runtime cross-platform!
O que é?
PTTB é um interpretador desenvolvido em Python que traduz a rotina, a ansiedade e a burocracia do desenvolvedor brasileiro para uma linguagem de programação funcional.
- Chega de
if/else: Aqui a gente usasePixAceitou,sePixNegouesePixDeuRuim. - Sem
whileinfinito: O negócio éenquantoFilaNaoAnda. - Quer imprimir na tela?:
mandaMsg("Alô mundo!"). - Precisa de input?:
pedeInputNoZap("Qual o seu nome?").
E sim, tem arrays (caixaDePaesDeQueijo) e dicionários (inventarioDoZAP).
Como Instalar (via pip)
Em breve você poderá instalar diretamente via pip:
pip install pttb-lang
Como Usar
Crie um arquivo teste.pttb:
definir dinheiro = 10
funcaoCLT pagar(valor) {
sePixAceitou (valor <= dinheiro) {
mandaMsg("Pagamento aprovado")
dinheiro = dinheiro - valor
} sePixNegou {
mandaMsg("Sem saldo")
}
}
mandaMsg("Saldo antes:")
mandaMsg(dinheiro)
pagar(5)
Execute no terminal:
pttb run teste.pttb
Para debugar a execução:
pttb debug teste.pttb
Extensão para VS Code
O repositório inclui também uma extensão do VS Code com Syntax Highlighting e Snippets para facilitar a sua vida CLT. Basta instalar a pasta pttb-vscode na sua IDE!
Estrutura do Interpretador
O PTTB possui toda a stack necessária de um interpretador real:
- Lexer: Tokeniza o código PTTB usando regex e identifica as palavras-chave meme.
- Parser: Constrói uma Abstract Syntax Tree (AST) a partir dos tokens.
- Runtime: Cuida de variáveis, chamadas de funções recursivas e call stack.
- Interpretador: Navega a AST e executa a lógica mapeada em Python.
- CLI: Executável
pttbamigável no terminal.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pttb_lang-1.5.0.tar.gz.
File metadata
- Download URL: pttb_lang-1.5.0.tar.gz
- Upload date:
- Size: 26.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2d5e3f7a982176e6a9ebe68565f79d9ea256a769c772eace299584f67400bdb
|
|
| MD5 |
10f572b915f7ae31b8a0f0580990cc33
|
|
| BLAKE2b-256 |
326ee2fe009ecac29f1c72d5c54110515fec0fa1b19d6d83b50bc3b3f4dcf87c
|
File details
Details for the file pttb_lang-1.5.0-py3-none-any.whl.
File metadata
- Download URL: pttb_lang-1.5.0-py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25153a577682bace4c213293b7d4b89fd66a24f7c38568b6b6e7ae9f7ca877ae
|
|
| MD5 |
f6997988685b1c94dfc1a4cde21f6bd8
|
|
| BLAKE2b-256 |
c02f649dc6d2b26799720989529a1a3c925da52a639046fd67ab831804585557
|