Skip to content

Daniel-Boll/pile

Folders and files

NameName
Last commit message
Last commit date
Jan 30, 2023
Jan 30, 2023
Jan 30, 2023
Jan 30, 2023
Jan 30, 2023
Oct 7, 2022
Jan 30, 2023
Sep 11, 2022
Oct 7, 2022
Jan 30, 2023
Oct 27, 2022
Oct 7, 2022
Oct 19, 2022

Repository files navigation

Pile Lang

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

Lexer

  • BNF
  • 3 tipos de datos:
    • Stack: int, float, ptr
    • Memory: int, string, ptr
  • Operadores:
    • Aritméticos: +, -, *, /, %
    • Lógicos/relacional: &&, ||, !, ==, !=, >, <, >=, <=
  • 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
  • IO
    • write
      • dump dump the stack
    • read
  • Implementação e descrição do autômato

Implementação

Installation

TODO

  • Documentation
  • Refactor components to separatedly do
    • Lexical Analysis
    • Semantic Analysis
    • Syntactic Analysis
  • CI/CD test automation
  • Benchmark comparison

Troubleshooting

\begin{bnfgrammar} ::= ;; ;; ::= | | | | \textbf{string_literal} | \textbf{id} | | | <variable_declaration> | \textbf{arithmetic_op} | ;; ;; ::= \textbf{\char"003A\char"003A} ;; ::= \textbf{i32} || \textbf{f32} || \textbf{f64} || \textbf{bool} ;; <variable_declaration> ::= \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}