Initial commit

This commit is contained in:
Neemek 2024-10-08 15:08:56 +02:00
commit 541140687f
Signed by: neemek
GPG key ID: 28360A8951CD0E9B
25 changed files with 4776 additions and 0 deletions

47
README.md Normal file
View file

@ -0,0 +1,47 @@
# L'anglais
The purpose of this project is to learn how to
make a virtual machine for interpreting generated
bytecode for improved performance. Hopefully, this
will apply to making virtual machines/emulators
for real processors
## Programming language
The programming language should be compiled, so
the performance is not massively impacted.
For example:
- Go
- Rust
- C++ (already used)
- js + bun
- zig
I would like to use a language i know, and
preferably strongly typed. Rust has a great
compiler with warnings, but at the same time, it
would be nice to try out go for once.
## Components
The application would need a lexer, to process the
grammar into tokens.
Afterwards, the tokens need to be parsed. The type
of parser doesn't matter, but it may be nice to
try out an LR parser. The parser needs to generate
bytecode for the vm.
The vm, as my first, will be stack-based. It
should go through the generated bytecode and
execute it step by step. There should be support
for functions using "jump" instructions.
## Grammar
The programming language should have a specified
grammar. The grammar will be found as examples in
./examples/.