JurjenLang, an interpreted programming language

Overview

JurjenLang

An interpreted 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...
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

password-generator Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Password generator

🚀 emojimash 🚀 is a programming language with ALL THE EMOJI

🚀 emojimash 🚀 is a programming language with ALL THE EMOJI

Nook is a simple, concatenative programming language written in Python.

Nook Nook is a simple, concatenative programming language written in Python. Status Nook is currently WIP. It lacks a lot of basic feature, and will n

A programming language that for tech savvy graphic designers

Microsoft Hackathon - PhoTex Idea A programming language that allows tech savvy graphic designers develop scalable vector graphics using plain text co

Python most simple|stupid programming language (MSPL)
Python most simple|stupid programming language (MSPL)

Most Simple|Stupid Programming language. (MSPL) Stack - Based programming language "written in Python" Features: Interpretate code (Run). Generate gra

a simple functional programming language compiler written in python

Functional Programming Language A compiler for my small functional language. Written in python with SLY lexer/parser generator library. Requirements p

Sodium is a general purpose programming language which is instruction-oriented
Sodium is a general purpose programming language which is instruction-oriented

Sodium is a general purpose programming language which is instruction-oriented (a new programming concept that we are developing and devising)

Plock : A stack based programming language

Plock : A stack based programming language

Eros is an expiremental programming language built using simple Python code.

Eros is an expiremental programming language built using simple Python code. Featuring an easy syntax and unique features like type slicing, the language remains an expirement that grows in down time.

Owner
JVerbruggen
Jurjen
JVerbruggen
Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Advent Of Code 2021 - Python English Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels th

Coral Izquierdo Muñiz 2 Jan 9, 2022
Rick Astley Language is a rick roll oriented, dynamic, strong, esoteric programming language.

Rick Roll Language / Rick Astley Language A rick roll oriented, dynamic, strong, esoteric programming language. Prolegomenon The reasons that I made t

Rick Roll Programming Language 658 Jan 9, 2023
PyGo custom language, New but similar language programming

New but similar language programming. Now we are capable to program in a very similar language to Python but at the same time get the efficiency of Go.

Fernando Perez 4 Nov 19, 2022
Short, introductory guide for the Python programming language

100 Page Python Intro This book is a short, introductory guide for the Python programming language.

Sundeep Agarwal 185 Dec 26, 2022
sawa (ꦱꦮ) is an open source programming language, an interpreter to be precise, where you can write python code using javanese character.

ꦱꦮ sawa (ꦱꦮ) is an open source programming language, an interpreter to be precise, where you can write python code using javanese character. sawa iku

Rony Lantip 307 Jan 7, 2023
The Zig programming language, packaged for PyPI

Zig PyPI distribution This repository contains the script used to repackage the releases of the Zig programming language as Python binary wheels. This

Zig Programming Language 100 Nov 4, 2022
The Official interpreter for the Pix programming language.

The official interpreter for the Pix programming language. Pix Pix is a programming language dedicated to readable syntax and usability Q) Is Pix the

Pix 6 Sep 25, 2022
A topology optimization framework written in Taichi programming language, which is embedded in Python.

Taichi TopOpt (Under Active Development) Intro A topology optimization framework written in Taichi programming language, which is embedded in Python.

Li Zhehao 41 Nov 17, 2022
An esoteric programming language that supports concurrency, regex, and web requests.

The Hofstadter Esoteric Programming Language Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's La

Austin Henley 19 Dec 27, 2022
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

guess-the-numbers Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Number guessing game

Amir Hussein Sharifnezhad 5 Oct 9, 2021