From 63d3df979cac2f6c712c94ca95a897e18d3a293e Mon Sep 17 00:00:00 2001 From: eudoxia Date: Tue, 16 Nov 2021 12:35:37 -0500 Subject: meta: added formal grammar meta-specification --- meta/grammar.html | 106 ++++++++++++++++++++++++++++++++++++++++++++++++ meta/index.html | 6 ++- meta/sitemap/index.html | 2 +- meta/src.md | 2 + sitemap.xml | 4 +- 5 files changed, 115 insertions(+), 5 deletions(-) create mode 100644 meta/grammar.html diff --git a/meta/grammar.html b/meta/grammar.html new file mode 100644 index 0000000..074c4a1 --- /dev/null +++ b/meta/grammar.html @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + +
+grammar		: rule (rule-separator rule)*
+
+rule		: non-terminal separator ':' separator expression
+
+rule-separator	: \x0A \x0A+
+
+separator	: (\x09 | \x20)+
+		| \x0A (\x09 | \x20)*
+
+non-terminal	: ([A-Z] | [a-z] | [-_]) ([0-9] | [A-Z] | [a-z] | [-_])*
+
+expression	: layer-0
+		| layer-1
+		| layer-2
+
+layer-0		: terminal
+		| non-terminal
+
+layer-1		: optional
+		| repetition
+		| free-monoid
+
+layer-2		: alternation
+		| concatenation
+		| exception
+
+terminal	: string
+		| hex-literal
+		| character-set
+		| extension
+
+optional	: layer-0 '?'
+		| '(' (layer-1 | layer-2) ')' '?'
+
+repetition	: layer-0 '+'
+		| '(' (layer-1 | layer-2) ')' '+'
+
+free-monoid	: layer-0 '*'
+		| '(' (layer-1 | layer-2) ')' '*'
+
+alternation	: alt-operand separator '|' separator alt-operand
+
+concatenation	: con-operand ' ' con-operand
+
+exception	: exc-operand ' - ' exc-operand
+
+alt-operand	: layer-0
+		| layer-1
+		| '(' layer-2 ')'
+		| alternation
+		| concatenation
+
+con-operand	: layer-0
+		| layer-1
+		| '(' layer-2 ')'
+		| concatenation
+
+exc-operand	: layer-0
+		| layer-1
+		| '(' layer-2 ')'
+
+string		: "'" (anything - "'")* "'"
+		| '"' (anything - '"')* '"'
+
+hex-literal	: '\x' ([0-9] | [A-F])+
+
+character-set	: '[' (character-list | character-range | extension) ']'
+
+character-list	: anything+
+		| hex-literal+
+
+character-range	: anything '-' anything
+		| hex-literal '-' hex-literal
+
+extension	: '<' anything+ '>'
+
+anything	: [<all valid UTF-8 characters>]
+
+ + \ No newline at end of file diff --git a/meta/index.html b/meta/index.html index eee3be3..a4f3ca9 100755 --- a/meta/index.html +++ b/meta/index.html @@ -12,14 +12,14 @@ Meta-Website Utilities — DistressNetwork° - +
INTERSTRATA.

-
––––DistressNetwork°
+
––––DistressNetwork°
@@ -32,6 +32,8 @@
  • The styletest is a template of all document elements with defined styles.
  • The to-do list is a dynamic list of maintenance tasks.
  • + +

    Regarding formal grammar specifications throughout the site, a specification of the notation within which they are expressed is provided.