Warning: RyanLang is in a very crude stage. Also I am also accepting a good name for this language. As the language is in a development stage, keywords will be added as the language becomes more useful!
RyanLang is a programming langauge that supports both Korean and English keywords to allow flexibility in terms of spoken language when writing code.
Int foo => Int c , Int b
Int grub = 10
print ( c + grub )
End
Int execute =>
Int a = 15 + 32
foo ( a + 2 , 5 )
End
Int fib => Int a , Int b , Int ctr , Int limit
if ctr == 20 =>
return 2
}
Int c = a + b
print ( c )
return fib ( b , c , ctr + 1 , limit )
}
Int execute =>
Int a = fib ( 1 , 1 , 0 , 5 )
}
$ ./rlang example.rlang
$ gcc example.asm -o example.out -e execute
$ ./example.rlang.out
- Supports Functions
- Local variables
- Basic Arithmetic
- Basic conditional
- Korean support for delclaration
- Support negative number print
- Function call should be able to take another function call as input ex) foo(foo(1))
- Clean up parser.go. Type function is obsolete in both tree and postfix functions
- Need to be able to take advanced conditional
- Else
- Loop
- Declare multiple variable types (String, array, boolean etc..)
- Import
- What about a conflict between variable and keywords? For example, someone who wants to write in Korean decides to declare a variable in English, does that person have to be aware of English keywords as well?:
- In the future, the user will specify the code language at compile time to avoid such conflict.
- Currently code generation divides into two stages:
- Statement class dependent preprocessing: Depends on the statement type, the compiler will generate appropriate assembly for a givent statement
- Convert leftover tokens to RPN, and generate AST for final code generation. Currently this stage is to support arithmetic operation. This has to be more integrated in the compilation stage.