valhallacThe Valhalla Compiler
This is the parser and compiler for Valhalla, which excludes the virtual machine that the compiled bytecode runs on, which is, Brokkr VM.
[!!] Planning a complete rewrite, and balancing work.
What's been done so far on the front-end:
The VM, i.e. the backend for the language, is being developed separately and will progress semi-independently.
In your shell, in the root of this repository, you may write:
cargo run [source-file-to-compile.vh] [-o out-file] [-v]or, have the compiler print out debug information like token streams, syntax trees, symbol tables, bytecode instructions, &ct., use --features=debug:
cargo run --features=debug [source-file.vh]For example, you can run.
cargo run test_source.vh -v # For verbose output.to demonstrate compilation with the included test-file (test_source.vh).
The argument of a source-file to compile is, of course, necessary.
current_compiler_test.md
This repository contains the front-end (parser and bytecode compilation) which processes the syntax and semantics of the source code. The generated AST is then compiled to Brokkr VM bytecode. The execution of the subsequent bytecode is handled by the language's VM (virtual machine) called Brokkr, which exists separately from this repository.
Valhalla is a set-theoretic programming language. That's to say, it's based on principles from set theory, in a way that all types are just sets, and hence everything is just an element of a set. The language is meant to give a new way to interact with types, and provides an intuitive way to think about them. A goal is that it may also be used to verify proofs and such in and around set theory.
The language is a general purpose, but instead of being totally object-oriented, or functional, etc., it's just set theory based. From what I've gathered, it's not a very popular paradigm... Likely for good reason, but hey, it might be interesting.
To be significantly reduced.
