symbol_character =
? not (")" | "(" | "[" | "]" | U+0022 | \p{Separator}) ? ;
symbol =
symbol_character , { symbol_character } ;
quoted_character =
? not U+0022 ? ;
quoted_string =
(quoted_character | escape) , { (quoted_character | escape) } ;
escape =
escape_carriage
| escape_newline
| escape_tab
| escape_quote
| escape_unicode4
| escape_unicode8 ;
escape_carriage =
"\r" ;
escape_newline =
"\n" ;
escape_quote =
"\" , U+0022 ;
escape_tab =
"\t" ;
escape_unicode4 =
"\u" ,
hex_digit , hex_digit , hex_digit , hex_digit ;
escape_unicode8 =
"\u" ,
hex_digit , hex_digit , hex_digit , hex_digit ,
hex_digit , hex_digit , hex_digit , hex_digit ;
hex_digit =
"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" |
"a" | "A" | "b" | "B" | "c" | "C" | "d" | "D" | "e" | "E" | "f" | "F" ;
expression =
symbol
| quoted_string
| "[" , { expression } , "]"
| "(" , { expression } , ")" ;
| Notation | Description |
|---|---|
| e ∈ A | e is an element of the set A |
| e ∉ A | e is not an element of the set A |
| { x₀, x₁, ... xₙ } | A set consisting of values from x₀ to xₙ |
| { e ∈ A | p(e) } | A set consisting of the elements of A for which the proposition p holds |
| |A| | The cardinality of the set A; a measure of the number of elements in A |
| ∅ | The empty set |
| 𝔹 | The booleans |
| ℕ | The natural numbers |
| ℝ | The real numbers |
| ℤ | The integers |
| [a, b] | A closed interval in a set (given separately or implicit from the types of a and b), from a to b, including a and b |
| (a, b] | A closed interval in a set (given separately or implicit from the types of a and b), from a to b, excluding a but including b |
| [a, b) | A closed interval in a set (given separately or implicit from the types of a and b), from a to b, including a but excluding b |
| (a, b) | A closed interval in a set (given separately or implicit from the types of a and b), from a to b, excluding a and b |
| A ⊂ B | A is a subset of, and is not equal to, B |
| A ⊆ B | A is a subset of, or is equal to, B |
package_name_unqualified =
\p{Lowercase_Letter} , { \p{Lowercase_Letter} | '_' | \p{Digit} } ;
package_name_qualified =
package_name_unqualified , { "." , package_name_unqualified } ;
type_name =
\p{Letter_Uppercase} , { \p{Letter} | \p{Digit} | '_' } ;
package_import = (import q:<package_name_qualified> as r:package_name_unqualified)
record_field_padding_declaration = (padding-octets <size_expression>) record_field_value_declaration = (field <field_name> <type_expression>) record_field_declaration = record_field_padding_declaration | record_field_value_declaration record_declaration = (record t:<type_name> f:(<record_field_declaration> ...))
packed_field_padding_declaration = (padding-bits <size_expression>) packed_field_value_declaration = (field <field_name> <type_expression>) packed_field_declaration = packed_field_padding_declaration | packed_field_value_declaration packed_declaration = (packed t:<type_name> f:(<packed_field_declaration> ...))
format_expression = "signed" | "unsigned" | "signed-normalized" | "unsigned-normalized" ; integer_expression = (integer s:<format_expression> t:<size_expression>)
boolean_set_expression = (boolean-set s:<size_expression> f:(<field-name> ...))
vector_expression = (vector t:<type_expression> s:<size_expression>)
matrix_expression = (matrix t:<type_expression> w:<size_expression> h:<size_expression>)
string_expression = (string s:<size_expression> e:<quoted_string>)
type_reference_qualified = package_name_unqualified , ":" , type_name ; type_reference = type_name | type_reference_qualified ;