Skip to content

Instantly share code, notes, and snippets.

@hsk
Last active November 7, 2016 15:17
Show Gist options
  • Save hsk/499d54aef001a43ee89ae2ce63d137a0 to your computer and use it in GitHub Desktop.
Save hsk/499d54aef001a43ee89ae2ce63d137a0 to your computer and use it in GitHub Desktop.
NSON BNF
## NSON BNF
bool ::= 'true' | 'false'
value ::= '"' (not('"')|'\' _)+ '"'
| ('a'|...|'z'|'A'|...|'Z'|'_')('a'|...|'z'|'A'|...|'Z'|'_'|'0'|...'9')*
number ::= ('0'|...|'9')+
| ('0'|...|'9')* '.' ('0'|...|'9')+ | ('0'|...|'9')+ '.' ('0'|...|'9')*
value ::= atom | number | bool
expression ::= value | object | array
object ::= '{' (value ':' expression ','?)* '}'
array ::= '[' (expression ','?)* ']'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment