/lang

This project provides a CLI and GUI interface to the Standard Lang implementation of the Lang Programming Language

Primary LanguageJavaMIT LicenseMIT

The Lang Programming Language

This project provides a CLI and GUI interface to the Standard Lang implementation of the Lang Programming Language

Features

Uses the Lang interpreter reference implementation with support for Native Modules and Native Functions

Lang CLI

You can execute lang files with the Lang CLI.

Lang Shell (REPL)

The Lang Shell is a REPL shell with many features to aid you during development.
Features:

  • Syntax highlighting
  • Code autocompletion
  • Function help popup
  • Command history
  • Loading and saving of lang files
  • Additional debug functions (like func.printDebug())
  • 4k font size support

Combinator functions

One of the main feature of this programming language is the combinator function system. You can use more than 100 predefined combinator functions. Combinator functions can be created by partially calling and combining combinator functions

Lang Modules

Lang Modules can be used to put common code into one library which can be re-used easily. Here is a list of all existing modules for lang:

  • The Lang Example Native Module is a reference implementation of a Lang native module. It can be used as a base for creating new modules.
  • The Lang IO Module is a Lang native module providing basic IO operations for files.

Native Lang Modules

Lang modules can contain native code (In the standard Lang implementation native code is Java code). In the Lang Example Native Module repository a build script can be found in order to create modules containing nativ code easily.

Docs and examples

Language definitions: See the Lang docs repository for details: Lang Docs and checkout the .lang files located in /assets/
Language Tutorial: You can find many tutorial Lang files in /assets/tuts/.
Language code examples: Some examples are in /assets/examples/, many more are on Rosetta Code.

"TermIO-Control" window commands

Execution of Lang file: Type "executeLang -Path to .lang file" in the white text input in the "TermIO-Control" window
LangShell (REPL): Type "startShell" in the white text input in the "TermIO-Control" window
Print AST tree: Type "printAST -Path to .lang file" for parsing a Lang file and printing the parsed AST tree
4K-Support: Type "toggle4k" for a larger font in the "TermIO-Control" window and the "LangShell" window

"TermIO-Control" window commands from terminal/console

You can also run "java -jar Lang.jar -command args" in a terminal or console.
If "-e CODE" is used in Linux single quotes should be used for the CODE argument to prevent the shell from parsing $-shell variables and to enable multiline code execution (e.g. "java -jar Lang.jar -e '$a = test
func.println($a)')
You can use the "-log" argument to enable log file logging

Building from source

  • This project uses the latest version (= latest commit) of the Lang Interpreter Project and of the Lang Platform API Swing Project
  • If a breaking change is introduced in the lang-interpreter this project will most likely not compile with the latest released lang-interpreter version
    • In that case you should check out the Building from source section of the lang-interpreter project
    • This project is already setup to use a locally built version of the lang-interpreter if it is newer than the latest release of the lang-interpreter
  • If a breaking change is introduced in the lang-platform-api-swing you should publish the lang platform API to maven locally (See the Building from source section)