3 $Id: solpip_parse.y 23065 2016-03-02 09:05:50Z coelho $
5 Copyright 1989-2016 MINES ParisTech
7 This file is part of PIPS.
9 PIPS is free software: you can redistribute it and/or modify it
10 under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
14 PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with PIPS. If not, see <http://www.gnu.org/licenses/>.
25 /* Name : solpip_parse.y
27 * Author : F. Lamour, F. Dumontet
28 * Date : 25 march 1993
29 * Historic : 2 august 93, moved into (package) paf-util, AP
33 * Grammaire Yacc pour interpreter une solution fournie par PIP en un "quast
39 #include "pips_config.h"
50 #include "arithmetique.h"
52 #include "contrainte.h"
62 #include "constants.h"
65 #include "bootstrap.h"
79 %token <valeur> ENTIER
81 %token LST LPAR RPAR LCRO RCRO DIES IF NEWPARM DIV DIV_OP MOINS_OP
82 %type <valeur> coefficient
91 /* Les regles de grammaire definissant une solution de PIP */
94 quast_sol : LPAR LPAR commentaire RPAR
107 commentaire LPAR commentaire RPAR commentaire
120 | nouveau_parametre super_quast
122 retire_par_de_pile();
129 creer_quast_value ();
149 init_liste_vecteur ();
155 nouveau_parametre : NEWPARM ENTIER LPAR DIV vecteur2 ENTIER RPAR RPAR
157 printf("nouveau_parametre1");
158 ajoute_new_var( $6 , $2 );
163 liste_vecteur : vecteur
164 | liste_vecteur vecteur
172 liste_coefficient RCRO
174 ecrit_liste_vecteur();
178 liste_coefficient : coefficient {}
179 | liste_coefficient coefficient
183 coefficient : MOINS_OP ENTIER
185 ecrit_une_var_neg( $2 );
197 liste_coefficient2 RCRO
200 liste_coefficient2: coefficient2
201 | liste_coefficient2 coefficient2
205 coefficient2 : MOINS_OP ENTIER
207 ecrit_coeff_neg2 ( $2 );
216 liste_coefficient1 RCRO
219 liste_coefficient1: coefficient1
220 | liste_coefficient1 coefficient1
224 coefficient1 : MOINS_OP ENTIER
226 ecrit_coeff1 ( -$2 );
237 void yyerror(char* s)