'Collected at least' colors+=Color+ |
'Touched on' touch=LeftRight |
'Light on' light=LeftRight |
- 'No object in sight on ' dist=BackFront |
+ 'Distance dangerous at ' dist=BackFront |
'Color is' color=Color;
Behaviour: 'Behaviour' name=ID
'action:' actions+=Action+;
Action:
- whichMotor=LeftRight 'motor' dir=Direction ('with speed' spd=INT 'acceleration' acc=INT)? |
- 'measure' measureWhat=RockLake |
+ whichMotor=LeftRight 'motor' moveDir=Direction ('with speed' spd=INT 'acceleration' acc=INT)? |
+ 'turn' turnDir=LeftRight degrees=INT ('with speed' spd=INT 'acceleration' acc=INT)? |
+ {Action} 'measure'|
'wait' time=Time;
Time: time=INT 'ms' | {Time} 'forever';
-
+
RockLake: d=RockLakeE;
enum RockLakeE: ROCK='rock' | LAKE='lake';
Direction: d=DirectionE;
enum DirectionE: BACKWARDS = 'backward' | FORWARDS = 'forward';
Operator: d=OperatorE;
-enum OperatorE: AND = 'and' | OR = 'or';
+enum OperatorE: AND = '&&' | OR = '||';
BackFront: d=BackFrontE;
enum BackFrontE: BACK = 'back' | FRONT = 'front';
-Comparison: d=ComparisonE;
-enum ComparisonE: GE='>' | LE='<';
LeftRight: d=LeftRightE;
enum LeftRightE: LEFT='left' | RIGHT='right';
Color: d=ColorE;