-
Notifications
You must be signed in to change notification settings - Fork 3
Fast, type-safe, object-oriented language by yours truly
License
neeilan/neeilang
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The NeeiLang Programming Language ================================= NeeiLang (NL) is a lightweight programming language that is under construction. It is designed to be: * Performant : emits native code with a minimal runtime system * Type-safe : via aggressive type-checking and semantic analyses * Effortless : GC, minimal C-like syntax, ~15 keywords Implementation Progress: +-----------------------------+ | Feature | Status | +--------------------+--------+ | Local variables | OK | | Control flow | OK | | Functions | OK | | Type checker | OK | | Inheritance | OK | | Virtual methods | OK | | Type inference | OK | | Arrays | OK | | Print | OK | | Short-circuiting | | | Static variables | | | Garbage collection | | | Modules | | | Runtime errors | | | POSIX bindings | | | Standard library | | +--------------------+--------+ Usage : www.github.com/neeilan/neeilang/tree/master/doc/Usage Language : www.github.com/neeilan/neeilang/tree/master/doc/Lang.md Impl notes : www.github.com/neeilan/neeilang/tree/master/doc/Impl Note that this project is intended to be an academic exercise and not a production-grade language toolchain. Building - LLVM backend ----------------------- The LLVM backend is programmed against LLVM 9.0.0 API. Since common package manger repositories only offer newer versions, you'll need to build from source: * Download the LLVM 9.0.0 source code from https://releases.llvm.org/ * Extract and build locally (it's a CMake project, so `cmake .` + `make`) * In the neeilang dir, run cmake while setting the LLVM_PATH variable. For me, this looks like `cmake -DLLVM_PATH=~/personal/llvm9 .`, then `make`. * Examples under `test/functional` are ok to play with. `nl_llvm.sh` will have neeilang emit the LLVM IR and execute using lli, like so: ``` $ ./nl_llvm.sh test/functional/funcs_with_args.nl.splat hi hi hi ``` TLDR: Something like `cmake -DLLVM_PATH=~/personal/llvm9 .` + `make` Building - x86-64 backend ------------------------- * Run `cmake -DTARGET_X86=ON .`, then `make` * When this backend is complete, you can use `nl_x86.sh` just like `nl_llvm.sh`. At the moment, some tests may pass based on what has been implemented on x86. ``` $ ./nl_x86.sh test/functional/expr_precedence.nl.splat 17 ``` Running functional tests ------------------------ * Run `cmake -DTEST_DEPS=ON .` to set up the project with splat, which we use to run tests under test/functional. You can run individual tests by running `./bin/splat ./run/nl_llvm.sh <path_to_test>`, or you can perform all the tests by running `./run_functional_tests.sh` * You can learn more about splat at https://github.com/neeilan/splat
About
Fast, type-safe, object-oriented language by yours truly
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published