Skip to content

grininja/emojilang

Β 
Β 

Repository files navigation

emojilang

Programming language where you can code using emojis 😌

To execute

First make sure you have python(version 3.x) and pip installed

First clone it

    #First Clone It
    git clone https://github.com/grininja/emojilang.git emojilang
    #Navigate into the directory
    cd emojilang
    #Install the requirements
    pip install -r requirements.txt

Then execute your source file

    python main.py <Your File Path>
    # for example
    python main.py /tests/firstPrimes.emo

Or

    python3 main.py /tests/firstPrimes.emo

Syntax

emoji Semantic
βœ–, βž•, βž–, βž—, πŸ“Ž *, +, -, / ,%
πŸ’Ώ, πŸ“€ while, for
🚩, 🏁, 🏳 if, else, elif
⏸, ⏩ break, continue
😌, 😌😌, 😁, 😭, 😁😌, 😭😌, β—πŸ˜Œ =, ==, >, <, >=, <=, !=
βš›, ☯, βš“, γ€° (bitwise) &, |, ^, ~
😠, πŸ˜‡, ❗ (logical) and, or, not
πŸ’© (comments starts with 'πŸ’©') //, # (comments)
πŸ“’ declare variable
πŸ–¨ print() (print to console)
πŸ‘‰, πŸ‘ˆ (, )
🍽, πŸ₯‚ {, }
πŸ—Ώ ,
πŸ‘„ ;
βœ”, ❌ true, false

Sample Codes

Variable Declaration

    πŸ“’ a πŸ’© declares the valriable a
    πŸ“’ b 😌 5πŸ—Ώ cπŸ—Ώ d 😌 6 πŸ’© declares a, c, d and assigns them 5, None, 6 respectively 
    πŸ“’ e 😌 5βž•cβœ–4 πŸ’© equivalent to decl e = 5+c*4
    πŸ“’ t 😌 βœ”πŸ—Ώ f πŸ’© decl t = true, f

πŸ‘‰, πŸ‘ˆ

Assignments

    a 😌 3
    b 😌 πŸ‘‰cβœ–4πŸ‘ˆβž•5 βž— d
    f 😌 ❌
    πŸ’© Equivalent to
    πŸ’© a = 3
    πŸ’© b = (c*4) + 5 / d
    πŸ’© f = false

Fibonacci Series

    πŸ“’ f0 😌 0 πŸ—Ώ f1 😌 1
    πŸ“’ i 😌 0
    πŸ’ΏπŸ‘‰i 😭 10πŸ‘ˆπŸ½
        πŸ–¨πŸ‘‰f0πŸ‘ˆ
        πŸ“’ tmp 😌 f0
        f0 😌 f1
        f1 😌 f1 βž• tmp
        i 😌 i βž• 1
    πŸ₯‚

πŸ’© Equivalent to
πŸ’© decl f0 = 0, f1 = 1
πŸ’© i = 0
πŸ’© while(i < 10){
πŸ’©    print(f0)
πŸ’©    decl tmp = f0
πŸ’©    f0 = f1
πŸ’©    f1 = f1 + tmp
πŸ’©    i = i + 1
πŸ’© }

Prime Numbers

    πŸ“’ start 😌 2 πŸ—Ώ end 😌 100
    πŸ“€πŸ‘‰πŸ“’ n😌startπŸ‘„n😭😌endπŸ‘„ n 😌 nβž•1πŸ‘ˆπŸ½
        πŸ“’ flag 😌 βœ”
        πŸ“€πŸ‘‰πŸ“’ i😌nβž–1πŸ‘„ i 😁 1πŸ‘„ i 😌 i βž– 1πŸ‘ˆπŸ½
            πŸš©πŸ‘‰n πŸ“Ž i 😌😌 0πŸ‘ˆπŸ½
                flag 😌 ❌
                ⏸
            πŸ₯‚
        πŸ₯‚
        πŸš©πŸ‘‰flagπŸ‘ˆπŸ½
            πŸ–¨πŸ‘‰nπŸ‘ˆ
        πŸ₯‚
    πŸ₯‚

πŸ’©Equivalent to
πŸ’©decl start = 2, end = 100
πŸ’©for(decl n = start; n <= end; n = n+1){
πŸ’©  flag = true 
πŸ’©  for(decl i = n-1; i > 1; i = i - 1){
πŸ’©      if(n%i == 0){
πŸ’©           flag = false
πŸ’©      }
πŸ’©  }   
πŸ’©  if(flag){
πŸ’©      print(n)
πŸ’©  }
πŸ’©}

NOTE: The original repository is where we will add new features to the base language(YAIL) this repo is for emoji extension(EMOJILANG).

About

Programming language where you can code using emojis 😌

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%