Yet Another Interpreted Language
See fork https://github.com/grininja/emojilang to find the emoji version of this.
pip install -r requirements.txt| Operation | Symbol |
|---|---|
| unary not | not ! |
| unary complement | ~ |
| bitwise and | & |
| bitwise or | | |
| bitwise xor | ^ xor |
| bitwise complement | ~ |
| logical and | and && |
| logical or | or || |
| logical not | not ! |
| logical xor | xor ^ |
Operators With Highest Priority On Top
| Description | Operators |
|---|---|
| unary oprators | not, !, ~ |
| arithmatic | *, /, % |
| arithmatic | +, - |
| comparison | ==, !=, <=, <, >, => *Python's Precedence |
| bitwise and | & |
| bitwise xor | ^, xor |
| bitwise or | | |
| logical and | and, && |
| logical or | or, || |
decl a
decl b=5, c, d=6
decl e=5+c*4
decl t = true, f
a = 3
b = (c*4)+5 / d
f = false
while(a <= 5*b){
#this is how you use comments
#statements
}
while(){
#infinite looop
}
for(decl i=0, j=7, k; i < a*5; i = i+1, b=b*(28 +)){
#declared i, j, k and assigned values to i and j
#statements
}
for( ; ; ){
#all three statements can be skipped
}
if(a == 5){
#statements
}
elif(a<5){
#statements
}
elif(a>5 || a&b|c){
#statements
}
else{
#statements
}
#INVALID
if(a==5)
print(a)
#VALID
if(a==5){
print(a)
}
#similarly for other blocks like for and while