Created
January 10, 2016 04:40
-
-
Save DmitrySoshnikov/a0133943e30d1edacbc3 to your computer and use it in GitHub Desktop.
json.bnf
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
%token STRING NULL NUMBER TRUE FALSE | |
%start JSONText | |
%% | |
JSONText : JSONValue; | |
JSONString : STRING; | |
JSONNullLiteral : NULL; | |
JSONNumber : NUMBER; | |
JSONBooleanLiteral : TRUE | |
| FALSE | |
; | |
JSONValue : JSONNullLiteral | |
| JSONBooleanLiteral | |
| JSONString | |
| JSONNumber | |
| JSONObject | |
| JSONArray | |
; | |
JSONObject : '{' '}' | |
| '{' JSONMemberList '}' | |
; | |
JSONMember : JSONString ':' JSONValue; | |
JSONMemberList : JSONMember | |
| JSONMemberList ',' JSONMember | |
; | |
JSONArray : '[' ']' | |
| '[' JSONElementList ']' | |
; | |
JSONElementList : JSONValue | |
| JSONElementList ',' JSONValue | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment