diff --git a/documentation/markdown/README.md b/documentation/markdown/README.md index 1c4df27..f2daf9d 100644 --- a/documentation/markdown/README.md +++ b/documentation/markdown/README.md @@ -1,4 +1,5 @@ # README +Created with https://github.com/adobe/jsonschema2md ## Top-level Schemas diff --git a/ebnf/util/EBNF2railroad example.txt b/ebnf/util/EBNF2railroad example.txt new file mode 100644 index 0000000..03f9e2d --- /dev/null +++ b/ebnf/util/EBNF2railroad example.txt @@ -0,0 +1,81 @@ +EBNF2railroad example + + + + + + +(* + + Welcome to EBNF 2 Railroad + ========================== + + In this editor you can try out the command line tool. + + Comments will be rendered throught markdown, + so you can do **markup** in them. + + `Ctrl-Shift-C`/`Cmd-Shift-C` will expand the selected + string in `terminal` elements for each character, + as a choice element. + + ``` + digit = 1234567890; + ``` + + selecting the numbers and pressing `Ctrl-Shift-C` / + `Cmd-Shift-C` + + will expand this into: + + ``` + digit = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0"; + ``` + + The EBNF syntax is as follows: + +*) + + + +grammar = { rule } ; +rule = lhs , "=" , rhs , ";" ; + +lhs = identifier ; +rhs = identifier + | terminal + | "[" , rhs , "]" + | "{" , rhs , "}" + | "(" , rhs , ")" + | rhs , "|" , rhs + | rhs , "," , rhs ; + +identifier = letter , { letter | digit | "_" } ; +terminal = "'" , character , { character } , "'" + | '"' , character , { character } , '"' ; + +character = letter | digit | symbol | "_" ; + +(* + Basic components + ---------------- + These are low level components, the small building blocks. +*) + + +letter = "A" | "B" | "C" | "D" | "E" | "F" | "G" + | "H" | "I" | "J" | "K" | "L" | "M" | "N" + | "O" | "P" | "Q" | "R" | "S" | "T" | "U" + | "V" | "W" | "X" | "Y" | "Z" | "a" | "b" + | "c" | "d" | "e" | "f" | "g" | "h" | "i" + | "j" | "k" | "l" | "m" | "n" | "o" | "p" + | "q" | "r" | "s" | "t" | "u" | "v" | "w" + | "x" | "y" | "z" ; + +digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ; + +symbol = "[" | "]" | "{" | "}" | "(" | ")" | "<" | ">" + | "'" | '"' | "=" | "|" | "." | "," | ";" ; + + +