interpreter: use SignatureMap to make varargize more robust
[nit.git] / contrib / nitcc / src / nitcc.sablecc
index 19a0d38..c3208ae 100644 (file)
@@ -68,6 +68,7 @@ re3 {-> re} =
        {par:} '(' re ')' |
        {class:} text '.' '.' text |
        {any:} 'Any' |
+       {end:} 'End' |
        {text:} text ;
 
 text {-> re} =
@@ -81,7 +82,7 @@ ign = 'Ignored' elem_list ';' ;
 
 rej = 'Rejected' elem_list ';' ;
 
-prod = id ptrans? '=' alts ';';
+prod = id ptrans? '=' alts priority* ';';
 
 ptrans = '{' '->' id '}';
 atrans = '{' '->' '}';
@@ -110,4 +111,9 @@ elem =
        {plus:} elem '+' |
        {empty:} 'Empty' ;
 
+priority =
+       {left:} 'Left' alts |
+       {right:} 'Right' alts |
+       {unary:} 'Unary' alts ;
+
 tree_part = 'Tree' prod*;