update code
[des2015.git] / dsl / xtend / src / robots / missions / TaskDSL.xtext
index afefa5d..14a834f 100644 (file)
@@ -13,7 +13,7 @@ Mission:
 
 StoppingExpression:
        '(' op=Operator s+=StoppingExpression s+=StoppingExpression+ ')' |
-       'not ' negscond=StoppingCondition |
+       'not ' negscond=StoppingExpression |
        scond=StoppingCondition;
 
 StoppingCondition:
@@ -29,9 +29,14 @@ Behaviour: 'Behaviour' name=ID
 
 Action:
        whichMotor=LeftRight 'motor' moveDir=Direction ('with speed' spd=INT 'acceleration' acc=INT)? |
-       'turn' turnDir=LeftRight degrees=INT ('with speed' spd=INT 'acceleration' acc=INT)? |
+       'turn' turnType=Turn ('with speed' spd=INT 'acceleration' acc=INT)? |
        {Action} 'measure'|
        'wait' time=Time;
+       
+Turn:
+       turnDir=LeftRight 'exactly' degrees=INT 'degrees'|
+       'randomly' start=INT 'to' end=INT 'degrees'
+;
 
 Time: time=INT 'ms' | {Time} 'forever';