Allow more characters in IDs

Notably: hypenminuses (-)
This commit is contained in:
Olivier 'reivilibre' 2020-11-08 19:52:30 +00:00
parent 8a42b277ff
commit 89a76c1ca5

View File

@ -19,7 +19,7 @@ RecipeOrSubBlock:
SubBlock[ws=' \t']:
unique_id=ID '{' human=/.*$/ /\n/+
unique_id=IdString '{' human=/.*$/ /\n/+
block=Block
'}' /\n/+
;
@ -31,15 +31,15 @@ Directive:
;
UserDirective[ws=' \t']:
'@user' '=' user=ID /\n/+
'@user' '=' user=IdString /\n/+
;
SousDirective[ws=' \t']:
'@sous' '=' sous=ID /\n/+
'@sous' '=' sous=IdString /\n/+
;
ImportDirective[ws=' \t']:
'@import' importee=ID /\n/+
'@import' importee=IdString /\n/+
;
@ -69,7 +69,7 @@ RecipeEdgeDirectiveKind:
RecipeEdgeDirective[ws=' \t']:
kind=RecipeEdgeDirectiveKind
':' id=ID
':' id=IdString
// TODO 'on other sous' ?
/\n/+
;
@ -80,15 +80,15 @@ ListenEdgeDirectiveKind:
ListenEdgeDirective[ws=' \t']:
kind=ListenEdgeDirectiveKind
(recipe_id=ID | resource=Resource)
(recipe_id=IdString | resource=Resource)
'changes'
;
Resource:
type=ID '(' (primary=UnquotedString | primary=QuotedString) ')'
type=IdString '(' (primary=UnquotedString | primary=QuotedString) ')'
(extra_params=BraceDict)?
('on' sous=ID)?
('on' sous=IdString)?
;
@ -140,6 +140,10 @@ DottedIdString:
/[a-zA-Z_-][a-zA-Z0-9_\.-]*/
;
IdString:
/[a-zA-Z_-][a-zA-Z0-9_-]*/
;
Integer:
value=INT
;