https://github.com/tatskaari/gustolang
A toy language written in kotlin
https://github.com/tatskaari/gustolang
functional-languages grammar gusto kotlin toy-language
Last synced: 4 months ago
JSON representation
A toy language written in kotlin
- Host: GitHub
- URL: https://github.com/tatskaari/gustolang
- Owner: Tatskaari
- Created: 2017-08-10T19:58:35.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-03-17T17:57:21.000Z (over 7 years ago)
- Last Synced: 2025-04-14T08:21:36.265Z (about 1 year ago)
- Topics: functional-languages, grammar, gusto, kotlin, toy-language
- Language: JavaScript
- Size: 1.3 MB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GustoLang
[](https://travis-ci.org/Tatskaari/GustoLang)
[](https://codecov.io/gh/Tatskaari/GustoLang)
A toy language written in kotlin. The original idea was to make a language that was simple to pick up for beginners
however I have just been implementing features for fun. The plan right now is to get this targeting the JVM.
Another goal of this project is to try out a few idioms. You may have noticed the build passing tag. Every commit to
this project is run through Travis CI and passed through a suite of unit tests. I also just wanted to learn Kotlin.
# Road Map
- Desired syntax and semantics
- Code blocks - Done
- Variables and assignment - Done
- Expressions - Done
- If statements - Done
- While loops - Done
- Input and output - Done
- Function calls - Done
- Variable types (decimal, character?) - Done
- Lists - Done
- Foreach over lists
- List API to find size, remove first, append lists together etc.
- Length - Done
- First
- Last
- Remove
- Append
- Make lists indexed by strings and other variables as well
- Allow functions to return nothing. Detect all code paths return the same value. - Started (naive implementation)
- Static type checking - Done
- Anonymous functions - Done
- Interpretation
- jar command line interpreter - Done
- Javascript interpreter - Done
- Compilation
- JVM
- Features to consider
- Target LLVM IR (and as a result all the platforms LLVM targets)
- Figure out how to work with LLVM garbage collectors
- Dead variable analysis
- Unreachable code analysis
- Constant propagation and expression simplifications
- Function inlining
# Syntax/Grammar
The syntax changes every time I have a cool idea. I keep a formal definition in the file "grammar" however I forget to
update this sometimes. I usually keep a working example on [my website](http://jon-poole.uk/try-gusto).