Skip to content

Commit

Permalink
node_id must be surrounded < >
Browse files Browse the repository at this point in the history
  • Loading branch information
lszeremeta committed Feb 28, 2019
1 parent 43842c9 commit 2aae4fe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion yarspg/YARSpg.g4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions yarspg/examples/real-example.yarspg
Original file line number Diff line number Diff line change
@@ -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]
<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]

(EI01)-{"has_author"}["order":1]->(Author01)
(EI01)-{"has_author"}["order":2]->(Author02)
Expand Down
10 changes: 5 additions & 5 deletions yarspg/examples/test-example.yarspg
Original file line number Diff line number Diff line change
@@ -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]]
<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]]

(a)-<ferf>{"aaa1a"}["key":"value", "aab2bc":[44.22,"en",22]]->(c)
(a)-<id341>{"aaa2a"}->(c)
Expand Down

0 comments on commit 2aae4fe

Please sign in to comment.