Created
June 2, 2017 21:27
-
-
Save wking/5cd4fe3bbf41e1bf46dc89ed724dba6f to your computer and use it in GitHub Desktop.
*BNF comparison
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
Undefined | |
ref := component ["/" component]* | |
component := alphanum [separator alphanum]* | |
alphanum := /[A-Za-z0-9]+/ | |
separator := /[-._:@+]/ | "--" | |
ABNF | |
ref = component *("/" component) | |
component = alphanum *(separator alphanum) | |
alphanum = 1*(ALPHA DIGIT) | |
separator = "--" / "-" / "." / "_" / ":" / "@" / "+" | |
PEG | |
start <- component ("/" component)* | |
component <- alphanum (separator alphanum)* | |
alphanum <- (letter / digit)+ | |
separator <- "--" / "-" / "." / "_" / ":" / "@" / "+" | |
letter <- [A-Za-z] | |
digit <- [0-9] | |
XML 1.0 EBNF | |
ref ::= component ("/" component)* | |
component ::= alphanum (separator alphanum)* | |
alphanum ::= [a-zA-Z0-9]+ | |
separator ::= [-._:@+] | "--" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment