diff --git a/scone/head/grammar/scoml.tx b/scone/head/grammar/scoml.tx index 91ab47a..ea47188 100644 --- a/scone/head/grammar/scoml.tx +++ b/scone/head/grammar/scoml.tx @@ -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 ;