Skip to content

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

  • Effecient - Asians must be the first to finish everything
  • No numbers - Asians don't need a computer to do math for them
  • No imports - Asians don't need somebody's elses help to be the best
  • Nearly no compiler errors - As an Asian, we expect that your project is error free first try. Even with an error, we will run your code, and the output will be very wierd. If something is completely wrong, we will just shut the program with a: FAIL
  • Compatible - Our program is compatible with python, with a catch. We only do python one liners (because otherwise it would be too easy)
  • No Variables - Back in my day we had to make minecraft with NO COMPUTER MEMORY

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

About

Asian Languag

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages