lib/github: handles github files
[nit.git] / contrib / nitcc / src / nitcc.sablecc
index fd467fb..c3208ae 100644 (file)
@@ -82,7 +82,7 @@ ign = 'Ignored' elem_list ';' ;
 
 rej = 'Rejected' elem_list ';' ;
 
-prod = id ptrans? '=' alts ';';
+prod = id ptrans? '=' alts priority* ';';
 
 ptrans = '{' '->' id '}';
 atrans = '{' '->' '}';
@@ -111,4 +111,9 @@ elem =
        {plus:} elem '+' |
        {empty:} 'Empty' ;
 
+priority =
+       {left:} 'Left' alts |
+       {right:} 'Right' alts |
+       {unary:} 'Unary' alts ;
+
 tree_part = 'Tree' prod*;