Skip to content

Commit

Permalink
ID -> ALNUMPLUS
Browse files Browse the repository at this point in the history
  • Loading branch information
lszeremeta committed Nov 29, 2021
1 parent fd2fa10 commit cab4da0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
13 changes: 7 additions & 6 deletions other-notations/YARSpg.ebnf
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ variable_declaration
variable_declaration_schema
::= variable '=' prop_schema ( ',' prop_schema )*
variable_name
::= ID
::= ALNUMPLUS
graph_id
::= 'default'
| ID
| ALNUMPLUS
prop_list
::= ( '[' ( ( prop | variable ) ( ',' ( prop | variable ) )* )? ']' )?
meta_prop
Expand All @@ -71,11 +71,11 @@ edge
directed ::= '(' node_id ')' '-' '(' edge_id? ( '{' ( edge_label ( ',' edge_label )* )? '}' )? prop_list? ')' '->' '(' node_id ')' graphs_list? metadata?
undirected
::= '(' node_id ')' '-' '(' edge_id? ( '{' ( edge_label ( ',' edge_label )* )? '}' )? prop_list? ')' '-' '(' node_id ')' graphs_list? metadata?
node_id ::= ID
node_id ::= ALNUMPLUS
node_label
::= STRING
prop ::= key ':' value meta_prop?
edge_id ::= ID
edge_id ::= ALNUMPLUS
edge_label
::= STRING
graph_label
Expand All @@ -95,7 +95,7 @@ struct_value ::= '{' key ':' ( primitive_value | struct_value ) meta_prop? ( '
node_schema
::= 'S' '(' node_id_schema ( '{' ( node_label ( ',' node_label )* )? '}' )? prop_list_schema? ')' graphs_list? metadata?
node_id_schema
::= ID
::= ALNUMPLUS
prop_list_schema
::= '[' ( ( prop_schema | variable ) ( ',' ( prop_schema | variable ) )* )? ']'
prop_schema
Expand Down Expand Up @@ -149,6 +149,7 @@ COMMENT ::= '#' [^#xd#xa#xc]*
STRING ::= '"' ([^"\#xd#xa] | "'" | '\"')* '"'
UNSIGNED_INT
::= [0-9]*
ID ::= [a-zA-Z_][a-zA-Z0-9_]*
ALNUMPLUS
::= [a-zA-Z_][a-zA-Z0-9_]*
HEX ::= [0-9A-Fa-f]
WS ::= ([#x20#x9#xa])+
12 changes: 6 additions & 6 deletions yarspg/YARSpg.g4
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ variable_declaration_schema
;

variable_name
: ID
: ALNUMPLUS
;

graph_id
: 'default'
| ID
| ALNUMPLUS
;

prop_list
Expand Down Expand Up @@ -101,7 +101,7 @@ undirected
;

node_id
: ID
: ALNUMPLUS
;

node_label
Expand All @@ -113,7 +113,7 @@ prop
;

edge_id
: ID
: ALNUMPLUS
;

edge_label
Expand Down Expand Up @@ -160,7 +160,7 @@ node_schema
;

node_id_schema
: ID
: ALNUMPLUS
;

prop_list_schema
Expand Down Expand Up @@ -263,7 +263,7 @@ UNSIGNED_INT
: [0-9]+
;
ID
ALNUMPLUS
: [a-zA-Z_][a-zA-Z0-9_]*
;
Expand Down

0 comments on commit cab4da0

Please sign in to comment.