| 1 |
<!doctype html> |
| 2 |
<html lang="en"> |
| 3 |
<head> |
| 4 |
<title>gron</title> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 6 |
</head> |
| 7 |
<body> |
| 8 |
<h1>gron</h1> |
| 9 |
<h2>Ungron Input Grammar</h2> |
| 10 |
|
| 11 |
<pre> |
| 12 |
Input ::= '--'* Statement (Statement | '--')* |
| 13 |
Statement ::= Path Space* "=" Space* Value ";" "\n" |
| 14 |
Path ::= (BareWord) ("." BareWord | ("[" Key "]"))* |
| 15 |
Value ::= String | Number | "true" | "false" | "null" | "[]" | "{}" |
| 16 |
BareWord ::= (UnicodeLu | UnicodeLl | UnicodeLm | UnicodeLo | UnicodeNl | '$' | '_') (UnicodeLu | UnicodeLl | UnicodeLm | UnicodeLo | UnicodeNl | UnicodeMn | UnicodeMc | UnicodeNd | UnicodePc | '$' | '_')* |
| 17 |
Key ::= [0-9]+ | String |
| 18 |
String ::= '"' (UnescapedRune | ("\" (["\/bfnrt] | ('u' Hex))))* '"' |
| 19 |
UnescapedRune ::= [^#x0-#x1f"\] |
| 20 |
</pre> |
| 21 |
|
| 22 |
<h3>Input</h3> |
| 23 |
<img src="images/input.png"> |
| 24 |
|
| 25 |
<h3>Statement</h3> |
| 26 |
<img src="images/statement.png"> |
| 27 |
|
| 28 |
<h3>Path</h3> |
| 29 |
<img src="images/path.png"> |
| 30 |
|
| 31 |
<h3>Value</h3> |
| 32 |
<img src="images/value.png"> |
| 33 |
|
| 34 |
<h3>BareWord</h3> |
| 35 |
<img src="images/bareword.png"> |
| 36 |
|
| 37 |
<h3>Key</h3> |
| 38 |
<img src="images/key.png"> |
| 39 |
|
| 40 |
<h3>String</h3> |
| 41 |
<img src="images/string.png"> |
| 42 |
|
| 43 |
<h3>UnescapedRune</h3> |
| 44 |
<img src="images/unescapedrune.png"> |
| 45 |
|
| 46 |
</body> |
| 47 |
</html> |