Developer Guide
Table of Contents
Data Types (Code, Rule & About)
| Data Type | Variants | Section | Examples |
| Null | Code | null | |
| Boolean | Code | true, false | |
| Integer | Decimal | Code | 0, 10, 123456789, 34567l, 1345678L, -987645L, -45245l -9223372036854775808, 9223372036854775807 |
| Integer | Hexadecimal | Code | 0x12ACD, 0x12cd, 0XA34DE, 0X4e6Bc, |
| Float | Code | 0.5, 12345.1233f, 9876.555F, -678.345f, 456789.57e-34 4.94065645841246544e-324, 1.79769313486231570e+308 | |
| String | Quoted | Code, Rule, About | 'single quoted string', "double quoted string" |
| String | Unquoted | Rule, About | string_without_quote (no space) |
| List | Code | [], [67], [1, 1.345], [23l, 34.56f, 'string', ['nested list']] | |
| Hash | Code | [:], [65:'A', 66:'B', 67:'C'], ['key':'value', 1:346l, 5:[45, 78]] (Present syntax @[65:'A', 66:'B', 67:'C']) | |
| RegExp | Quoted | Code, Rule | /'a*b+ccccdd'/ (Unimplemented) /"a*b+ccccdd"/ (Unimplemented) |
| RegExp | Unquoted | Rule | /a*b+ccccdd/ (Unimplemented) |
String Escapes (Code, Rule & About)
| Escapes | Meaning |
| \{ | Left Brace ({) |
| \} | Right Brace (}) |
| \@ | Commercial At (@) |
| \: | Colon Sign (:) |
| \= | Equal Sign (=) |
| \' | Single quote (') |
| \" | Double quote (") |
| \n | Linefeed (LF) |
| \r | Carriage Return (CR) |
| \t | Horizontal Tab (TAB) |
| \f | Formfeed (FF) |
| \s | Space (SP) |
| \b | Backspace (BS) |
| \uNNNN | Unicode character with 16-bit hex value NNNN |
Some escapes are optional in some context.
Comments (Code, Rule & About)
/*Comments spanning multiple lines*/
//Single line comment
Operators (Code)
| Operators | Description |
| +, -, *, /, % | Numerical operation |
| +=, -=, *=, /=, %= | Numerical operation with assignment |
| ++, -- | Numerical operation on variable |
| + | String operation |
| ==, !=, >, <, >=, <= | Numerical relational operation |
| ==, != | String relational operation |
| !, ||, && | Logical operation |
| ~, |, &, <<, >> | Bitwise operation |
| ~=, |=, &=, <<=, >>= | Bitwise operation with assignment |
Statements (Rule)
@rule {
key1 = value1 value2 ...
key2 = value1 value2 ...
}
A key will be replaced by one of its alternative values. If alternative values are same for both statements, they can be merged into a single statement.
@rule {
key1 key2 ... = value1 value2 ...
key{meta-characters} = val{meta-characters}ue{meta-characters}
@{dynamic-key} static-key ... = @{dynamic-value} static-value ...
@code {
dynamic-rule
}
}
Meta characters are not a part of real key or value but they can be retrieve for calculation. In some language some characters are omitted based on context or some phonemes do not have any grapheme to represent. Meta characters can be used in those cases. Above all statements are valid only in rule section/scope. Regular expression key based rule and conditional rule are unimplemented.
Statements (Code)
| Statements | Description |
| let a, b | Variable declaration |
| let a = 5, b = 10 | Variable declaration and initialization |
| define function(var1, var2) { statement } | function declaration |
| define function(var1, var2, var3...) { statement } | function declaration with varargs |
| if (condition) statement [else statement] | if-else Ladder |
| while(condition) statement | while loop |
| do statement while(condition) | do-while loop |
| for (initialization; termination; update) statement | for loop |
Semicolons are optional statement terminator. Semicolons will automatically inserted into the source code where appropriate in place of line terminator. Thus at least one line terminator must exist in place of a semicolon.
About Section (About)
@about {
Name : Value
}
Both name and value are string (quoted/unquoted). Name is not case sensitive.