All Projects → Sreyas-Sreelal → malluscript

Sreyas-Sreelal / malluscript

Licence: GPL-3.0 license
A simple,gentle,humble scripting language for mallus, based on malayalam memes.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to malluscript

Mico
Mico ("Monkey" in catalan). Monkey language implementation done with C++. https://interpreterbook.com/
Stars: ✭ 19 (-83.04%)
Mutual labels:  interpreter, repl, lexer
charm
A [ functional stack ] based language.
Stars: ✭ 26 (-76.79%)
Mutual labels:  interpreter, repl
fundot
The Fundot programming language.
Stars: ✭ 15 (-86.61%)
Mutual labels:  interpreter, repl
endbasic
BASIC environment with a REPL, a web interface, a graphical console, and RPi support written in Rust
Stars: ✭ 220 (+96.43%)
Mutual labels:  interpreter, repl
Mond
A scripting language for .NET Core
Stars: ✭ 237 (+111.61%)
Mutual labels:  interpreter, repl
Go Pry
An interactive REPL for Go that allows you to drop into your code at any point.
Stars: ✭ 2,747 (+2352.68%)
Mutual labels:  interpreter, repl
monkey
The Monkey Programming Language & Interpreter written in PHP.
Stars: ✭ 21 (-81.25%)
Mutual labels:  interpreter, lexer
Monkey Rust
An interpreter for the Monkey programming language written in Rust
Stars: ✭ 174 (+55.36%)
Mutual labels:  interpreter, lexer
klisp
A Lisp written in about 200 lines of Ink, featuring an interactive literate programming notebook
Stars: ✭ 28 (-75%)
Mutual labels:  interpreter, repl
consize
Consize is a concatenative programming language
Stars: ✭ 27 (-75.89%)
Mutual labels:  programming, interpreter
ol
Otus Lisp (Ol in short) is a purely* functional dialect of Lisp.
Stars: ✭ 157 (+40.18%)
Mutual labels:  interpreter, repl
Codi.vim
📔 The interactive scratchpad for hackers.
Stars: ✭ 2,464 (+2100%)
Mutual labels:  interpreter, repl
Cub
The Cub Programming Language
Stars: ✭ 198 (+76.79%)
Mutual labels:  interpreter, lexer
danube
The Danube Programming Language
Stars: ✭ 33 (-70.54%)
Mutual labels:  programming, interpreter
Charly
🐈 The Charly Programming Language | Written by @KCreate
Stars: ✭ 185 (+65.18%)
Mutual labels:  interpreter, repl
types-and-programming-languages
C++ Implementations of programming languages and type systems studied in "Types and Programming Languages" by Benjamin C. Pierce..
Stars: ✭ 32 (-71.43%)
Mutual labels:  interpreter, lexer
lambda
lambda calculus interpreter
Stars: ✭ 23 (-79.46%)
Mutual labels:  interpreter, repl
Janet
A dynamic language and bytecode vm
Stars: ✭ 2,216 (+1878.57%)
Mutual labels:  interpreter, repl
Lioness
The Lioness Programming Language
Stars: ✭ 155 (+38.39%)
Mutual labels:  interpreter, lexer
Own-Programming-Language-Tutorial
Репозиторий курса "Как создать свой язык программирования"
Stars: ✭ 95 (-15.18%)
Mutual labels:  interpreter, lexer

Mallu Script

Malluscript
GitHub Actions status GitHub pull requests GitHub issues GitHub issues

Malluscript is an esoteric scripting language based on manglish and malayalam memes. The language uses trending Malayalam memetic words as keywords. The language is not strictly type-safe and uses only two datatypes strings and integers. Currently, malluscript is on the development phase and undergoing vigorous changes. Always check the release section for pre-built binaries for the interpreter.

Installation

Either download precompiled binaries from release page or clone this repository

git clone https://github.com/sreyas-sreelal/malluscript.git

Building

The interpreter can be compiled as follows

cd malluscript
cargo build --release

Note: You require rust compiler installed on your machine in order to compile the interpreter

Executing malluscript programs

Malluscript can be used in two ways

Interactive shell

To start the interactive shell, just run following in the terminal

./malluscript

Something like this would come

Mallu Script Version 0.1.0
>> 

Here you can start writing your malluscript codes on the way!

Run malluscript program files

Write the code in the file with .ms extension and execute it as follows

./malluscript file_name.ms

Language Syntax And Grammar

Basic arithmetic operations can be done using +,-,*,/,% (modulo). Every expression ends with ;. { and } introduces a new block like c like languages. Every keyword has alternate ones too, each with different dialects and also in Malayalam unicodes.

