StoppingExpression:
'(' op=Operator s+=StoppingExpression s+=StoppingExpression+ ')' |
- 'not ' negscond=StoppingCondition |
+ 'not ' negscond=StoppingExpression |
scond=StoppingCondition;
StoppingCondition:
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';