English
-
عربي
-
русский
-
日本語
-
官话
español
-
हिंदी
-
italiano
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.
-
- 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 !! :)
-
- Kagsa allows many things that other languages prohibit, some of them :
- Allow some symbols in variable name (
@$^~?
) - Variable name can start with number
- Allow some symbols in variable name (
- Kagsa allows many things that other languages prohibit, some of them :
-
- Kagsa is based on Python, so it is a little slower, slow is at the beginning when the program is start.
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
.
It contains a main parts :
- Lexer
- It translates kagsa codes into data that contains a key and a value :
['KEYWORD','var']
- It translates kagsa codes into data that contains a key and a value :
- 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.
Run this command your terminal :
pip install kagsa
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
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
.
Download kagsa-termux-1.1.0.zip
, read readme.txt
Note : Make sure you have installed python3
.
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
write 'Hello World'
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
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)
You can find full documents in docs folder