JurjenLang, an interpreted programming language

Overview

JurjenLang

An untyped interpreted functional programming language



Getting started

Follow these three steps on your computer to get started

  1. git clone https://github.com/JVerbruggen/JurjenLang.git
  2. py -m pip install antlr4-python3-runtime
  3. start input.bat or py project.py .\input.jur

The repository includes a java folder, which is exclusively used for the antlr4 testrig. I wont be implementing any logic there.

Making changes

If you made changes to the language or anything else, and the python files (and java classes for testrig) have to be regenerated, use the following steps:

  1. Make sure you are in the root folder of the repository
  2. Install ANTLR4 on windows
  3. start .\generate_python.bat should renew all files

Testrig

To use the antlr4 testrig (which generates a parse tree), use the following tutorial:

  1. Renew java files start .\generate_java.bat
  2. Navigate to the java/ file cd java
  3. start .\testrig.bat should open a command window and eventually open up the testrig

Language Specifications

Declare a variable

somevariable = 3
another = .2f
thirdvar = "some random text"
fourthboolean = true

Currently, only four types are allowed; integer, float, string and boolean. Why would you ever want more? ...Right?

Define a function

func myfunction a b{
  return a + b
}

result = myfunction(1,2)    # will be 3

In JurjenLang, variables have no type definition or hinting. This can either make your life easy or difficult, depending on who you ask. Either way, I don't really care.

Pass function as a parameter

func printstringone {
    print "one"
}

func printstringtwo {
    print "two"
}

func printspec printfunction {
    printfunction()
}

printspec(printstringone)     # prints 'one'
printspec(printstringtwo)     # prints 'one'

In JurjenLang, you can pass a reference to a function as a parameter. This reference can then be executed as if it is a function itself.

Expressions

a = 2
b = 3

thisbooleanwillbefalse = a == b
thisbooleanwillbetrue = a != b
thisonewillalsobetrue = a < b

JurjenLang supports a couple of expression operators; <, <=, >, >=, ==, !=

Boolean expressions

thiswillbetrue = true and true
thiswillbetrue = true or false
thiswillbefalse = not true

JurjenLang supports three boolean expressions; and, or, not

Numerical operators

a = 3 * 4     # multiplication
b = 12 / 3    # division
c = 5!        # factorial
d = 5 + 4 - 1 # addition and subtraction
e = 2^6       # pow

JurjenLang supports the numerical operators that can be seen above.

Output

print "i like to print stuff"
print 3*2

In JurjenLang you can print all variables.

Dangerous feature that I won't remove because its kind of useful but also the reason why this language should never be used in production

printscope

In JurjenLang you can print all variables on the scope with the printscope keyword

String multiplication (useless but fun feature)

mystring = "wohoo"*2
reversed = mystring*-2

print mystring          # Will be "wohoowohoo"
print reversed          # Will be "oohowoohowoohowoohow"

In JurjenLang you can multiply strings by an integer, both positive and negative.

You might also like...

Unofficial community-built app for the Japanese language learning tool jpdb.io.

jpdb-android Unofficial community-built app for the Japanese language learning tool jpdb.io. While the web app works in most scenarios, the goal with

Feb 15, 2022

A list of direct references to classes and interfaces in the Java Language Specification (3d Ed.)

A list of direct references to classes and interfaces in the Java Language Specification (3d Ed.) and a program to compute the indirectly required classes and interfaces

Jun 3, 2022

A dubbo gateway based Java language.

A dubbo gateway based Java language.

Sep 24, 2022

Compiler that compiles our language flowg to g-code (4th semester project)

flowg FlowG is a language that greatly simplifies manual g-code programming. It is a high-level language that supports functions, for loops, if statem

Jun 15, 2022

Java Compiler for the MiniJava language

Java Compiler for the MiniJava language Setup Our project requires the following tools with the specified versions. Tool Version Java = 14 Maven 3 Th

Dec 5, 2022

