diff --git a/other-notations/YARSpg.ebnf b/other-notations/YARSpg.ebnf index 6a09193..3473e1d 100644 --- a/other-notations/YARSpg.ebnf +++ b/other-notations/YARSpg.ebnf @@ -162,7 +162,7 @@ directed_schema undirected_schema ::= 'S' '(' node_id_schema ')' '-' '(' ( '{' ( edge_label ( ',' edge_label )* )? '}' )? prop_list_schema? ')' '-' '(' node_id_schema1 ')' graph_schema - ::= 'S' '/' graph_id '/' ( '{' ( graph_label ( ',' graph_label )* )? '}' )? prop_list_schema? + ::= 'S' '/' graph_id '/' prop_list_schema? number ::= UNSIGNED_INT | SIGNED_INT | DECIMAL diff --git a/yarspg/YARSpg.g4 b/yarspg/YARSpg.g4 index ebe45bd..f53ae00 100644 --- a/yarspg/YARSpg.g4 +++ b/yarspg/YARSpg.g4 @@ -286,7 +286,7 @@ undirected_schema ; graph_schema - : 'S' '/' graph_id '/' ( '{' ( graph_label ( ',' graph_label )* )? '}' )? prop_list_schema? + : 'S' '/' graph_id '/' prop_list_schema? ; number diff --git a/yarspg/examples/features-overview.yarspg b/yarspg/examples/features-overview.yarspg index f2be52d..3f2ef1c 100644 --- a/yarspg/examples/features-overview.yarspg +++ b/yarspg/examples/features-overview.yarspg @@ -3,7 +3,7 @@ %GRAPH # section declaration mainly for canonical version # Graph schema with graph id and optional labels and properties -S/graph1/{"graph_label", "graphlabel2"}["prop": Bool, "prop2": String] +S/graph1/["prop": Bool, "prop2": String] # Graph with graph id and optional labels and properties /graph1/{"graph_label", "graphlabel2"}["prop": true, "prop2": "Abc"] @@ -13,7 +13,7 @@ $graph2_prop = "prop2": "Abc"@"ok": false $graph2_prop_schema = "prop2": String @"ok": Bool # Use of variables -S/graph2/{"graph_label", "graphlabel2"}["prop": Bool, $graph2_prop_schema] +S/graph2/["prop": Bool, $graph2_prop_schema] /graph2/{"graph_label", "graphlabel2"}["prop": true, $graph2_prop] # Prefix declaration diff --git a/yarspg/examples/test-example.yarspg b/yarspg/examples/test-example.yarspg index 9204111..3a4a95b 100644 --- a/yarspg/examples/test-example.yarspg +++ b/yarspg/examples/test-example.yarspg @@ -1,16 +1,16 @@ %GRAPH -S/graph1/{"graph_label", "graphlabel2"}["prop": Bool, "prop2": String] +S/graph1/["prop": Bool, "prop2": String] /graph1/{"graph_label", "graphlabel2"}["prop": true, "prop2": "Abc"] $graph2_prop = "prop2": "Abc"@"ok": false $graph2_prop_schema = "prop2": String @"ok": Bool %GRAPH -S/graph2/{"graph_label", "graphlabel2"}["prop": Bool, $graph2_prop_schema] +S/graph2/["prop": Bool, $graph2_prop_schema] /graph2/{"graph_label", "graphlabel2"}["prop": true, $graph2_prop] %GRAPH -S/graph3/{}[] +S/graph3/[] /graph3/{}[] %GRAPH