X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=dsl%2Fxtend%2Fsrc%2Frobots%2Fmissions%2FTaskDSL.xtext;h=afefa5df1a8758752b7ea82ea66ba0ddd9cc9f50;hb=3a12cfb82749c7ca2cec2d31da1b4d62ffe9e7e2;hp=1dd8afd47d524508fb33666f448f5dd361180a0f;hpb=34dae1e7f9c49481d90b3d26978cc5ab52ccc050;p=des2015.git diff --git a/dsl/xtend/src/robots/missions/TaskDSL.xtext b/dsl/xtend/src/robots/missions/TaskDSL.xtext index 1dd8afd..afefa5d 100644 --- a/dsl/xtend/src/robots/missions/TaskDSL.xtext +++ b/dsl/xtend/src/robots/missions/TaskDSL.xtext @@ -20,7 +20,7 @@ StoppingCondition: '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 @@ -28,22 +28,21 @@ 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;