Skip to content

Commit

Permalink
Unify the syntax of local and document metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
lszeremeta committed Jun 9, 2021
1 parent a6fa2a7 commit 62183a0
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion other-notations/YARSpg.ebnf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ prefix_directive
pname ::= ':' ALNUM_PLUS ':'
pn_local ::= ALNUM_PLUS
doc_metadata
::= '-' ((pn_local pname) | (IRI ":")) (STRING | IRI)
::= '-' '[' ((pn_local pname) | (IRI ":")) (STRING | IRI) ']'
var ::= '$' var_name
var_declaration
::= var '=' prop ( ',' prop )*
Expand Down
2 changes: 1 addition & 1 deletion yarspg/YARSpg.g4
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pn_local
;

doc_metadata
: '-' ((pn_local pname) | (IRI ':')) (STRING | IRI)
: '-' '[' ((pn_local pname) | (IRI ':')) (STRING | IRI) ']'
;

var
Expand Down
2 changes: 1 addition & 1 deletion yarspg/examples/canonical-real-example.yarspg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%METADATA
-<http://xmlns.com/foaf/0.1/maker>:"Łukasz Szeremeta and Dominik Tomaszuk"
-[<http://xmlns.com/foaf/0.1/maker>:"Łukasz Szeremeta and Dominik Tomaszuk"]
%NODE SCHEMAS
S(NS1{"Author"}["fname":String,"lname":String])
S(NS2{"Entry","InProceedings"}["title":String,"numpages":Integer,"keyword":String])
Expand Down
2 changes: 1 addition & 1 deletion yarspg/examples/features-overview.yarspg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ S/graph2/["prop": Bool, $graph2_prop_schema]
:foaf: <http://xmlns.com/foaf/0.1/>

# Metadata
-foaf:maker: "Łukasz Szeremeta"
- [foaf:maker: "Łukasz Szeremeta"]

# Node schema with node id and optional: node labels, properties, graphs and local metadata
# MIN, MAX, OPTIONAL
Expand Down
2 changes: 1 addition & 1 deletion yarspg/examples/real-example.yarspg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:foaf: <http://xmlns.com/foaf/0.1/>

# Metadata
-foaf:maker: "Łukasz Szeremeta and Dominik Tomaszuk"
-[foaf:maker: "Łukasz Szeremeta and Dominik Tomaszuk"]

# Node schema
S(NS1 {"Author"}["fname": String, "lname": String])
Expand Down
12 changes: 6 additions & 6 deletions yarspg/examples/test-example.yarspg
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ S/graph4/

# Metadata
% METADATA
-foaf:maker: "Łukasz Szeremeta and Dominik Tomaszuk"
-foaf:maker: <http://example.com/me>
-dc:test: "Test metadata"
-<http://xmlns.com/foaf/0.1/maker>: "Łukasz Szeremeta and Dominik Tomaszuk"
-<http://xmlns.com/dc/0.5/zyz>: <http://xmlns.com/dc/0.5/abc>
-<http://xmlns.com/dc/0.5/zyz>: "Test"
-[foaf:maker: "Łukasz Szeremeta and Dominik Tomaszuk"]
-[foaf:maker: <http://example.com/me>]
- [ dc:test: "Test metadata" ]
- [<http://xmlns.com/foaf/0.1/maker>: "Łukasz Szeremeta and Dominik Tomaszuk"]
-[<http://xmlns.com/dc/0.5/zyz>: <http://xmlns.com/dc/0.5/abc> ]
-[ <http://xmlns.com/dc/0.5/zyz>: "Test"]

# comment3#12
% NODES
Expand Down

0 comments on commit 62183a0

Please sign in to comment.