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.

Owner
JVerbruggen
Jurjen
JVerbruggen
Lectures for Udemy - Complete Python Bootcamp Course

Complete-Python-Bootcamp Welcome to the Repository for the Complete Python Bootcamp! This is the Repository for the Udemy course - "Complete Python Bo

Marci 2k Dec 28, 2022
Pylexa - Artificial Assistant made with Python

Pylexa - Artificial Assistant made with Python Alexa is a famous artificial assistant used massively across the world. It is a substitute of Alexa whi

\_PROTIK_/ 4 Nov 03, 2021
Python version of RocketLeague-Dropshot-Calculated-shot

Python version of RocketLeague-Dropshot-Calculated-shot. This is just to demo around and a tool I used to develop the actual plugin.

JareBear 1 Jan 14, 2022
The dynamic code loading framework used in LocalStack

localstack-plugin-loader localstack-plugin-loader is the dynamic code loading framework used in LocalStack. Install pip install localstack-plugin-load

LocalStack 5 Oct 09, 2022
Programmatic interface to Synapse services for Python

A Python client for Sage Bionetworks' Synapse, a collaborative, open-source research platform that allows teams to share data, track analyses, and collaborate

Sage Bionetworks 54 Dec 23, 2022
A simple script written using symbolic python that takes as input a desired metric and automatically calculates and outputs the Christoffel Pseudo-Tensor, Riemann Curvature Tensor, Ricci Tensor, Scalar Curvature and the Kretschmann Scalar

A simple script written using symbolic python that takes as input a desired metric and automatically calculates and outputs the Christoffel Pseudo-Tensor, Riemann Curvature Tensor, Ricci Tensor, Scal

2 Nov 27, 2021
Object-oriented programming exercise session held in Petnica.

OOP vežba ⚠️ The code in this repo is used for a OOP practice session held in Petnica. All instructions in the README file are written in Serbian. Ops

Pavle Ćirić 1 Jan 30, 2022
NeoInterface - Neo4j made easy for Python programmers!

Neointerface - Neo4j made easy for Python programmers! A Python interface to use the Neo4j graph database, and simplify its use. class NeoInterface: C

15 Dec 15, 2022
Advanced Developing of Python Apps Final Exercise

Advanced-Developing-of-Python-Apps-Final-Exercise This is an exercise that I did for a python advanced learning course. The exercise is divided into t

Alejandro Méndez Fernández 1 Dec 04, 2021
Script para generar automatización de registro de formularios IEEH

Formularios_IEEH Script para generar automatización de registro de formularios IEEH Corresponde a un conjunto de script en python que permiten la auto

vhevia11 1 Jan 06, 2022
This is a calculator of strike price distance for options.

Calculator-of-strike-price-distance-for-options This is a calculator of strike price distance for options. Options are a type of derivative. One strat

André Luís Lopes da Silva 4 Dec 30, 2022
A webapp for taking fast notes, designed for business, school, and collaboration with groups.

JOTS Journal of the Session A webapp for taking fast notes, designed for business, school, and collaboration with groups.

Zebadiah S. Taylor 2 Jun 10, 2022
Create a program for generator Truth Table

Python-Truth-Table-Ver-1.0 Create a program for generator Truth Table in here you have to install truth-table-generator module for python modules inst

JehanKandy 10 Jul 13, 2022
A custom advent of code I am completing

advent-of-code-custom A custom advent of code I am doing in python. The link to the problems I am solving is here: https://github.com/seldoncode/Adven

Rocio PV 2 Dec 11, 2021
Port of the OpenCascade library to JavaScript / WebAssembly using Emscripten

OpenCascade.js A port of the OpenCascade CAD library to JavaScript and WebAssembly via Emscripten. Explore the docs » Examples · Issues · Discuss Proj

Sebastian Alff 347 Jan 08, 2023
A fishing bot script written in Python!

A fishing bot script written in Python!

Anel Drocic 3 Nov 03, 2021
The Ultimate Widevine Content Ripper (KEY Extract + Download + Decrypt) is REBORN

NARROWVINE-REBORN ** UPDATE 21.12.01 ** As expected Google patched its ChromeCDM Whitebox exploit by Satsuoni with a force-update on the ChromeCDM. Th

Vank0n 104 Dec 07, 2022
Open HW & SW for Scanning Electron Microscopes

OpenSEM Project Status: Preliminary The purpose of this project is to create a modern and open-source hardware and software platform for using vintage

Steven Lovegrove 7 Nov 01, 2022
Introduction to Databases Coursework 2 (SQL) - dataset generator

Introduction to Databases Coursework 2 (SQL) - dataset generator This is python script generates a text file with insert queries for the schema.sql fi

Javier Bosch 1 Nov 08, 2021
Python Interactive Graphical System made during Computer Graphics classes (INE5420-2021.1)

PY-IGS - The PYthon Interactive Graphical System The PY-IGS Installation To install this software you will need these dependencies (with their thevelo

Enzo Coelho Albornoz 4 Dec 03, 2021