Skip to main content

Programming Language

Project description

Kagsa Programming Language

Kagsa is an Interpreted programming language written in Python, The language works by going through four stages:

How it Works ?


Kagsa White Bord

  • Lexer : converts codes into data that is easy to translate and consists of a key and a value. Example: ['KEYWORD','var']
  • Syntax Checker : checks the data out of Lexer and detects syntax errors.
  • Parser : translates data out of Lexer into Python code with some errors detecting.
  • Compiler : Runs the final code with a special error compiler that converts Python errors into Kagsa errors.

Usage :

Insalltion :

Downlaod Throw Pip :

pip install kagsa

How to Use it :

Run Your Program :

kagsa file.kg

you can choice importer file : -m import.json

Compile a Library :

kagsa -l libcodes.kg -o output.kgl

you can choice importer file : -m import.json

Check Version :

kagsa -v
or
kagsa --version

Check For Updates :

kagsa -u
or
kagsa --updates

Show Usage :

kagsa -h
or
kagsa --help

Examples :


Hello World Program

write 'Hello World'

Factorial Program

func factorial (num) {
    if num < 0 {
        write 'error'
        return ''
    }elseif num == 0 {
        return 1
    }else{
        var data = 1
        for #i -> nlist(num, zero=false) {
            var data=data * #i;
        }
        return data;
        
    }
}
write factorial(10)

Thanks To :

  • Redmads : Continued support and Help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kagsa-0.1.5.tar.gz (15.2 kB view hashes)

Uploaded Source

Built Distribution

kagsa-0.1.5-py3-none-any.whl (17.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page