Giter VIP home page Giter VIP logo

clifter_programming_language's Introduction

clifter programming language

license python codequality build

my programming language written with python

running

python shell.py

information

CLF_INT			= 'INT'             #int
CLF_FLOAT    	= 'FLOAT'           #float
CLF_IDENTIFIER	= 'IDENTIFIER'      #identifier variable
CLF_STRING       = 'STRING'          #string
CLF_KEYWORD		= 'KEYWORD'         #keyword 'and' 'or' 'fun' 'var'
CLF_PLUS     	= 'PLUS'            #plus operator
CLF_MINUS    	= 'MINUS'           #minus operator
CLF_MUL      	= 'MUL'             #multiple
CLF_DIV      	= 'DIV'             #divide
CLF_POW			= 'POW'             #power number
CLF_EQ			= 'EQ'              #equal 
CLF_LPAREN   	= 'LPAREN'          # (
CLF_RPAREN   	= 'RPAREN'          # )
CLF_EE			= 'EE'              # equal
CLF_NE			= 'NE'              # not equal
CLF_LT			= 'LT'              # less than
CLF_GT			= 'GT'              # greater than
CLF_LTE			= 'LTE'             # less than equal
CLF_GTE			= 'GTE'             # greater than equal

example

variable

>> var number = 2
>>2
>>number + 2
>>4

logical operation

>>var mynum = 1
>>for i = 1 to 6 then var result = result * i
>>result
>>120
>>if mynum == 1 then mynum + 123
>>124

function

>>fun multiple(a, b) -> a * b
<function multiple>
>>multiple(5, 5)
25

string

>>"hello world"
"hello world"
>>fun greetings(name) -> "hello " + name
>>greetings("jole")
"hello jole"
>>var name = "arfy"
>>var name2 = "slowy"
>>"hello " + name + " "+name2
"hello arfy slowy"

list

>> var list1 = [1,2,3,4]
>> list1
[1,2,3,4]
>> list1 + 5
[1,2,3,4,5]
>>list1 * [6,7,8]
[1,2,3,4,5,6,7,8]
>>list1/2
3
>>list1/0
1
>>for i = 1 to 5 then 5 ^ i
[5,25,125,625]

multi line statement

clifter 1.0.0[February - 28 - 2021] 
on ----- [Python ------]
[]>1+2;3+4;5+6;
[3, 7, 11]
[]>var multi = if 5 == 5 then "yuhuuuuu" else "nooooo"
"yuhuuuuu"
[]>multi
"yuhuuuuu"
[]>

running script

[]>run("hello_world.clf")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.