Skip to content

Instantly share code, notes, and snippets.

@cheptsov
Last active November 2, 2016 21:48
Show Gist options
  • Save cheptsov/9efcc8084eb0c4e15420d2437b80b1da to your computer and use it in GitHub Desktop.
Save cheptsov/9efcc8084eb0c4e15420d2437b80b1da to your computer and use it in GitHub Desktop.
{
tokens = [
crlf='regexp:\n'
escaped_crlf='regexp:^\\(\n)'
comment='regexp:[#|!][^\n]*'
nonId='regexp:[:=\s\\]'
sepearator='regexp:\s*(=|:)\s*'
id='regexp:[^#|!:=\s\n\\]([^:=\s\n\\]|(\\\s))*'
]
}
root ::= item*
private item ::= (property|comment|crlf)
property ::= key sepearator value
key ::= id?
value ::= (id|sepearator|nonId|escaped_crlf)*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment