repositories
/
des2015.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
standard missions done
[des2015.git]
/
dsl
/
xtend
/
src
/
robots
/
missions
/
TaskDSL.xtext
diff --git
a/dsl/xtend/src/robots/missions/TaskDSL.xtext
b/dsl/xtend/src/robots/missions/TaskDSL.xtext
index
afefa5d
..
641e3c3
100644
(file)
--- 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+ ')' |
StoppingExpression:
'(' op=Operator s+=StoppingExpression s+=StoppingExpression+ ')' |
- 'not ' negscond=Stopping
Condit
ion |
+ 'not ' negscond=Stopping
Express
ion |
scond=StoppingCondition;
StoppingCondition:
scond=StoppingCondition;
StoppingCondition:
@@
-21,7
+21,8
@@
StoppingCondition:
'Touched on' touch=LeftRight |
'Light on' light=LeftRight |
'Distance dangerous at ' dist=BackFront |
'Touched on' touch=LeftRight |
'Light on' light=LeftRight |
'Distance dangerous at ' dist=BackFront |
- 'Color is' color=Color;
+ 'Color is' color=Color |
+ {StoppingCondition} 'Never';
Behaviour: 'Behaviour' name=ID
'take control:' tc=StoppingExpression?
Behaviour: 'Behaviour' name=ID
'take control:' tc=StoppingExpression?
@@
-29,14
+30,19
@@
Behaviour: 'Behaviour' name=ID
Action:
whichMotor=LeftRight 'motor' moveDir=Direction ('with speed' spd=INT 'acceleration' acc=INT)? |
Action:
whichMotor=LeftRight 'motor' moveDir=Direction ('with speed' spd=INT 'acceleration' acc=INT)? |
- 'turn' turn
Dir=LeftRight degrees=INT
('with speed' spd=INT 'acceleration' acc=INT)? |
-
{Action} 'measure'
|
+ 'turn' turn
Type=Turn
('with speed' spd=INT 'acceleration' acc=INT)? |
+
'measure' rl=RockLake
|
'wait' time=Time;
'wait' time=Time;
+
+Turn:
+ turnDir=LeftRight 'exactly' degrees=INT 'degrees'|
+ 'randomly' start=INT 'to' end=INT 'degrees'
+;
Time: time=INT 'ms' | {Time} 'forever';
RockLake: d=RockLakeE;
Time: time=INT 'ms' | {Time} 'forever';
RockLake: d=RockLakeE;
-enum RockLakeE: ROCK='
rock' | LAKE='l
ake';
+enum RockLakeE: ROCK='
Rock' | LAKE='L
ake';
Direction: d=DirectionE;
enum DirectionE: BACKWARDS = 'backward' | FORWARDS = 'forward';
Operator: d=OperatorE;
Direction: d=DirectionE;
enum DirectionE: BACKWARDS = 'backward' | FORWARDS = 'forward';
Operator: d=OperatorE;