Skip to content

Commit

Permalink
var -> variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lszeremeta committed Sep 15, 2021
1 parent a1f895d commit 5d918d6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
21 changes: 11 additions & 10 deletions other-notations/YARSpg.ebnf
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,28 @@ statement
::= node
| edge
| doc_metadata
| var_declaration
| variable_declaration
| node_schema
| edge_schema
| var_declaration_schema
| variable_declaration_schema
| graph
| graphs_schema
doc_metadata
::= '-' prop_list
var ::= '$' var_name
var_declaration
::= var '=' prop ( ',' prop )*
var_declaration_schema
::= var '=' prop_schema ( ',' prop_schema )*
var_name ::= ID
variable ::= '$' variable_name
variable_declaration
::= variable '=' prop ( ',' prop )*
variable_declaration_schema
::= variable '=' prop_schema ( ',' prop_schema )*
variable_name
::= ID
graph_id
::= 'default'
| ID
local_metadata
::= '+' prop_list
prop_list
::= ( '[' ( ( prop | var ) ( ',' ( prop | var ) )* )? ']' )?
::= ( '[' ( ( prop | variable ) ( ',' ( prop | variable ) )* )? ']' )?
meta_prop
::= '@' key ':' value
graphs_list
Expand Down Expand Up @@ -98,7 +99,7 @@ node_schema
node_id_schema
::= ID
prop_list_schema
::= '[' ( ( prop_schema | var ) ( ',' ( prop_schema | var ) )* )? ']'
::= '[' ( ( prop_schema | variable ) ( ',' ( prop_schema | variable ) )* )? ']'
prop_schema
::= key ':' value_schema id_key?
meta_prop_schema
Expand Down
22 changes: 11 additions & 11 deletions yarspg/YARSpg.g4
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ statement
: node
| edge
| doc_metadata
| var_declaration
| variable_declaration
| node_schema
| edge_schema
| var_declaration_schema
| variable_declaration_schema
| graph
| graph_schema
;
Expand All @@ -46,19 +46,19 @@ doc_metadata
: '-' prop_list
;

var
: '$' var_name
variable
: '$' variable_name
;

var_declaration
: var '=' prop (',' prop)*
variable_declaration
: variable '=' prop (',' prop)*
;

var_declaration_schema
: var '=' prop_schema (',' prop_schema)*
variable_declaration_schema
: variable '=' prop_schema (',' prop_schema)*
;

var_name
variable_name
: ID
;

Expand All @@ -72,7 +72,7 @@ local_metadata
;

prop_list
: '[' ( ( prop | var ) (',' ( prop | var ) )* )? ']'
: '[' ( ( prop | variable ) (',' ( prop | variable ) )* )? ']'
;

meta_prop
Expand Down Expand Up @@ -168,7 +168,7 @@ node_id_schema
;

prop_list_schema
: '[' ( ( prop_schema | var ) (',' ( prop_schema | var ) )* )? ']'
: '[' ( ( prop_schema | variable ) (',' ( prop_schema | variable ) )* )? ']'
;

prop_schema
Expand Down

0 comments on commit 5d918d6

Please sign in to comment.