Skip to main content

Programming Language

Project description



English - عربي - русский - 日本語 - 官话
español - हिंदी - italiano

KAGSA Programming Language

KAGSA is a new Interpreted programming language based on Python, the language will be practical and reliable in your projects, take a look at its advantages.

Advantages

  • The Ease

    • Kagsa is considered one of the most easy languages, if you are a programmer will not need more than half an hour to learn it !! :)
  • Allow some forbidden things in programming

    • Kagsa allows many things that other languages prohibit, some of them :
      • Allow some symbols in variable name (@$^~?)
      • Variable name can start with number

Negatives

  • Speed

    • Kagsa is based on Python, so it is a little slower, slow is at the beginning when the program is start.

Kagsa Story

Of course, KAGSA was not KAGSA from the beginning, I was thinking of calling it PlusScript and its file extension was .ps and later changed it to .pscript, when I searched for plusscript in Google I found two previous programming languages with this name and decided to change it to KAGSA , but in The first version I had problems publishing on pip, was the first version with the number 0.1.5 and it did not contain classes and it contained some stupid things so it was deleted and we got the new version 1.x.x.

Versions

How it Works ?

It contains a main parts :

  • Lexer
    • It translates kagsa codes into data that contains a key and a value : ['KEYWORD','var']
  • Syntax Checker
    • It checks the syntax of the data coming out of the Lexer.
  • Parser
    • Arranges all data to be Python code.
  • Compiler
    • It does more than one task, the most important of which is that it prepares everything to run Python codes coming out of the parser.

Installation

PyPi ( All OS )

Run this command your terminal :

pip install kagsa

Windows

Go to last kagsa releases and download kagsa-win-1.1.0.zip, Copy kagsa folder to any path you want and add this path to Environment Variables :

This PC > Properties > Advanced system settings > Environment Variables > System variables > Path > New > Paste The Path > Ok > Ok > Ok

Note : if kagsa command isn't run on your CMD, try to restart you computer

Make .kg files always open with kagsa.exe

Linux

Go to last kagsa releases and download kagsa-linux-1.1.0.zip, Take a look at readme.txt

Note : Make sure you have installed python3.

Termux

Download kagsa-termux-1.1.0.zip, read readme.txt

Note : Make sure you have installed python3.

Command Line Usage

Run kagsa program :

kagsa file.kg

Compile a library :

kagsa -l lib.kg -o output.kgl

Check version :

kagsa -v
kagsa --version

Check for updates :

kagsa -u
kagsa --updates

Help :

kagsa -h
kagsa --help

Examples :

Hello World

write 'Hello World'

OOP

class App {
    func @constructor (@this) {
        write 'Welcome To App\n'
        var @this.num = 0
    }
    func addOne (@this) {
        @this.num+=1
    }
    func takeOne (@this) {
        @this.num-=1
    }
}

var game = App()
game.addOne()
game.addOne()
game.addOne()
game.takeOne()

write game.num

Factorial

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)

Documents

You can find full documents in docs folder

Thanks To :

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-1.1.0.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

kagsa-1.1.0-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file kagsa-1.1.0.tar.gz.

File metadata

  • Download URL: kagsa-1.1.0.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.1

File hashes

Hashes for kagsa-1.1.0.tar.gz
Algorithm Hash digest
SHA256 a557c990b29d7eaf07ef13357ee61d4eae4d0bbb98a4dd0006a282a7499a6440
MD5 29b7244bd02dcbb0cf0d39f42a9ee1ae
BLAKE2b-256 a28d30a4b149c7e4a22e7a85baf6c2b1b3e531a7f11150871ba22811468c98a7

See more details on using hashes here.

File details

Details for the file kagsa-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: kagsa-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.1

File hashes

Hashes for kagsa-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2f043ad14f3cb80e2c0a71fd9731e6e9e05cf1d841d39649d25931fce876d66
MD5 50acc82910417dd682e371a774ec0621
BLAKE2b-256 99b9468f62259634f1a36dca4cb8ebb847c6c3c57fada26813728a4e7654b8b6

See more details on using hashes here.

Supported by

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