Skip to the content.

A-Lang

Asian Language

A-Lang logo

A-lang is held underneath the GNU General Public liscense

A-lang is a project made for fun to play around with a parser, and just to learn more about coding

say "Welcome to alang!"

Features:

The basics

#Note, comments have to be on a different line
say "Hello" # say "E"
#output: Hello
#        E

say "Hello" 
# say "E"
# Output: Hello

Lets start with the basics. We got: say and req, alang’s equivelent for python’s print() and input()

They both look at the token after it, and uses that for output

say "Hello!"
# Output: "Hello"

req "Enter something: "
# output: Enter something: 
# Then user can input

Makes Sense, right?

If statements are a little more complicated. Since there are no numbers in alang, the two tokens are: is and not to compare. To end an if, you must use the endif token, otherwise some wierd stuff may happen

if "Hello" is "Hello"
    say "Hello"
endif
# Output: Hello

if "Hello" not "eeee"
    say "Hello is suprisingly not equal to eeeeee"
endif
#output: Hello is suprisingly not equal to eeeeee

File I/O

Alang has a file I/O, which replaces traditional variables, so this program creates a file called e, and writes hello to it

write "Hello" e

To access a file, you use read

say read e
# Reads file e, then says it

At the end of your program, you will end up with a file e, which is unprofesssional, So you can use the delete token to delete the file at the end of your program

delete e

Numbers

THERE ARE NO NUMBERS DID YOU EVEN READ THE FEATURES?

Concatination

Since there is no numbers in Alang, we only got the concatinantion + symbol. To concatinate, just use the + symbol:

write "Apple" funz
write read funz + "Banana"
#output: AppleBanana

Cross Compatibility

Alang is compatible with python (assuming it is downloaded on the host system), however, it only will run python oneliners, using the py: token

py: print('Hi')
#Output: Hi

You may use the semicolon (;) to run multiple python “lines”

py: print('Hi'); print('Bye')
#Output: Hi
#        Bye

I think that is it for the documentation. Good luck coding!

Running the file

The executables are located within the exec folder. The best way is to use git

git clone https://github.com/Coderz75/A-Lang.git

Then add the exec directory to PATH.

Then you should be able to use use asian to run the file

asian hello.a