Skip to content

dave-nachman/bytelang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bytelang

Bytelang is a WIP implementation of a dynamically typed programming language in Rust that is compiled to bytecode and run on a stack-based virtual machine.

I wrote this as an exercise in writing a bytecode-based interpreter, and also as an opportunity to write something in Rust.

Stages

Parser -> Semantic Analysis -> Code generation -> Virtual machine

The parser is written using lalrpop, outputing AST nodes

The semantic analyzer checks for errors (and give warnings) such as reassignment of variables, calling a function with an incorrect arity, and referring to an identifier that hasn't been defined

The code generation step compiles the AST into custom bytecode

The virtual machine executes the bytecode, maintaining a code and data stack, a heap, and a symbol table

About

A bytecode VM programming language in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages