Recently, I started researching on how compilers actually work and had the idea of creating a compiler myself. This is what brought me to think up of the Lemur programming language.
The language is very simple and only showcases basic things. Such things are:
1. Basic commands such as 'echo'
2. Variables
3. For loops
4. If statements (Does not include else and else if statements yet)
5. User-defined structures - Booleans are not yet included :( but will be in later versions of the repository I will link at the end of the page. - Please note that define statements are called task statements just to shorten how much you have to type.
6. Expressions, mathematics etc.
7. String and number conversions
8. Simple signification for when you are calling a variable or a task function. For example, putting an '&' before a word or name, tells the compiler that it is looking at a variable, whilst a '$' means that you are looking at a task statement.
9. User input
There is still more left to do so I do hope to add more.
I will post tutorials on how to program in Lemur, but I do not think they are too necessary as this was just a project for my own learning. It was not designed to be a high-level language like C++, C, Python, Java, Objective C etc. but I do hope to see it get better some day.
A hello world program in Lemur is:
echo~Hello World!~
Please remember that the tilde symbols (~) represents that a token (part of a piece of a line of code) has ended.
If you wanted to make a program that said what 10*10 then you would have to write:
math_echo~10*10~
A program that counts up to a number the user has input would be:
task~count~
assign_math~i~0~
get_input~What should I count up to?~target~
for~&target~
increase_var~i~1~
echo~&i~
breakfor~
breaktask~
$count
This demonstrates how the task functions work in the language.
If you would like to view the source code of the programming language, then feel free to view it at GitHub here:
The language is very simple and only showcases basic things. Such things are:
1. Basic commands such as 'echo'
2. Variables
3. For loops
4. If statements (Does not include else and else if statements yet)
5. User-defined structures - Booleans are not yet included :( but will be in later versions of the repository I will link at the end of the page. - Please note that define statements are called task statements just to shorten how much you have to type.
6. Expressions, mathematics etc.
7. String and number conversions
8. Simple signification for when you are calling a variable or a task function. For example, putting an '&' before a word or name, tells the compiler that it is looking at a variable, whilst a '$' means that you are looking at a task statement.
9. User input
There is still more left to do so I do hope to add more.
I will post tutorials on how to program in Lemur, but I do not think they are too necessary as this was just a project for my own learning. It was not designed to be a high-level language like C++, C, Python, Java, Objective C etc. but I do hope to see it get better some day.
A hello world program in Lemur is:
echo~Hello World!~
Please remember that the tilde symbols (~) represents that a token (part of a piece of a line of code) has ended.
If you wanted to make a program that said what 10*10 then you would have to write:
math_echo~10*10~
A program that counts up to a number the user has input would be:
task~count~
assign_math~i~0~
get_input~What should I count up to?~target~
for~&target~
increase_var~i~1~
echo~&i~
breakfor~
breaktask~
$count
This demonstrates how the task functions work in the language.
If you would like to view the source code of the programming language, then feel free to view it at GitHub here: