aboutsummaryrefslogtreecommitdiff
path: root/Documentation/wmap-spec.ebnf
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-07-11 11:12:41 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2025-07-11 11:12:41 +0200
commit8c74a32ef5aade1960b056950e52f2f3273db8c7 (patch)
tree9218781810fef49772b8ad1c23629a504e1ea0eb /Documentation/wmap-spec.ebnf
parentceb1654ced23d545e1b2437751a70113cb1a2d2a (diff)
Add wmap definition
Diffstat (limited to 'Documentation/wmap-spec.ebnf')
-rw-r--r--Documentation/wmap-spec.ebnf18
1 files changed, 9 insertions, 9 deletions
diff --git a/Documentation/wmap-spec.ebnf b/Documentation/wmap-spec.ebnf
index 05eabe5..6ad79c6 100644
--- a/Documentation/wmap-spec.ebnf
+++ b/Documentation/wmap-spec.ebnf
@@ -4,26 +4,26 @@
program = { line } ;
line = ( entity line_ending ) | ( ignored_line line_ending ) | line_ending ;
-entity = vertex | edge | note | stage | group | inertia | evolution ;
+entity = component | dependency | note | stage | group | inertia | evolution ;
ignored_line = ? any sequence of tokens that doesn't match entity grammar ? ;
(* Entities *)
-vertex = vertex_label position [ shape ] ;
-edge = vertex_label edge_type vertex_label ;
+component = component_label position [ shape ] ;
+dependency = component_label dependency_type component_label ;
note = case_insensitive("[Note]") position text ;
stage = "[" stage_number "]" real_number ;
-group = case_insensitive("[Group]") vertex_label { "," vertex_label } ;
-inertia = case_insensitive("[Inertia]") vertex_label ;
-evolution = case_insensitive("[Evolution]") vertex_label sign real_number ;
+group = case_insensitive("[Group]") component_label { "," component_label } ;
+inertia = case_insensitive("[Inertia]") component_label ;
+evolution = case_insensitive("[Evolution]") component_label sign real_number ;
(* Component definitions *)
position = "(" real_number "," real_number ")" ;
shape = "[" shape_label "]" ;
-edge_type = "--" | "->" ;
+dependency_type = "--" | "->" ;
sign = "+" | "-" ;
(* Terminal symbols *)
-vertex_label = preserved_case( { character - ( "-" | "+" | "," | "[" | "]" | "(" | ")" | line_ending ) } ) ;
+component_label = preserved_case( { character - ( "-" | "+" | "," | "[" | "]" | "(" | ")" | line_ending ) } ) ;
text = preserved_case( { character - line_ending } ) ;
real_number = [ digit ] { digit } [ "." { digit } ] | "." digit { digit } ;
stage_number = case_insensitive( "i" | "ii" | "iii" | "iv" ) ;
@@ -43,7 +43,7 @@ preserved_case(x) = ? case-insensitive match of x, preserving original case for
(* Notes *)
(* - Keywords and shape labels are case-insensitive *)
-(* - Vertex labels are case-insensitive for matching but preserve original case *)
+(* - Component labels are case-insensitive for matching but preserve original case *)
(* - Text content preserves original case *)
(* - Whitespace (except line endings) may appear between any tokens *)
(* - Each line contains exactly one entity *)