From 9904293580850b6daf7b9884381d5284f859ae8a Mon Sep 17 00:00:00 2001 From: schodet Date: Tue, 27 May 2003 08:50:10 +0000 Subject: Petites modifs. --- 2003/i/buzz/src/automate/grammar.yy | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to '2003/i/buzz/src/automate/grammar.yy') 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 -- cgit v1.2.3