diff --git a/yarspg/YARSpg.g4 b/yarspg/YARSpg.g4 index 5d95be0..cb171ac 100644 --- a/yarspg/YARSpg.g4 +++ b/yarspg/YARSpg.g4 @@ -40,7 +40,7 @@ declaration ; nodeDeclaration - : node_id '{' node_label (',' node_label)* '}' ( '[' node_prop (',' node_prop)* ']' )? + : '<' node_id '>' '{' node_label (',' node_label)* '}' ( '[' node_prop (',' node_prop)* ']' )? ; relationship diff --git a/yarspg/examples/real-example.yarspg b/yarspg/examples/real-example.yarspg index 692769b..b548cd6 100644 --- a/yarspg/examples/real-example.yarspg +++ b/yarspg/examples/real-example.yarspg @@ -1,9 +1,9 @@ -Author01{"Author"}["fname":"John","lname":"Smith"] -Author02{"Author"}["fname":"Alice","lname":"Brown"] -EI01{"Entry","InProc"}["title":"Serialization for...", "numpages":10,"keyword":"Graph database"] -EA01{"Entry","Article"}["title":"Property Graph...", "numpages":10,"keyword":["Query", "Graph"]] -Proc01{"Proceedings"}["title":"BDAS","year":2018,"month":"May"] -Jour01{"Journal"}["title":"J. DB","year":2020,"vol":30] +{"Author"}["fname":"John","lname":"Smith"] +{"Author"}["fname":"Alice","lname":"Brown"] +{"Entry","InProc"}["title":"Serialization for...", "numpages":10,"keyword":"Graph database"] +{"Entry","Article"}["title":"Property Graph...", "numpages":10,"keyword":["Query", "Graph"]] +{"Proceedings"}["title":"BDAS","year":2018,"month":"May"] +{"Journal"}["title":"J. DB","year":2020,"vol":30] (EI01)-{"has_author"}["order":1]->(Author01) (EI01)-{"has_author"}["order":2]->(Author02) diff --git a/yarspg/examples/test-example.yarspg b/yarspg/examples/test-example.yarspg index 8223072..c464534 100644 --- a/yarspg/examples/test-example.yarspg +++ b/yarspg/examples/test-example.yarspg @@ -1,8 +1,8 @@ -a{"a1d","x"}["aa1a":true,"a2aa":"text","aa3aa":null] -b43b{"label1"}["value":5] -c{"label333","c"}["value":"male","lang":"en","valid":false] -d{"label546"}["key":442.1333] -e{"ef22","y","v"}["key44":[true,false,"some text", null, 11, 11.2231]] +{"a1d","x"}["aa1a":true,"a2aa":"text","aa3aa":null] +{"label1"}["value":5] +{"label333","c"}["value":"male","lang":"en","valid":false] +{"label546"}["key":442.1333] +{"ef22","y","v"}["key44":[true,false,"some text", null, 11, 11.2231]] (a)-{"aaa1a"}["key":"value", "aab2bc":[44.22,"en",22]]->(c) (a)-{"aaa2a"}->(c)