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.yy23
1 files changed, 9 insertions, 14 deletions
diff --git a/2003/i/buzz/src/automate/grammar.yy b/2003/i/buzz/src/automate/grammar.yy
index a780777..f9b8d52 100644
--- a/2003/i/buzz/src/automate/grammar.yy
+++ b/2003/i/buzz/src/automate/grammar.yy
@@ -37,7 +37,6 @@ Grafcet *input_grafcet;
%token ERR GOTO
%token EQ NEQ LEQ GEQ
-/*TOKEN des actions
%token INITIALISATION
%token RECHERCHER
%token ROTATION
@@ -52,7 +51,6 @@ Grafcet *input_grafcet;
%token PLACER_PINCE
%token PRINT
-/*TOKEN des conditions
%token INIT
%token PALETS_TROUVES
%token PALETS
@@ -71,7 +69,6 @@ Grafcet *input_grafcet;
%type <expression> expression
%type <fl> flnum
-/* Priorité des opérateurs. */
%left '|'
%left '&'
%left '!'
@@ -94,11 +91,9 @@ grafcet:
| grafcet transition { $$ = $1; $$->m_grafcet.push_back (Grafcet::Elem ($2)); }
;
-/* # represente un label ex : # 25
etape: '#' NUM { $$ = new Etape ($2); }
;
-/*met les actions ici puis defini une classe pour l'action (avec parametres)
action: PRINT STRING { $$ = new ActionPrint (*$2); delete $2; }
| INITIALISATION { $$ = new ActionInit ();}
| RECHERCHER { $$ = new ActionRechercher ();}
@@ -116,15 +111,15 @@ action: PRINT STRING { $$ = new ActionPrint (*$2); delete $2; }
receptivite:
BOOL { $$ = new ReceptiviteBool ($1); }
- | INIT { $$ = new ReceptInit (false); }
- | PALETS_TROUVES { $$ = new ReceptPaletsTrouves (false); }
- | PALETS NUM { $$ = new ReceptPalets (false,$2); }
- | STOCKE NUM { $$ = new ReceptStocke (false,$2); }
- | COULEUR_ADVERSE NUM { $$ = new ReceptCouleurAdverse (false,$2); }
- | PINCE_ANGLE NUM { $$ = new ReceptPinceAngle (false,$2); }
- | PINCE_POS NUM { $$ = new ReceptPincePos (false,$2); }
- | ROBOT_RECULE { $$ = new ReceptRobotRecule (false); }
- | ROBOT_AVANCE { $$ = new ReceptRobotAvance (false); }
+ | INIT { $$ = new ReceptInit (); }
+ | PALETS_TROUVES { $$ = new ReceptPaletsTrouves (); }
+ | PALETS NUM { $$ = new ReceptPalets ($2); }
+ | STOCKE NUM { $$ = new ReceptStocke ($2); }
+ | 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 (); }
| receptivite '&' receptivite
{ $$ = new ReceptiviteBoolOp ($1, '&', $3); }
| receptivite '|' receptivite