Expression Reference Lexical ConventionsThe language parser operates on a C++ istream with the locale set to the standard "C" locale. Spaces, tabs, and line endings (composed of cr, lf, or (cr, lf) ) are considered white space and are ignored, except as they separate tokens. Lexical Grammarsimple_token = "+" | "-" | "*" | "/" | "%" | "?" | ":" | "=" | "!" | "{" | "}" | "<" | ">" | ";" | "@". compound_token = "&&" | "||" | "<=" | ">=" | "==" | "!=". string = quoted_string { quoted_string }. lead_comment = "/*" {character} "*/". trail_comment = "//" {character} eol. identifer = (letter | "_") {letter | "_" | digit}. keywords = "empty" | "true" | "false" | <extension>. number = digits ["e" ["+" | "-"]] digits. quoted_string = '"' {character} '"' | "'" {character} "'". digits = digit { digit }. CommentsComments are lexical tokens to facilitate the editing and subsequent formatting of the language in alternate representations. The trail_comment is terminated by any form of line ending. StringsStrings can be quoted either with single or double quotation marks. Adjacent strings are concatenated into a single string. There are no quote characters within a string. It is expected that the text within the string represents a higher-level representation (such as XML) which can provide additional mark-up. KeywordsThe Numbers:Numbers are always 64 bit IEEE double precision values.
ExpressionsThe expression syntax and semantics are designed to closely resemble the C language. Expressions are dynamically typed and there is no implicit type coercion between types. Expression Grammarexpression = or_expression ["?" expression ":" expression]. or_expression = and_expression { "||" and_expression }. and_expression = equality_expression { "&&" equality_expression }. equality_expression = relational_expression { ("==" | "!=") relational_expression }. relational_expression = additive_expression { ("<" | ">" | "<=" | ">=") additive_expression }. additive_expression = multiplicative_expression { ("+" | "-") multiplicative_expression }. multiplicative_expression = unary_expression { ("*" | "/" | "%") unary_expression }. unary_expression = postfix_expression | (unary_operator unary_expression). unary_operator = "+" | "-" | "!". postfix_expression = primary_expression { ("[" expression "]") | ("." identifier) }. primary_expression = name | number | boolean | string | "empty" | array | dictionary | variable_or_fuction | ( "(" expression ")" ). variable_or_function = identifier ["(" [argument_expression_list] ")"]. array = "[" [argument_list] "]". dictionary = "{" named_argument_list "}". argument_expression_list = named_argument_list | argument_list. argument_list = expression { "," expression }. named_argument_list = named_argument { "," named_argument }. named_argument = identifier ":" expression. name = "@" identifier. boolean = "true" | "false". TypesbooleanValues of type nameA name is a literal identifier. Names are used as keys for dictionaries [see dictionary_t] and can be used as enumerations would be used in C. numberNumbers are always 64 bit IEEE double precision values. stringA value of type emptyA value of type arrayAn dictionaryA OperatorsIndex OperatorAn A dict[@my_name] dict.my_name Unary OperatorsThe operand for unary The operand for Arithmetic OperatorsThe operands for Operators
Logical OperatorsThe operands for
Relational OperatorsThe operands for Equality OperatorsThe operands for Conditional OperatorThe conditional operator takes three operands, separated by Precedence and Order of Evaluation
Special Functionsintentionally empty Supplied Functionsintentionally empty |