https://github.com/felixklauke/slug-java
Java implementation of a simple proof of concept interpreted programming language SLUG (Simple Language).
https://github.com/felixklauke/slug-java
interpreted-programming-language interpreter java language lexer own-language
Last synced: 2 months ago
JSON representation
Java implementation of a simple proof of concept interpreted programming language SLUG (Simple Language).
- Host: GitHub
- URL: https://github.com/felixklauke/slug-java
- Owner: felixklauke
- License: apache-2.0
- Created: 2018-02-11T08:15:52.000Z (over 7 years ago)
- Default Branch: dev
- Last Pushed: 2023-04-20T05:04:04.000Z (about 2 years ago)
- Last Synced: 2025-03-18T17:14:41.321Z (2 months ago)
- Topics: interpreted-programming-language, interpreter, java, language, lexer, own-language
- Language: Java
- Homepage:
- Size: 288 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# slug-java
Java implementation of my interpreted programming language SLUG (Simple Language).The language is currently under heavy development and syntax and other language related things may change.
Feature and bug-fix requests are welcome.
# Build Status
| | Build Status | Test Code Coverage |
|------------- |----------------------------------------------------------------------------------------------------------------------------------------------------------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Master | [](https://travis-ci.org/FelixKlauke/slug-java) | [](https://codecov.io/gh/FelixKlauke/slug-java) |
| Development | [](https://travis-ci.org/FelixKlauke/slug-java) | [](https://codecov.io/gh/FelixKlauke/slug-java) |# Features
- [X] Basic structure
- [X] Functions
- [X] Variables (int, string, bool)
- [X] Scopes
- [X] Boolean expression (myInt == otherInt, "test" == "test", 4 > 3)
- [X] Conditionals (if, for, while)
- [X] Internal functions (WriteLine, ReadLine, Random, etc.)
- [X] Function calls
- [X] Function parameters
- [ ] Default values for parameters
- [ ] Classes
- [ ] New instance creation
- [ ] Member variables
- [ ] Auto member variable constructor
- [X] Inline string variables (string s = "Hello $myOtherString", WriteLine("Your rank is $rank with a score of $score"))
- [ ] Inline string expression evaluation (string s = "Number is ${2 + 9}")# Example GuessIt game
The GuessIt game is a simple CLI game where the user needs to guess a random generated number from 1-100. If the guessed number is too small, the game prints that and the other way around until the correct number has been found.

# TDD (Test Driven Development)
The goal is to get as near as possible to a 100% test coverage and to test every feature while it is being developed.
### License
Licensed under the Apache License, Version 2.0.