Basic I/O operations

  • Printing or writing to console is done as follows

    dhe_pidicho "hello world";
    dhe_pidicho variable;
    dhe_pidicho "Onnum randum kottiyal " + 1+2 + " aane"; 
    • Alternate Keywords
      • ദേ_പിടിച്ചോ
  • In order to get keyboard input from the user

    For integer inputs

    variable = number_thada;
    
    • Alternate Keywords
      • നമ്പർ_താടാ

    For string inputs

    variable = address_thada;
    
    • Alternate Keywords
      • അഡ്രസ്_താടാ

Datatypes and Storage

Malluscript is not strictly type-safe.The language, currently, supports only integers and string literals as datatypes.

In order to declare a variable

pwoli_sadhanam variable_name
  • Alternate Keywords
    • pwoli_sanam
    • pwoli_saanam
    • poli_sadhanam
    • poli_sanam
    • poli_saanam
    • പൊളിസാധനം

To assign it some value

variable_name = 1;
second_var = "ente string";

Conditional Statements And Expressions

The conditional expression has the following syntax

seriyano i um 0 um same_aane {

} seri_allel {

}

The above snippet checks whether i equal to 0 and if yes the code in the first block will execute otherwise block defined by seri_allel will get executed.

In general

  • i um 0 um same_aane checks if i is equals to 0

  • i um 0 um same_alle checks if i not equals to 0

  • i nekal 0 cheruthane checks if 0 is less than i

  • i nekal 0 veluthane checks if 0 is greater than i

    • Alternate Keywords
      • seriyano
        • seriyano_mwone
        • seriyano
        • ശെരിയാണോ_മോനെ
      • cheruthane
        • cheruthanenkil
        • cheruthanekil
        • charuthane
        • charuthanenkil
        • charuthanekil
        • ചെറുതാണെകിൽ
        • ചെറുതാണെങ്കിൽ
      • same_aane
        • സെയിം_ആണേ
      • um
        • ഉം
      • ne_kal
        • നെകാൾ
      • veluthane
        • veluthanenkil
        • veluthanekil
        • valuthanenkil
        • valuthanekil
        • valuthane
        • വലുതാണെ
        • വലുതാണെങ്കിൽ
        • വലുതാണെകിൽ
      • cheruthane
        • cheruthane
        • cheruthanenkil
        • cheruthanekil
        • charuthane
        • charuthanenkil
        • charuthanekil
        • ചെറുതാണെകിൽ
        • ചെറുതാണെങ്കിൽ

Iterative Statements Or Loops

The loops in malluscript look as follows

repeat_adi 0 nekal i veluthane {
  i = i-1;
}
  • Alternative Keywords
    • റിപീറ്റടി

Functions

The functions definition in malluscript are defined as follows.

ente_function(variable1,variable2) {
  dhe_pidicho variable1 + variable2;
}

The functions can also return values.

factorial(n) {
    seriyano n um 0 um same_aane {
        koduthek 1;   
    }
    koduthek n * factorial<n-1>;
}
  • Alterative keywords for koduthek
    • കൊടുത്തേക്
    • കൊടുത്തെക്

To call a function function name followed by angle brackets are used.

my_function<arg1,arg2>;

Example

A simple program to find factorial in malluscript would be

pwoli_sadhanam num;
pwoli_sadhanam factorial;
dhe_pidicho "Input number:";
num = number_thada;
factorial = 1;

repeat_adi 0 um num um same_alle {
    factorial = factorial * num;
    num = num -1;
}

dhe_pidicho "Factoral is : " + factorial + "\n";

Same in pure Malayalam would be

പൊളിസാധനം നമ്പർ;
പൊളിസാധനം ഫാക്ടോറിയൽ;
ദേ_പിടിച്ചോ "ദയവായി നമ്പർ തരുക: ";
നമ്പർ = number_thada;
ഫാക്ടോറിയൽ = 1;

റിപീറ്റടി 0 ഉം നമ്പർ ഉം സെയിം_അല്ല {
    ഫാക്ടോറിയൽ = ഫാക്ടോറിയൽ * നമ്പർ;
    നമ്പർ = നമ്പർ -1;
}

ദേ_പിടിച്ചോ "ഫാക്ടോറിയൽ : " + ഫാക്ടോറിയൽ + "\n";

More examples can be found in examples

Notes

The language as mentioned above is under the development phase and its structure can change overnight, suddenly. This language is not meant to disrespect anyone and wrote just for fun.

Any kind of contribution is always welcome. If you have any ideas or improvements to provide for this project open a pull request or if you have any difficulties using this language open an issue :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].