scond=StoppingCondition;
StoppingCondition:
- 'Collected at least' colors+=Color+ |
+ 'flag set' varName=ID |
'Touched on' touch=LeftRight |
'Light on' light=LeftRight |
'Distance dangerous at ' dist=BackFront |
'Color is' color=Color |
{StoppingCondition} 'Never';
-Behaviour: 'Behaviour' name=ID
+Behaviour: 'Behaviour' name=ID
'take control:' tc=StoppingExpression?
- 'action:' actions+=Action+;
+ 'action:' actions+=Action+
+ ;
Action:
whichMotor=LeftRight 'motor' moveDir=Direction ('with speed' spd=INT 'acceleration' acc=INT)? |
'turn' turnType=Turn ('with speed' spd=INT 'acceleration' acc=INT)? |
'measure' rl=RockLake|
- 'wait' time=Time;
+ 'wait' time=Time |
+ 'set flag' varName=ID;
Turn:
turnDir=LeftRight 'exactly' degrees=INT 'degrees'|