From 40373310c5c741210b7a681c19eb97031493c038 Mon Sep 17 00:00:00 2001 From: "Elliott B. Edwards (el2iot2)" <28941195+el2iot2@users.noreply.github.com> Date: Sat, 21 Dec 2024 15:57:13 -0800 Subject: [PATCH] Add railroad diagrams for KDL 2.0 grammar closes Railroad diagrams for kdl #9 --- doc/README.md | 7 + doc/kdl-2-0-railroad-diagrams.html | 512 +++++++++++++++++++++++++++++ doc/kdl-2-0.ebnf | 56 ++++ 3 files changed, 575 insertions(+) create mode 100644 doc/README.md create mode 100644 doc/kdl-2-0-railroad-diagrams.html create mode 100644 doc/kdl-2-0.ebnf diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 0000000..3c20bf7 --- /dev/null +++ b/doc/README.md @@ -0,0 +1,7 @@ +# `kdl-2-0.ebnf` + +This file is a simplification of the [v2.0 spec for KDL](https://github.com/kdl-org/kdl/blob/main/SPEC.md) as adapted purely for the creation of approximated railroad diagrams (via this handy [application](https://www.bottlecaps.de/rr/ui)). + +> Largely this was adapted by summarizing certain "reg-ex" like formulations of rules as production rules with names that simply describe the resulting character classes. These rules, then left undefined in the grammar, display an intelligible intuition of what the grammar will do. For full details, one should carefully review the official spec. + +The resulting generated html is [here](kdl-2-0-railroad-diagrams.html). diff --git a/doc/kdl-2-0-railroad-diagrams.html b/doc/kdl-2-0-railroad-diagrams.html new file mode 100644 index 0000000..87f9111 --- /dev/null +++ b/doc/kdl-2-0-railroad-diagrams.html @@ -0,0 +1,512 @@ + + +
+ + + + + ++
+ +no references
+
+
referenced by: + +
+
+
referenced by: + +
+
+
+
referenced by: + +
+
+
+ ::= slashdash? type? node-space* string ( node-space+ slashdash? node-prop-or-arg )* ( node-space+ slashdashnode-children )* ( node-space+ node-children )? ( node-space+ slashdashnode-children )* node-space*
referenced by: + +
+
+ +referenced by: + +
+
+
+ ::= '{' nodesfinal-node? '}'
referenced by: + +
+
+ +referenced by: + +
+
+
referenced by: + +
+
+ +referenced by: + +
+
+
referenced by: + +
++
+
+
+
referenced by: + +
++
+
+
+
+
referenced by: + +
+
+
+ ::= '"' single-line-string-body '"'
+
referenced by: + +
+
+ +referenced by: + +
+
+
+ ::= ( ( '"' | '""' )? string-character )*
referenced by: + +
+
+
+ ::= '\' escape
+
referenced by: + +
++
+ escape ::= ["\bfnrts]
+
+ | ( unicode-space | newline )+
referenced by: + +
+
+
+ ::= [0-9a-fA-F]
referenced by: + +
++
+
+ ::= '#' ( raw-string-quotes | raw-string ) '#'
referenced by: + +
+
+
+ ::= '"' single-line-raw-string-body '"'
+ | '"""' newlinemulti-line-raw-string-body '"""'
referenced by: + +
+
+
+ ::= ''
+
referenced by: + +
++
+ +referenced by: + +
+
+ +referenced by: + +
+
+ +referenced by: + +
+
+ +referenced by: + +
++
+ digit ::= [0-9]
referenced by: + +
+
+ sign ::= '+'
+ | '-'
referenced by: + +
++
+ +referenced by: + +
+
+ +referenced by: + +
+
+ +referenced by: + +
+
+ +referenced by: + +
+
+
+ ::= '#inf'
+ | '#-inf'
+ | '#nan'
referenced by: + +
+
+ boolean ::= '#true'
+ | '#false'
referenced by: + +
+
+
+
referenced by: + +
+
+
+ ::= '/*' ( multi-line-comment | '*' | '/' | not-block-end+ )* '*/'
referenced by: + +
+
+
+ ::= '/-' ( node-space | line-space )*
referenced by: + +
+
+ ws ::= unicode-space
+
referenced by: + +
+
+
referenced by: + +
+
+ +referenced by: + +
++
+
+
referenced by: + +
++
+ |
+ |
+ + |