StoppingExpression:
'(' op=Operator s+=StoppingExpression s+=StoppingExpression+ ')' |
- scond=StoppingCondition
-;
+ scond=StoppingCondition;
StoppingCondition:
'Collected at least' colors+=Color+ |
Behaviour: 'Behaviour' name=ID
'take control:' tc=StoppingExpression?
- 'action:' actions+=Action+;
+ 'action:' actions+=Action+ (clcColor='collect color')?;
Action:
whichMotor=LeftRight 'motor' dir=Direction ('with speed' spd=INT 'acceleration' acc=INT)? |
enum LeftRightE: LEFT='left' | RIGHT='right';
Color: d=ColorE;
enum ColorE:
- BLACK='Black' | BLUE='Blue' | BROWN='Brown' | CYAN='Cyan' |
- DARKGRAY='DarkGray' | GRAY='Gray' | GREEN='Green' |
- LIGHTGRAY='LightGray' | MAGENTA='Magenta' | ORANGE='Orange' | PINK='Pink' |
- RED='Red' | WHITE='White' | YELLOW='Yellow';
\ No newline at end of file
+ RED='Red' | GREEN='Green' | BLUE='Blue' | YELLOW='Yellow' |
+ MAGENTA='Magenta'| ORANGE='Orange'| WHITE='White' | BLACK='Black' |
+ PINK='Pink' | GRAY='Gray' | LIGHTGRAY='LightGray' |
+ DARKGRAY='DarkGray' | CYAN='Cyan' | BROWN='Brown';
\ No newline at end of file