|
|
@@ -317,8 +317,18 @@ init "Init Block"
|
|
|
{ return new ast.Init(system, body); }
|
|
|
|
|
|
code_block
|
|
|
- = [^{}]* ( "{" code_block "}" )? [^{}]*
|
|
|
+ = code_text ( "{" code_block "}" ) code_block?
|
|
|
{ return text().trim(); }
|
|
|
+ / code_text
|
|
|
+ { return text().trim(); }
|
|
|
+
|
|
|
+code_text
|
|
|
+ = ( string / [^{}] )* { return text(); }
|
|
|
+
|
|
|
+string
|
|
|
+ = ["] [^"]* ["] { return text(); }
|
|
|
+ / ['] [^']* ['] { return text(); }
|
|
|
+ / [`] [^`]* [`] { return text(); }
|
|
|
|
|
|
behavior_id = id:ID { return id; }
|
|
|
system_id = id:ID { return id; }
|
|
|
@@ -358,7 +368,7 @@ _PIPE_ = _ t:"|" _ { return t; }
|
|
|
_COLON_ = _ t:":" _ { return t; }
|
|
|
_SEMI_ = _ t:";" _ { return t; }
|
|
|
|
|
|
-ID "Identifier" /*TODO: UNICODE?*/
|
|
|
+ID "Identifier" /*TODO: UNICODE?*/
|
|
|
= !KEYWORD [A-Za-z] [a-zA-Z0-9_]*
|
|
|
{ return text(); }
|
|
|
|