Last active
September 30, 2020 20:46
-
-
Save dz4k/b59914c352c0cba3567dca352ae2b249 to your computer and use it in GitHub Desktop.
TAML EBNF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
# Tokens | |
* newline: one or more CR or CRLF | |
* tab: one or more tab characters not following a newline | |
* string: one or more characters none of which are tabs or newlines | |
The following tokens relate to indentation tracking: | |
* newrecord: a newline followed by the same number of tabs as the previous | |
newline in the input. | |
* indent: a newline followed by more tabs than the previous newline in the | |
input. | |
* dedent: either a newline followed by fewer tabs than the previous | |
newline in the input, or EOF. | |
*) | |
taml | |
= string | composite ; | |
composite | |
= dict | list ; | |
dict | |
= keyval | |
| dict , newrecord , keyval ; | |
list | |
= string | |
| list , newrecord , string ; | |
keyval | |
= string , tab , string | |
| string , tab | |
| string , indent , composite , dedent ; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment