Created
May 2, 2016 15:36
-
-
Save sortie/6eccb27f3408e2c3f4877fed07100dd4 to your computer and use it in GitHub Desktop.
bnf.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
| wspace ::= '\t' | '\n' | '\v' | '\f' | '\r' | ' '. | |
| wspaces ::= <wspace> | |
| | <wspace> <wspaces>. | |
| ospaces ::= | |
| | <wspaces>. | |
| char-constant ::= '\'' [^'] '\'' | |
| | '\'' '\\' <char> '\''. | |
| range-char ::= [^]]. | |
| ranges ::= | <range-char> <ranges>. | |
| range-constant ::= '[' <ranges> '] | |
| | '[' '^' <ranges> '] | |
| | '[' ']' <ranges> '] | |
| | '[' '^' ']' <ranges> ']. | |
| string-constant-char ::= [^"] | |
| | '\\' <char>. | |
| string-constant-chars ::= | <string-constant-char> <string-constant-chars>. | |
| string-constant ::= '"' <string-constant-chars> '"'. | |
| identifier-char ::= [^][ ^<>'":=\|]. | |
| identifier ::= <identifier-char> | |
| | <identifier-char> <identifier>. | |
| reference ::= '<' <identifier> '>'. | |
| bnf-element ::= <char-constant> | |
| | <string-constant> | |
| | <range-constant> | |
| | <reference>. | |
| bnf-branch ::= <ospaces> | |
| | <ospaces> <bnf-element> <bnf-branch>. | |
| bnf-branches ::= <bnf-branch> | |
| | <bnf-branch> '|' <bnf-branches>. | |
| bnf-definition ::= <identifier> <ospaces> "::=" <bnf-branches> '.'. | |
| bnf ::= <ospaces> | |
| | <ospaces> <bnf-definition> <bnf>. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment