mrzurnaci
Active member
To those that know about coding and programming. I've been working on an all-Syriac programming language.
The language is C-like and I'm utilizing C++ to build the compiler.
Here's a current revision of the language
The language is C-like and I'm utilizing C++ to build the compiler.
Here's a current revision of the language
Code:
/**** DECLARATIONS ****/
[SIZE=32px]
//struct/record as "amoma" meaning mould
????? ???? {
???? ?;
???? ?;
};
// int as "minya"
???? ?;
//function that returns a ?: evaluation
???? ???(???? ??, ???? ??)
{
??? ?? > ?? ? ?? : ??;
}
/**** STATEMENTS ****/
//statements
???? ?????()
{
//local variable
???? ? = ?;
//block
{
???? ? = ?;
}
//for as ?? "qah"
?? (???? ? = ?; ? < ???; ?++) {
??? ?;
}
//while as ?? "(ad"
?? (? < ???) {
? += ?;
}
//if as ?? "en"
?? (? == ???) {
??? "? is ???\n";
}
??? ?? (? < ???) {
??? "? is less than ???\n";
}
??? {
??? "? is greater than ???\n";
}
//print as ??? "kateb"
??? "the quick brown fox", ' ', ?.??;
//assignment
? = ?;
//expression
???(?, ?);
//???
??? ?;
}
/**** EXPRESSIONS ****/
//expressions
????? ?????()
{
???? ? = ?;
???? ? = ?;
???? ?;
//conditional
? = ? > ? ? ? : ?;
//logical or
? = ? || ?;
//logical and
? = ? && ?;
//equality
? = ? == ?;
//difference
? = ? != ?;
//less than
? = ? < ?;
//less than or equal
? = ? <= ?;
//greater than
? = ? > ?;
//greater than or equal
? = ? >= ?;
//addition
? = ? + ?;
//subtraction
? = ? - ?;
//multiplication
? = ? * y;
//division
? = ? / ?;
//logical not
? = !?;
//positive
? = +?;
//negative
? = -?;
//call function
? = ???(?, ?);
//member access
???? ?;
? = ?.?;
//float literal
???? ? = ?.?;
//integer literal
???? ?? = ????;
//string literal
???? ???? = "the quick brown fox";
//char literal
????? ? = 'a';
//boolean : ??? "sharer" is true and ??? "shaqer" is false
?????? ? = ???;
}[/SIZE]