jstar
interpreter
jstar | interpreter | |
---|---|---|
4 | 2 | |
105 | 29 | |
- | - | |
7.5 | 0.0 | |
10 days ago | over 3 years ago | |
C | Java | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
jstar
-
-❄️- 2023 Day 1 Solutions -❄️-
[LAUNGUAGE: J*]
-
What is your favorite programming language?
My language, obviously.
- Bamless/jstar: A lightweight embeddable scripting language
-
Implementing a Call Stack
Also, since you are willing to look at non-treewalk interpreters, you can take a look at this: https://github.com/bamless/jstar/blob/master/src/vm.h In this I use two parallel arrays, one for frames and one for variables. The frame contains the instruction pointer of the function and the address of the start of the activation record. Variables are stored packed inside the stack array and are accessed through indexing.
interpreter
-
Implementing a Call Stack
Here you go: https://github.com/bamless/interpreter. Look at the interpret/memenv package. The implementation really couldn't be more simple: it is just a queue of frame objects. pushStackFrame is called when calling a function, and popStackFrame when hitting a return or a function end. The MemoryEnvironment is instantiated by the interpreter visitor so all parts of it have access to the memory. The variables themselves are kept in an hashmap inside each Frame. Not the most efficient way but fast enough for a tree walking interpreter
-
Is there a FULL guide about creating a statically typed bytecode interpreter in C/C++?
https://github.com/bamless/interpreter/tree/master.
What are some alternatives?
wax - A tiny programming language that transpiles to C, C++, Java, TypeScript, Python, C#, Swift, Lua and WebAssembly 🚀
jmurmel - A standalone or embeddable JVM based interpreter/ compiler for Murmel, a single-namespace Lisp dialect inspired by Common Lisp
umka-lang - Umka: a statically typed embeddable scripting language
sof-language - The Stack with Objects and Functions Programming Language, a pure stack-based reverse-polish-notation functional and object-oriented experimental programming language.
lqsd - LiQuid Screen Dim - Dim your screen smoothly - Mirror of: https://git.korhonen.cc/FunctionalHacker/lqsd
OpenJ9 - Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
small-vm - A small virtual machine, following the "Write your own virtual machine" : https://justinmeiners.github.io/lc3-vm/ course.
JEvalExpr - Extensible Java Library and Tool to parse, interpret, compile and execute commands written in a language SQL Like.
Kwork - Cross-platform bundle for development on low memory machines
Nuua - The Nuua Programming Language - A zero dependencies, high level strong typed, interpreted language built on the top of modern C++17.
Metals - Scala language server with rich IDE features 🚀
Crafting Interpreters - Repository for the book "Crafting Interpreters"