X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=dsl%2Fxtend%2Fsrc%2Frobots%2Fmissions%2FTaskDSL.xtext;h=14a834f42bf0cb8ad6cd42115d46bbbb167634fd;hb=1b13ccb59263b66abc763fb8f298b14bdebc9582;hp=35ed5b0b6e799c111ea3853d59ce2889785c97b8;hpb=08b6c73b2092b16b5dc1c0f2884d2e9c49c445af;p=des2015.git diff --git a/dsl/xtend/src/robots/missions/TaskDSL.xtext b/dsl/xtend/src/robots/missions/TaskDSL.xtext index 35ed5b0..14a834f 100644 --- a/dsl/xtend/src/robots/missions/TaskDSL.xtext +++ b/dsl/xtend/src/robots/missions/TaskDSL.xtext @@ -13,7 +13,7 @@ Mission: StoppingExpression: '(' op=Operator s+=StoppingExpression s+=StoppingExpression+ ')' | - 'not ' negscond=StoppingCondition | + 'not ' negscond=StoppingExpression | scond=StoppingCondition; StoppingCondition: @@ -29,9 +29,14 @@ Behaviour: 'Behaviour' name=ID Action: whichMotor=LeftRight 'motor' moveDir=Direction ('with speed' spd=INT 'acceleration' acc=INT)? | - 'turn' turnDir=LeftRight degrees=INT ('with speed' spd=INT 'acceleration' acc=INT)? | - 'measure' measureWhat=RockLake | + 'turn' turnType=Turn ('with speed' spd=INT 'acceleration' acc=INT)? | + {Action} 'measure'| 'wait' time=Time; + +Turn: + turnDir=LeftRight 'exactly' degrees=INT 'degrees'| + 'randomly' start=INT 'to' end=INT 'degrees' +; Time: time=INT 'ms' | {Time} 'forever';