CupScript is a simple programing language made with python

Overview

CupScript

CupScript is a simple programming language made with python

It includes some basic functions, variables, loops, and some other built in functionsbut it is not a full language. I made it to learn how programming languages work and how to make a language specifically interpreted languages.

Installation:

git clone https://github.com/Fus3n/cupscript
cd cupscript

there are no requirements, but you will need python 3.6 or higher to run it.

Run Scripts/cupshell:

python3 cup.py or python3 cup.py 
   
    

For Windows:
python cup.py or python cup.py "filename"

run file from cupshell: Run("filename")

   

Syntax

Examples can be found in the the example.cup file

Features

Display

print("Hello World")
# comments

print(1 + 2)
print(1 - 2)
print(1 * 2)
print(1 / 2)
print(1 % 2)
print(1 ^ 2)

var name = gets("Enter your name: ")
print("Hello " + name)

Definitions

0; # yes this is how you get element from list in cup func add(a, b) return a + b end func add_two(a, b) -> a + b + 2 var f = add(a, b) -> a + b f(5, 5) ">
var a = [1, 2, 3]

var b = 5

var c = "Hello World"

var b = b + a>0; # yes this is how you get element from list in cup

func add(a, b)
    return a + b
end

func add_two(a, b) -> a + b + 2

var f = add(a, b) -> a + b 

f(5, 5)

Check example.cup for more information / Full Overview

You might also like...
A C-like hardware description language (HDL) adding high level synthesis(HLS)-like automatic pipelining as a language construct/compiler feature.
A C-like hardware description language (HDL) adding high level synthesis(HLS)-like automatic pipelining as a language construct/compiler feature.

██████╗ ██╗██████╗ ███████╗██╗ ██╗███╗ ██╗███████╗ ██████╗ ██╔══██╗██║██╔══██╗██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝ ██████╔╝██║██████╔╝█

Shell scripts made simple 🐚

zxpy Shell scripts made simple 🐚 Inspired by Google's zx, but made much simpler and more accessible using Python. Rationale Bash is cool, and it's ex

a simple proof system I made to learn math without any mistakes

math_up a simple proof system I made to learn math without any mistakes 0. Short Introduction test yourself, enjoy your math! math_up is an NBG-based,

a simple thing that i made for fun  :trollface:
a simple thing that i made for fun :trollface:

we-do-a-little-trolling about a simple thing that i made for fun. requirements and instructions first you need to install obs , then start the virtual

A simple chatbot that I made for school project
A simple chatbot that I made for school project

Chatbot: Python A simple chatbot that I made for school Project. Tho this chatbot is dumb sometimes, but it's not too bad lol. Check it Out! FAQ How t

Simple cash register system made with guizero

Eje-Casher なにこれ guizeroで作った簡易レジシステムです。実際にコミケで使う予定です。 これを誰かがそのまま使うかどうかというよりは、guiz

A simple calculator made with tkinter.

Simple Calculator A simple calculator made with tkinter. Requirements None, only you need to have windows 😉 ...Enjoy! Installation Clone this reposit

Pixelarticons - Pixel Art Icons made simple for Flutter, powered by pixelarticons and fontify
Pixelarticons - Pixel Art Icons made simple for Flutter, powered by pixelarticons and fontify

Pixelarticons - Pixel Art Icons made simple for Flutter, powered by pixelarticons and fontify

MiniJVM is simple java virtual machine written by python language, it can load class file from file system and run it.

MiniJVM MiniJVM是一款使用python编写的简易JVM,能够从本地加载class文件并且执行绝大多数指令。 支持的功能 1.从本地磁盘加载class并解析 2.支持绝大多数指令集的执行 3.支持虚拟机内存分区以及对象的创建 4.支持方法的调用和参数传递 5.支持静态代码块的初始化 不支

Releases(0.2.2)
  • 0.2.1(Jun 27, 2022)

    Update 0.2.1

    • Added support for module importing and a mock std
    • Added arithmethic += as a syntactic suger will work with any object that overloads plus operation
    • Updated Examples now seperated in folder
    • keyword 'var' is now optional
    • fixed tofloat
    • Change loop syntax changed 'then' to 'do'
    • Change elseif to 'elif'
    Source code(tar.gz)
    Source code(zip)
Owner
FUSEN
Just someone who likes to code
FUSEN
A simple language for new programmers and a toy language ;)

Yell An extremely simple, yet powerful language for new programmers, as well as a toy language ;) Explore the docs » Report Bug · Request Feature Yell

Yell 4 Dec 28, 2021
An almost fully customizable language made in python!

Whython is a project language, the idea of it is that anyone can download and edit the language to make it suitable to what they want.

Julian 47 Nov 5, 2022
This is the Quiz that I made using Python Programming Language. This can only run in the Terminal

This is the Quiz that I made using Python Programming Language. This can only run in the Terminal

YOSHITHA RATHNAYAKE 1 Apr 8, 2022
A Python utility belt containing simple tools, a stdlib like feel, and extra batteries. Hashing, Caching, Timing, Progress, and more made easy!

Ubelt is a small library of robust, tested, documented, and simple functions that extend the Python standard library. It has a flat API that all behav

Jon Crall 638 Dec 13, 2022
Simple calculator made in python

calculator Uma alculadora simples feita em python CMD, PowerShell, Bash ✔️ Início ?? apt-get update apt-get upgrade -y apt-get install python git git

Spyware 8 Dec 28, 2021
PythonCalculator - A simple Calculator made in python using tkinter for GUI

PythonCalculator A simple Calculator made in python using tkinter for GUI. For P

ʀᴇxɪɴᴀᴢᴏʀ 1 Jan 1, 2022
This is a simple analogue clock made with turtle in python...

Analogue-Clock This is a simple analogue clock made with turtle in python... Requirements None, only you need to have windows ?? ...Enjoy! Installatio

Abhyush 3 Jan 14, 2022
Awesome Casino is simple offline casino made on python.

Awesome-Casino Awesome Casino is simple offline casino made on python. I found bug, what can i do? If you find any bug or want to suggest any idea, al

Herman 1 Feb 4, 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