diff --git a/other-notations/YARSpg.ebnf b/other-notations/YARSpg.ebnf index 16e0a01..2b9c70c 100644 --- a/other-notations/YARSpg.ebnf +++ b/other-notations/YARSpg.ebnf @@ -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 @@ -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 @@ -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 @@ -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])+ \ No newline at end of file diff --git a/yarspg/YARSpg.g4 b/yarspg/YARSpg.g4 index af69992..982b877 100644 --- a/yarspg/YARSpg.g4 +++ b/yarspg/YARSpg.g4 @@ -59,12 +59,12 @@ variable_declaration_schema ; variable_name - : ID + : ALNUMPLUS ; graph_id : 'default' - | ID + | ALNUMPLUS ; prop_list @@ -101,7 +101,7 @@ undirected ; node_id - : ID + : ALNUMPLUS ; node_label @@ -113,7 +113,7 @@ prop ; edge_id - : ID + : ALNUMPLUS ; edge_label @@ -160,7 +160,7 @@ node_schema ; node_id_schema - : ID + : ALNUMPLUS ; prop_list_schema @@ -263,7 +263,7 @@ UNSIGNED_INT : [0-9]+ ; -ID +ALNUMPLUS : [a-zA-Z_][a-zA-Z0-9_]* ;