--- /dev/null
+grammar robots.missions.TaskDSL with org.eclipse.xtext.common.Terminals
+
+generate taskDSL "http://www.missions.robots/TaskDSL"
+
+Robot:
+ 'Name' name=ID
+ 'Acceleration' acc=INT
+ 'Speed' spd=INT
+ behaviour+=Behaviour+
+ mission+=Mission+;
+
+Mission: 'Mission' name=ID 'using' behaviours+=[Behaviour]+ 'and stops when' stoppingExpression=StoppingExpression;
+
+StoppingExpression:
+ '(' op=Operator s+=StoppingExpression s+=StoppingExpression* ')' |
+ scond=StoppingCondition
+;
+
+StoppingCondition:
+ 'Collected at least' colors+=Color+ |
+ 'Touched on' touch=LeftRight |
+ 'Distance' op=Comparison dist=INT 'cm' |
+ 'Color is' color=Color;
+
+Behaviour: 'Behaviour' name=ID
+ 'take control:' tc=StoppingExpression?
+ 'action:' actions+=Action+;
+
+Action:
+ whichMotor=LeftRight 'motor' dir=Direction ('with speed' spd=INT 'acceleration' acc=INT)? |
+ 'wait' time=Time;
+
+Time: time=INT 'ms' | {Time} 'forever';
+
+enum Direction: BACKWARDS = 'Backwards' | FORWARDS = 'Forwards';
+enum Operator: AND = 'and' | OR = 'or';
+enum Comparison: GE='>' | LE='<';
+enum LeftRight: LEFT='Left' | RIGHT='Right';
+enum Color:
+ 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