forked from nette/neon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
syntax.txt
32 lines (23 loc) · 833 Bytes
/
syntax.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Preprocessing
-------------
- tabs are converted to single space
- \r is removed
Comment
-------
Comment ::= '#' .*
Values
------
Value ::= Boolean | Null | integer | float | String | DateTime | Literal | InlineArray | Entity
Boolean ::= 'true' | 'TRUE' | 'false' | 'FALSE' | 'yes' | 'YES' | 'no' | 'NO'
Null ::= 'null' | 'NULL' | ''
String ::= "word\u231" | 'word'
Literal ::= trimmed stream of characters [^#"',:=@[\]{}()\s!`] ( [^#,:=\]})(] | ':' [^\s,\]})] | \S '#' )*
Entity ::= Value '(' ( ArrayEntry ',' )* ')'
InlineArray
-----------
InlineArray ::= '{' ( ArrayEntry ',' )* '}' | '[' ( ArrayEntry ',' )* ']' | '(' ( ArrayEntry ',' )* ')'
ArrayEntry ::= Value | KeyValuePair
KeyValuePair ::= Value '=' Value | Value ': ' Value
BlockArray
----------
BlockArray ::= Indent ( '- ' Value | KeyValuePair ) EOL