Code4Me provides automatic intelligent code completion based on large pre-trained language models

Code4Me Code4Me provides automatic intelligent code completion based on large pre-trained language models. Code4Me predicts statement (line) completio

Dec 5, 2022

Scripting language written in, and, designed to communicate with, java

Scripting language written in, and, designed to communicate with, java

mi-lang Scripting language designed to communicate with java, to allow for easy plugins, addons, etc in any project, all without having to create an e

Dec 17, 2022

Official Java library for the DeepL language translation API.

DeepL Java Library The DeepL API is a language translation API that allows other computer programs to send texts and documents to DeepL's servers and

Dec 29, 2022

tuya-spring-boot-starter helps you efficiently create cloud development projects regarding the OpenAPI or message subscription capabilities. You can put all the focus on business logic without taking care of server-side programming nor relational databases.

English | 中文版 tuya-spring-boot-starter helps you efficiently create cloud development projects regarding the OpenAPI or message subscription capabilit

Dec 26, 2022
Owner
JVerbruggen
Jurjen
JVerbruggen
lazy-language-loader improves loading times when changing your language by only reloading the language instead of all the game resources!

lazy-language-loader lazy-language-loader improves loading times when changing your language by only reloading the language instead of all the game re

Shalom Ademuwagun 7 Sep 7, 2022
For Jack language. Most of codes were commented with their usage, which can be useful for beginner to realize the running principle of a compiler for object-oriented programming language.

Instructions: Download the Java source codes Store these codes into a local folder and open this folder Click the right key of mouse and click ‘Open i

gooooooood 1.1k Jan 5, 2023
Jamal is a macro language (JAmal MAcro Language)

Jamal Macro Language Jamal is a complex text processor with a wide variety of possible use. The first version of Jamal was developed 20 years ago in P

Peter Verhas 29 Dec 20, 2022
Very spicy additions to the Java programming language.

Project Lombok Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java. Never write another g

Project Lombok 11.7k Dec 30, 2022
Create different patterns and designs using your favorite programming language for this project.

Patterns project for Hacktoberfest Create different patterns and designs using your favourite programming language weather it be a square pattern, sta

Pulkit Handa 5 Oct 5, 2022
Programming Services and Processes - 04 Secure Programming Techniques

Programación de Servicios y Procesos - 04 Técnicas de Programación Segura Tema 04. Técnicas de Programación segura. Curso 2021/2022. Contenidos Introd

José Luis González Sánchez 5 Dec 27, 2022
Java-Programs---For-Practice is one of the Java Programming Practice Series By Shaikh Minhaj ( minhaj-313 ). This Series will help you to level up your Programming Skills. This Java Programs are very much helpful for Beginners.

Java-Programs---For-Practice is one of the Java Programming Practice Series By Shaikh Minhaj ( minhaj-313 ). This Series will help you to level up your Programming Skills. This Java Programs are very much helpful for Beginners. If You Have any doubt or query you can ask me here or you can also ask me on My LinkedIn Profile

Shaikh Minhaj 3 Nov 8, 2022
Representational State Transfer + Structured Query Language(RSQL): Demo application using RSQL parser to filter records based on provided condition(s)

Representational State Transfer + Structured Query Language: RSQL Demo application using RSQL parser to filter records based on provided condition(s)

Hardik Singh Behl 9 Nov 23, 2022
MFP (Mathematic language For Parallel computing) Android library

MFPAndroLib This is MFP (Mathematic language For Parallel computing) Android library project. MFP is a novel scripting programming language designed a

Tony Cui 6 Sep 5, 2022
Metremenqeemi - Android/iOS app to teach the Coptic Language

ⲙⲉⲧⲣⲉⲙⲛ̀ⲭⲏⲙⲓ The Open Source Android/iOS app to learn how to read and understand the Coptic Language Join our Discord Channel About the Curriculum The

Mark Yacoub 8 Aug 30, 2022