Created
March 12, 2013 02:00
-
-
Save yuga/5139681 to your computer and use it in GitHub Desktop.
An unserious BNF of the GNU sort command.
Redundant separators are placed deliberately.
This file contains 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
<key> := <startf> <separator>* | |
(<dot> <separator>* <startc> <separator>*)? | |
(<option> <separator>*)* | |
((<comma> <separator>* <endf> <separator>*)? | |
(<dot> <separator>* <endc> <seprator>*)? | |
(<option> <separator>*)* | |
)? | |
<startf> := <num>+ | |
<startc> := <num>+ | |
<endf> := <num>+ | |
<endc> := <num>+ | |
<option> := ('r'|'n') | |
<num> := ('0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9') | |
<separator> := (' '|'\t') | |
<dot> := '.' | |
<comma> := ',' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment