summaryrefslogtreecommitdiff
path: root/2003/i/buzz/src/automate/grammar.yy
diff options
context:
space:
mode:
Diffstat (limited to '2003/i/buzz/src/automate/grammar.yy')
-rw-r--r--2003/i/buzz/src/automate/grammar.yy14
1 files changed, 8 insertions, 6 deletions
diff --git a/2003/i/buzz/src/automate/grammar.yy b/2003/i/buzz/src/automate/grammar.yy
index f9b8d52..af57931 100644
--- a/2003/i/buzz/src/automate/grammar.yy
+++ b/2003/i/buzz/src/automate/grammar.yy
@@ -95,17 +95,19 @@ etape: '#' NUM { $$ = new Etape ($2); }
;
action: PRINT STRING { $$ = new ActionPrint (*$2); delete $2; }
- | INITIALISATION { $$ = new ActionInit ();}
+ | INITIALISATION { $$ = new ActionInitialisation ();}
| RECHERCHER { $$ = new ActionRechercher ();}
| ROTATION { $$ = new ActionRotation ();}
- | AVANCER_PALET { $$ = new ActionAvancerPalet ();}
+ | AVANCER_PALET { /*$$ = new ActionAvancerPalet ();*/ }
| NB_PALET_PILE { $$ = new ActionNbPaletPile ();}
| NB_PALET_STOCKE { $$ = new ActionNbPaletStocke ();}
| MISE_EN_PLACE { $$ = new ActionMiseEnPlace ();}
| REPERER_COULEUR NUM { $$ = new ActionRepererCouleur ($2);}
| RETOURNER { $$ = new ActionRetourner ();}
- | AVANCER NUM { $$ = new ActionAvancer ($2);}
- | RECULER NUM { $$ = new ActionReculer ($2);}
+ | AVANCER NUM { $$ = new ActionMotorGoDistance ($2); }
+ | AVANCER NUM NUM { $$ = new ActionMotorGoDistance ($2, $3); }
+ | RECULER NUM { $$ = new ActionMotorGoDistance (-$2); }
+ | RECULER NUM NUM { $$ = new ActionMotorGoDistance (-$2, $3); }
| PLACER_PINCE NUM { $$ = new ActionPlacerPince ($2);}
;
@@ -118,8 +120,8 @@ receptivite:
| COULEUR_ADVERSE NUM { $$ = new ReceptCouleurAdverse ($2); }
| PINCE_ANGLE NUM { $$ = new ReceptPinceAngle ($2); }
| PINCE_POS NUM { $$ = new ReceptPincePos ($2); }
- | ROBOT_RECULE { $$ = new ReceptRobotRecule (); }
- | ROBOT_AVANCE { $$ = new ReceptRobotAvance (); }
+ | ROBOT_RECULE { $$ = new ReceptMotorFinnish; }
+ | ROBOT_AVANCE { $$ = new ReceptMotorFinnish; }
| receptivite '&' receptivite
{ $$ = new ReceptiviteBoolOp ($1, '&', $3); }
| receptivite '|' receptivite