Debian Codegraph @

external/glpk/glpmpl01.c

raw symbols SCIP
1 /* glpmpl01.c */cxx . . $ `<file>/external/glpk/glpmpl01.c`/
2
3 /***********************************************************************
4 * This code is part of GLPK (GNU Linear Programming Kit).
5 *
6 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
7 * 2009, 2010 Andrew Makhorin, Department for Applied Informatics,
8 * Moscow Aviation Institute, Moscow, Russia. All rights reserved.
9 * E-mail: <[email protected]>.
10 *
11 * GLPK is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by
13 * the Free Software Foundation, either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * GLPK is distributed in the hope that it will be useful, but WITHOUT
17 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
19 * License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with GLPK. If not, see <http://www.gnu.org/licenses/>.
23 ***********************************************************************/
24
25 #define _GLPSTD_STDIOcxx . . $ `external/glpk/glpmpl01.c:25:9`!
26 #include "glpmpl.h"cxx . . $ `<file>/external/glpk/glpmpl.h`/
27 #define dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`! dmp_get_atomcxx . . $ `external/glpk/glpdmp.h:62:9`!
28
29 /**********************************************************************/
30 /* * * PROCESSING MODEL SECTION * * */
31 /**********************************************************************/
32
33 /*----------------------------------------------------------------------
34 -- enter_context - enter current token into context queue.
35 --
36 -- This routine enters the current token into the context queue. */
37
38 void enter_contextcxx . . $ `external/glpk/glpmpl.h:333:9`!(MPLcxx . . $ MPL# *mpl)
39 { char *image, *s;
40 if (mpl->tokencxx . . $ MPL#token. == T_EOFcxx . . $ `external/glpk/glpmpl.h:128:9`!)
41 image = "_|_";
42 else if (mpl->tokencxx . . $ MPL#token. == T_STRINGcxx . . $ `external/glpk/glpmpl.h:132:9`!)
43 image = "'...'";
44 else
45 image = mpl->imagecxx . . $ MPL#image.;
46 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(0 <= mpl->c_ptr && mpl->c_ptr < CONTEXT_SIZEcxx . . $ `external/glpk/glpmpl.h:112:9`!);
47 mpl->contextcxx . . $ MPL#context.[mpl->c_ptrcxx . . $ MPL#c_ptr.++] = ' ';
48 if (mpl->c_ptrcxx . . $ MPL#c_ptr. == CONTEXT_SIZEcxx . . $ `external/glpk/glpmpl.h:112:9`!) mpl->c_ptrcxx . . $ MPL#c_ptr. = 0;
49 for (s = image; *s != '\0'; s++)
50 { mpl->contextcxx . . $ MPL#context.[mpl->c_ptrcxx . . $ MPL#c_ptr.++] = *s;
51 if (mpl->c_ptrcxx . . $ MPL#c_ptr. == CONTEXT_SIZEcxx . . $ `external/glpk/glpmpl.h:112:9`!) mpl->c_ptrcxx . . $ MPL#c_ptr. = 0;
52 }
53 return;
54 }
55
56 /*----------------------------------------------------------------------
57 -- print_context - print current content of context queue.
58 --
59 -- This routine prints current content of the context queue. */
60
61 void print_contextcxx . . $ `external/glpk/glpmpl.h:337:9`!(MPLcxx . . $ MPL# *mpl)
62 { int c;
63 while (mpl->c_ptrcxx . . $ MPL#c_ptr. > 0)
64 { mpl->c_ptrcxx . . $ MPL#c_ptr.--;
65 c = mpl->contextcxx . . $ MPL#context.[0];
66 memmovecxx . . $ memmove(cc817cb175f282d).(mpl->contextcxx . . $ MPL#context., mpl->contextcxx . . $ MPL#context.+1, CONTEXT_SIZEcxx . . $ `external/glpk/glpmpl.h:112:9`!-1);
67 mpl->contextcxx . . $ MPL#context.[CONTEXT_SIZEcxx . . $ `external/glpk/glpmpl.h:112:9`!-1] = (char)c;
68 }
69 xprintfcxx . . $ `external/glpk/glpenv.h:145:9`!("Context: %s%.*s\n", mpl->contextcxx . . $ MPL#context.[0] == ' ' ? "" : "...",
70 CONTEXT_SIZEcxx . . $ `external/glpk/glpmpl.h:112:9`!, mpl->contextcxx . . $ MPL#context.);
71 return;
72 }
73
74 /*----------------------------------------------------------------------
75 -- get_char - scan next character from input text file.
76 --
77 -- This routine scans a next ASCII character from the input text file.
78 -- In case of end-of-file, the character is assigned EOF. */
79
80 void get_charcxx . . $ `external/glpk/glpmpl.h:341:9`!(MPLcxx . . $ MPL# *mpl)
81 { int c;
82 if (mpl->ccxx . . $ MPL#c. == EOFcxx . . $ `<external>/232824719582829767/stdio.h:105:9`!) goto done;
83 if (mpl->ccxx . . $ MPL#c. == '\n') mpl->linecxx . . $ MPL#line.++;
84 c = read_charcxx . . $ `external/glpk/glpmpl.h:2439:9`!(mpl);
85 if (c == EOFcxx . . $ `<external>/232824719582829767/stdio.h:105:9`!)
86 { if (mpl->ccxx . . $ MPL#c. == '\n')
87 mpl->linecxx . . $ MPL#line.--;
88 else
89 warningcxx . . $ `external/glpk/glpmpl.h:2485:9`!(mpl, "final NL missing before end of file");
90 }
91 else if (c == '\n')
92 ;
93 else if (isspacecxx . . $ `<external>/17904084882347303253/ctype.h:197:10`!(c))
94 c = ' ';
95 else if (iscntrlcxx . . $ `<external>/17904084882347303253/ctype.h:191:10`!(c))
96 { enter_contextcxx . . $ `external/glpk/glpmpl.h:333:9`!(mpl);
97 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "control character 0x%02X not allowed", c);
98 }
99 mpl->ccxx . . $ MPL#c. = c;
100 done: return;
101 }
102
103 /*----------------------------------------------------------------------
104 -- append_char - append character to current token.
105 --
106 -- This routine appends the current character to the current token and
107 -- then scans a next character. */
108
109 void append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(MPLcxx . . $ MPL# *mpl)
110 { xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(0 <= mpl->imlen && mpl->imlen <= MAX_LENGTHcxx . . $ `external/glpk/glpmpl.h:107:9`!);
111 if (mpl->imlencxx . . $ MPL#imlen. == MAX_LENGTHcxx . . $ `external/glpk/glpmpl.h:107:9`!)
112 { switch (mpl->tokencxx . . $ MPL#token.)
113 { case T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!:
114 enter_contextcxx . . $ `external/glpk/glpmpl.h:333:9`!(mpl);
115 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "symbolic name %s... too long", mpl->imagecxx . . $ MPL#image.);
116 case T_SYMBOLcxx . . $ `external/glpk/glpmpl.h:130:9`!:
117 enter_contextcxx . . $ `external/glpk/glpmpl.h:333:9`!(mpl);
118 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "symbol %s... too long", mpl->imagecxx . . $ MPL#image.);
119 case T_NUMBERcxx . . $ `external/glpk/glpmpl.h:131:9`!:
120 enter_contextcxx . . $ `external/glpk/glpmpl.h:333:9`!(mpl);
121 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "numeric literal %s... too long", mpl->imagecxx . . $ MPL#image.);
122 case T_STRINGcxx . . $ `external/glpk/glpmpl.h:132:9`!:
123 enter_contextcxx . . $ `external/glpk/glpmpl.h:333:9`!(mpl);
124 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "string literal too long");
125 default:
126 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl != mpl);
127 }
128 }
129 mpl->imagecxx . . $ MPL#image.[mpl->imlencxx . . $ MPL#imlen.++] = (char)mpl->ccxx . . $ MPL#c.;
130 mpl->imagecxx . . $ MPL#image.[mpl->imlencxx . . $ MPL#imlen.] = '\0';
131 get_charcxx . . $ `external/glpk/glpmpl.h:341:9`!(mpl);
132 return;
133 }
134
135 /*----------------------------------------------------------------------
136 -- get_token - scan next token from input text file.
137 --
138 -- This routine scans a next token from the input text file using the
139 -- standard finite automation technique. */
140
141 void get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(MPLcxx . . $ MPL# *mpl)
142 { /* save the current token */
143 mpl->b_tokencxx . . $ MPL#b_token. = mpl->tokencxx . . $ MPL#token.;
144 mpl->b_imlencxx . . $ MPL#b_imlen. = mpl->imlencxx . . $ MPL#imlen.;
145 strcpycxx . . $ strcpy(b7b3a83273496486).(mpl->b_imagecxx . . $ MPL#b_image., mpl->imagecxx . . $ MPL#image.);
146 mpl->b_valuecxx . . $ MPL#b_value. = mpl->valuecxx . . $ MPL#value.;
147 /* if the next token is already scanned, make it current */
148 if (mpl->f_scancxx . . $ MPL#f_scan.)
149 { mpl->f_scancxx . . $ MPL#f_scan. = 0;
150 mpl->tokencxx . . $ MPL#token. = mpl->f_tokencxx . . $ MPL#f_token.;
151 mpl->imlencxx . . $ MPL#imlen. = mpl->f_imlencxx . . $ MPL#f_imlen.;
152 strcpycxx . . $ strcpy(b7b3a83273496486).(mpl->imagecxx . . $ MPL#image., mpl->f_imagecxx . . $ MPL#f_image.);
153 mpl->valuecxx . . $ MPL#value. = mpl->f_valuecxx . . $ MPL#f_value.;
154 goto done;
155 }
156 loop: /* nothing has been scanned so far */
157 mpl->tokencxx . . $ MPL#token. = 0;
158 mpl->imlencxx . . $ MPL#imlen. = 0;
159 mpl->imagecxx . . $ MPL#image.[0] = '\0';
160 mpl->valuecxx . . $ MPL#value. = 0.0;
161 /* skip any uninteresting characters */
162 while (mpl->ccxx . . $ MPL#c. == ' ' || mpl->ccxx . . $ MPL#c. == '\n') get_charcxx . . $ `external/glpk/glpmpl.h:341:9`!(mpl);
163 /* recognize and construct the token */
164 if (mpl->ccxx . . $ MPL#c. == EOFcxx . . $ `<external>/232824719582829767/stdio.h:105:9`!)
165 { /* end-of-file reached */
166 mpl->tokencxx . . $ MPL#token. = T_EOFcxx . . $ `external/glpk/glpmpl.h:128:9`!;
167 }
168 else if (mpl->ccxx . . $ MPL#c. == '#')
169 { /* comment; skip anything until end-of-line */
170 while (mpl->ccxx . . $ MPL#c. != '\n' && mpl->ccxx . . $ MPL#c. != EOFcxx . . $ `<external>/232824719582829767/stdio.h:105:9`!) get_charcxx . . $ `external/glpk/glpmpl.h:341:9`!(mpl);
171 goto loop;
172 }
173 else if (!mpl->flag_dcxx . . $ MPL#flag_d. && (isalphacxx . . $ `<external>/17904084882347303253/ctype.h:190:10`!(mpl->c) || mpl->ccxx . . $ MPL#c. == '_'))
174 { /* symbolic name or reserved keyword */
175 mpl->tokencxx . . $ MPL#token. = T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!;
176 while (isalnumcxx . . $ `<external>/17904084882347303253/ctype.h:189:10`!(mpl->c) || mpl->ccxx . . $ MPL#c. == '_') append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
177 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "and") == 0)
178 mpl->tokencxx . . $ MPL#token. = T_ANDcxx . . $ `external/glpk/glpmpl.h:133:9`!;
179 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "by") == 0)
180 mpl->tokencxx . . $ MPL#token. = T_BYcxx . . $ `external/glpk/glpmpl.h:134:9`!;
181 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "cross") == 0)
182 mpl->tokencxx . . $ MPL#token. = T_CROSScxx . . $ `external/glpk/glpmpl.h:135:9`!;
183 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "diff") == 0)
184 mpl->tokencxx . . $ MPL#token. = T_DIFFcxx . . $ `external/glpk/glpmpl.h:136:9`!;
185 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "div") == 0)
186 mpl->tokencxx . . $ MPL#token. = T_DIVcxx . . $ `external/glpk/glpmpl.h:137:9`!;
187 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "else") == 0)
188 mpl->tokencxx . . $ MPL#token. = T_ELSEcxx . . $ `external/glpk/glpmpl.h:138:9`!;
189 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "if") == 0)
190 mpl->tokencxx . . $ MPL#token. = T_IFcxx . . $ `external/glpk/glpmpl.h:139:9`!;
191 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "in") == 0)
192 mpl->tokencxx . . $ MPL#token. = T_INcxx . . $ `external/glpk/glpmpl.h:140:9`!;
193 #if 1 /* 21/VII-2006 */
194 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "Infinity") == 0)
195 mpl->tokencxx . . $ MPL#token. = T_INFINITYcxx . . $ `external/glpk/glpmpl.h:141:9`!;
196 #endif
197 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "inter") == 0)
198 mpl->tokencxx . . $ MPL#token. = T_INTERcxx . . $ `external/glpk/glpmpl.h:142:9`!;
199 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "less") == 0)
200 mpl->tokencxx . . $ MPL#token. = T_LESScxx . . $ `external/glpk/glpmpl.h:143:9`!;
201 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "mod") == 0)
202 mpl->tokencxx . . $ MPL#token. = T_MODcxx . . $ `external/glpk/glpmpl.h:144:9`!;
203 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "not") == 0)
204 mpl->tokencxx . . $ MPL#token. = T_NOTcxx . . $ `external/glpk/glpmpl.h:145:9`!;
205 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "or") == 0)
206 mpl->tokencxx . . $ MPL#token. = T_ORcxx . . $ `external/glpk/glpmpl.h:146:9`!;
207 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "s") == 0 && mpl->ccxx . . $ MPL#c. == '.')
208 { mpl->tokencxx . . $ MPL#token. = T_SPTPcxx . . $ `external/glpk/glpmpl.h:147:9`!;
209 append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
210 if (mpl->ccxx . . $ MPL#c. != 't')
211 sptp: { enter_contextcxx . . $ `external/glpk/glpmpl.h:333:9`!(mpl);
212 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "keyword s.t. incomplete");
213 }
214 append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
215 if (mpl->ccxx . . $ MPL#c. != '.') goto sptp;
216 append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
217 }
218 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "symdiff") == 0)
219 mpl->tokencxx . . $ MPL#token. = T_SYMDIFFcxx . . $ `external/glpk/glpmpl.h:148:9`!;
220 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "then") == 0)
221 mpl->tokencxx . . $ MPL#token. = T_THENcxx . . $ `external/glpk/glpmpl.h:149:9`!;
222 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "union") == 0)
223 mpl->tokencxx . . $ MPL#token. = T_UNIONcxx . . $ `external/glpk/glpmpl.h:150:9`!;
224 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "within") == 0)
225 mpl->tokencxx . . $ MPL#token. = T_WITHINcxx . . $ `external/glpk/glpmpl.h:151:9`!;
226 }
227 else if (!mpl->flag_dcxx . . $ MPL#flag_d. && isdigitcxx . . $ `<external>/17904084882347303253/ctype.h:192:10`!(mpl->c))
228 { /* numeric literal */
229 mpl->tokencxx . . $ MPL#token. = T_NUMBERcxx . . $ `external/glpk/glpmpl.h:131:9`!;
230 /* scan integer part */
231 while (isdigitcxx . . $ `<external>/17904084882347303253/ctype.h:192:10`!(mpl->c)) append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
232 /* scan optional fractional part */
233 if (mpl->ccxx . . $ MPL#c. == '.')
234 { append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
235 if (mpl->ccxx . . $ MPL#c. == '.')
236 { /* hmm, it is not the fractional part, it is dots that
237 follow the integer part */
238 mpl->imlencxx . . $ MPL#imlen.--;
239 mpl->imagecxx . . $ MPL#image.[mpl->imlencxx . . $ MPL#imlen.] = '\0';
240 mpl->f_dotscxx . . $ MPL#f_dots. = 1;
241 goto conv;
242 }
243 frac: while (isdigitcxx . . $ `<external>/17904084882347303253/ctype.h:192:10`!(mpl->c)) append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
244 }
245 /* scan optional decimal exponent */
246 if (mpl->ccxx . . $ MPL#c. == 'e' || mpl->ccxx . . $ MPL#c. == 'E')
247 { append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
248 if (mpl->ccxx . . $ MPL#c. == '+' || mpl->ccxx . . $ MPL#c. == '-') append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
249 if (!isdigitcxx . . $ `<external>/17904084882347303253/ctype.h:192:10`!(mpl->c))
250 { enter_contextcxx . . $ `external/glpk/glpmpl.h:333:9`!(mpl);
251 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "numeric literal %s incomplete", mpl->imagecxx . . $ MPL#image.);
252 }
253 while (isdigitcxx . . $ `<external>/17904084882347303253/ctype.h:192:10`!(mpl->c)) append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
254 }
255 /* there must be no letter following the numeric literal */
256 if (isalphacxx . . $ `<external>/17904084882347303253/ctype.h:190:10`!(mpl->c) || mpl->ccxx . . $ MPL#c. == '_')
257 { enter_contextcxx . . $ `external/glpk/glpmpl.h:333:9`!(mpl);
258 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "symbol %s%c... should be enclosed in quotes",
259 mpl->imagecxx . . $ MPL#image., mpl->ccxx . . $ MPL#c.);
260 }
261 conv: /* convert numeric literal to floating-point */
262 if (str2numcxx . . $ `external/glpk/glplib.h:85:9`!(mpl->imagecxx . . $ MPL#image., &mpl->valuecxx . . $ MPL#value.))
263 err: { enter_contextcxx . . $ `external/glpk/glpmpl.h:333:9`!(mpl);
264 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "cannot convert numeric literal %s to floating-p"
265 "oint number", mpl->imagecxx . . $ MPL#image.);
266 }
267 }
268 else if (mpl->ccxx . . $ MPL#c. == '\'' || mpl->ccxx . . $ MPL#c. == '"')
269 { /* character string */
270 int quote = mpl->ccxx . . $ MPL#c.;
271 mpl->tokencxx . . $ MPL#token. = T_STRINGcxx . . $ `external/glpk/glpmpl.h:132:9`!;
272 get_charcxx . . $ `external/glpk/glpmpl.h:341:9`!(mpl);
273 for (;;)
274 { if (mpl->ccxx . . $ MPL#c. == '\n' || mpl->ccxx . . $ MPL#c. == EOFcxx . . $ `<external>/232824719582829767/stdio.h:105:9`!)
275 { enter_contextcxx . . $ `external/glpk/glpmpl.h:333:9`!(mpl);
276 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "unexpected end of line; string literal incom"
277 "plete");
278 }
279 if (mpl->ccxx . . $ MPL#c. == quote)
280 { get_charcxx . . $ `external/glpk/glpmpl.h:341:9`!(mpl);
281 if (mpl->ccxx . . $ MPL#c. != quote) break;
282 }
283 append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
284 }
285 }
286 else if (!mpl->flag_dcxx . . $ MPL#flag_d. && mpl->ccxx . . $ MPL#c. == '+')
287 mpl->tokencxx . . $ MPL#token. = T_PLUScxx . . $ `external/glpk/glpmpl.h:152:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
288 else if (!mpl->flag_dcxx . . $ MPL#flag_d. && mpl->ccxx . . $ MPL#c. == '-')
289 mpl->tokencxx . . $ MPL#token. = T_MINUScxx . . $ `external/glpk/glpmpl.h:153:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
290 else if (mpl->ccxx . . $ MPL#c. == '*')
291 { mpl->tokencxx . . $ MPL#token. = T_ASTERISKcxx . . $ `external/glpk/glpmpl.h:154:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
292 if (mpl->ccxx . . $ MPL#c. == '*')
293 mpl->tokencxx . . $ MPL#token. = T_POWERcxx . . $ `external/glpk/glpmpl.h:156:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
294 }
295 else if (mpl->ccxx . . $ MPL#c. == '/')
296 { mpl->tokencxx . . $ MPL#token. = T_SLASHcxx . . $ `external/glpk/glpmpl.h:155:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
297 if (mpl->ccxx . . $ MPL#c. == '*')
298 { /* comment sequence */
299 get_charcxx . . $ `external/glpk/glpmpl.h:341:9`!(mpl);
300 for (;;)
301 { if (mpl->ccxx . . $ MPL#c. == EOFcxx . . $ `<external>/232824719582829767/stdio.h:105:9`!)
302 { /* do not call enter_context at this point */
303 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "unexpected end of file; comment sequence "
304 "incomplete");
305 }
306 else if (mpl->ccxx . . $ MPL#c. == '*')
307 { get_charcxx . . $ `external/glpk/glpmpl.h:341:9`!(mpl);
308 if (mpl->ccxx . . $ MPL#c. == '/') break;
309 }
310 else
311 get_charcxx . . $ `external/glpk/glpmpl.h:341:9`!(mpl);
312 }
313 get_charcxx . . $ `external/glpk/glpmpl.h:341:9`!(mpl);
314 goto loop;
315 }
316 }
317 else if (mpl->ccxx . . $ MPL#c. == '^')
318 mpl->tokencxx . . $ MPL#token. = T_POWERcxx . . $ `external/glpk/glpmpl.h:156:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
319 else if (mpl->ccxx . . $ MPL#c. == '<')
320 { mpl->tokencxx . . $ MPL#token. = T_LTcxx . . $ `external/glpk/glpmpl.h:157:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
321 if (mpl->ccxx . . $ MPL#c. == '=')
322 mpl->tokencxx . . $ MPL#token. = T_LEcxx . . $ `external/glpk/glpmpl.h:158:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
323 else if (mpl->ccxx . . $ MPL#c. == '>')
324 mpl->tokencxx . . $ MPL#token. = T_NEcxx . . $ `external/glpk/glpmpl.h:162:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
325 #if 1 /* 11/II-2008 */
326 else if (mpl->ccxx . . $ MPL#c. == '-')
327 mpl->tokencxx . . $ MPL#token. = T_INPUTcxx . . $ `external/glpk/glpmpl.h:179:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
328 #endif
329 }
330 else if (mpl->ccxx . . $ MPL#c. == '=')
331 { mpl->tokencxx . . $ MPL#token. = T_EQcxx . . $ `external/glpk/glpmpl.h:159:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
332 if (mpl->ccxx . . $ MPL#c. == '=') append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
333 }
334 else if (mpl->ccxx . . $ MPL#c. == '>')
335 { mpl->tokencxx . . $ MPL#token. = T_GTcxx . . $ `external/glpk/glpmpl.h:161:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
336 if (mpl->ccxx . . $ MPL#c. == '=')
337 mpl->tokencxx . . $ MPL#token. = T_GEcxx . . $ `external/glpk/glpmpl.h:160:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
338 #if 1 /* 14/VII-2006 */
339 else if (mpl->ccxx . . $ MPL#c. == '>')
340 mpl->tokencxx . . $ MPL#token. = T_APPENDcxx . . $ `external/glpk/glpmpl.h:177:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
341 #endif
342 }
343 else if (mpl->ccxx . . $ MPL#c. == '!')
344 { mpl->tokencxx . . $ MPL#token. = T_NOTcxx . . $ `external/glpk/glpmpl.h:145:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
345 if (mpl->ccxx . . $ MPL#c. == '=')
346 mpl->tokencxx . . $ MPL#token. = T_NEcxx . . $ `external/glpk/glpmpl.h:162:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
347 }
348 else if (mpl->ccxx . . $ MPL#c. == '&')
349 { mpl->tokencxx . . $ MPL#token. = T_CONCATcxx . . $ `external/glpk/glpmpl.h:163:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
350 if (mpl->ccxx . . $ MPL#c. == '&')
351 mpl->tokencxx . . $ MPL#token. = T_ANDcxx . . $ `external/glpk/glpmpl.h:133:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
352 }
353 else if (mpl->ccxx . . $ MPL#c. == '|')
354 { mpl->tokencxx . . $ MPL#token. = T_BARcxx . . $ `external/glpk/glpmpl.h:164:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
355 if (mpl->ccxx . . $ MPL#c. == '|')
356 mpl->tokencxx . . $ MPL#token. = T_ORcxx . . $ `external/glpk/glpmpl.h:146:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
357 }
358 else if (!mpl->flag_dcxx . . $ MPL#flag_d. && mpl->ccxx . . $ MPL#c. == '.')
359 { mpl->tokencxx . . $ MPL#token. = T_POINTcxx . . $ `external/glpk/glpmpl.h:165:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
360 if (mpl->f_dotscxx . . $ MPL#f_dots.)
361 { /* dots; the first dot was read on the previous call to the
362 scanner, so the current character is the second dot */
363 mpl->tokencxx . . $ MPL#token. = T_DOTScxx . . $ `external/glpk/glpmpl.h:170:9`!;
364 mpl->imlencxx . . $ MPL#imlen. = 2;
365 strcpycxx . . $ strcpy(b7b3a83273496486).(mpl->imagecxx . . $ MPL#image., "..");
366 mpl->f_dotscxx . . $ MPL#f_dots. = 0;
367 }
368 else if (mpl->ccxx . . $ MPL#c. == '.')
369 mpl->tokencxx . . $ MPL#token. = T_DOTScxx . . $ `external/glpk/glpmpl.h:170:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
370 else if (isdigitcxx . . $ `<external>/17904084882347303253/ctype.h:192:10`!(mpl->c))
371 { /* numeric literal that begins with the decimal point */
372 mpl->tokencxx . . $ MPL#token. = T_NUMBERcxx . . $ `external/glpk/glpmpl.h:131:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
373 goto frac;
374 }
375 }
376 else if (mpl->ccxx . . $ MPL#c. == ',')
377 mpl->tokencxx . . $ MPL#token. = T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
378 else if (mpl->ccxx . . $ MPL#c. == ':')
379 { mpl->tokencxx . . $ MPL#token. = T_COLONcxx . . $ `external/glpk/glpmpl.h:167:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
380 if (mpl->ccxx . . $ MPL#c. == '=')
381 mpl->tokencxx . . $ MPL#token. = T_ASSIGNcxx . . $ `external/glpk/glpmpl.h:169:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
382 }
383 else if (mpl->ccxx . . $ MPL#c. == ';')
384 mpl->tokencxx . . $ MPL#token. = T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
385 else if (mpl->ccxx . . $ MPL#c. == '(')
386 mpl->tokencxx . . $ MPL#token. = T_LEFTcxx . . $ `external/glpk/glpmpl.h:171:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
387 else if (mpl->ccxx . . $ MPL#c. == ')')
388 mpl->tokencxx . . $ MPL#token. = T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
389 else if (mpl->ccxx . . $ MPL#c. == '[')
390 mpl->tokencxx . . $ MPL#token. = T_LBRACKETcxx . . $ `external/glpk/glpmpl.h:173:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
391 else if (mpl->ccxx . . $ MPL#c. == ']')
392 mpl->tokencxx . . $ MPL#token. = T_RBRACKETcxx . . $ `external/glpk/glpmpl.h:174:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
393 else if (mpl->ccxx . . $ MPL#c. == '{')
394 mpl->tokencxx . . $ MPL#token. = T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
395 else if (mpl->ccxx . . $ MPL#c. == '}')
396 mpl->tokencxx . . $ MPL#token. = T_RBRACEcxx . . $ `external/glpk/glpmpl.h:176:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
397 #if 1 /* 11/II-2008 */
398 else if (mpl->ccxx . . $ MPL#c. == '~')
399 mpl->tokencxx . . $ MPL#token. = T_TILDEcxx . . $ `external/glpk/glpmpl.h:178:9`!, append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
400 #endif
401 else if (isalnumcxx . . $ `<external>/17904084882347303253/ctype.h:189:10`!(mpl->c) || strchrcxx . . $ strchr(2050848944e00d54).("+-._", mpl->ccxx . . $ MPL#c.) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
402 { /* symbol */
403 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->flag_d);
404 mpl->tokencxx . . $ MPL#token. = T_SYMBOLcxx . . $ `external/glpk/glpmpl.h:130:9`!;
405 while (isalnumcxx . . $ `<external>/17904084882347303253/ctype.h:189:10`!(mpl->c) || strchrcxx . . $ strchr(2050848944e00d54).("+-._", mpl->ccxx . . $ MPL#c.) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
406 append_charcxx . . $ `external/glpk/glpmpl.h:345:9`!(mpl);
407 switch (str2numcxx . . $ `external/glpk/glplib.h:85:9`!(mpl->imagecxx . . $ MPL#image., &mpl->valuecxx . . $ MPL#value.))
408 { case 0:
409 mpl->tokencxx . . $ MPL#token. = T_NUMBERcxx . . $ `external/glpk/glpmpl.h:131:9`!;
410 break;
411 case 1:
412 goto err;
413 case 2:
414 break;
415 default:
416 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl != mpl);
417 }
418 }
419 else
420 { enter_contextcxx . . $ `external/glpk/glpmpl.h:333:9`!(mpl);
421 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "character %c not allowed", mpl->ccxx . . $ MPL#c.);
422 }
423 /* enter the current token into the context queue */
424 enter_contextcxx . . $ `external/glpk/glpmpl.h:333:9`!(mpl);
425 /* reset the flag, which may be set by indexing_expression() and
426 is used by expression_list() */
427 mpl->flag_xcxx . . $ MPL#flag_x. = 0;
428 done: return;
429 }
430
431 /*----------------------------------------------------------------------
432 -- unget_token - return current token back to input stream.
433 --
434 -- This routine returns the current token back to the input stream, so
435 -- the previously scanned token becomes the current one. */
436
437 void unget_tokencxx . . $ `external/glpk/glpmpl.h:353:9`!(MPLcxx . . $ MPL# *mpl)
438 { /* save the current token, which becomes the next one */
439 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(!mpl->f_scan);
440 mpl->f_scancxx . . $ MPL#f_scan. = 1;
441 mpl->f_tokencxx . . $ MPL#f_token. = mpl->tokencxx . . $ MPL#token.;
442 mpl->f_imlencxx . . $ MPL#f_imlen. = mpl->imlencxx . . $ MPL#imlen.;
443 strcpycxx . . $ strcpy(b7b3a83273496486).(mpl->f_imagecxx . . $ MPL#f_image., mpl->imagecxx . . $ MPL#image.);
444 mpl->f_valuecxx . . $ MPL#f_value. = mpl->valuecxx . . $ MPL#value.;
445 /* restore the previous token, which becomes the current one */
446 mpl->tokencxx . . $ MPL#token. = mpl->b_tokencxx . . $ MPL#b_token.;
447 mpl->imlencxx . . $ MPL#imlen. = mpl->b_imlencxx . . $ MPL#b_imlen.;
448 strcpycxx . . $ strcpy(b7b3a83273496486).(mpl->imagecxx . . $ MPL#image., mpl->b_imagecxx . . $ MPL#b_image.);
449 mpl->valuecxx . . $ MPL#value. = mpl->b_valuecxx . . $ MPL#b_value.;
450 return;
451 }
452
453 /*----------------------------------------------------------------------
454 -- is_keyword - check if current token is given non-reserved keyword.
455 --
456 -- If the current token is given (non-reserved) keyword, this routine
457 -- returns non-zero. Otherwise zero is returned. */
458
459 int is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(MPLcxx . . $ MPL# *mpl, char *keyword)
460 { return
461 mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`! && strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., keyword) == 0;
462 }
463
464 /*----------------------------------------------------------------------
465 -- is_reserved - check if current token is reserved keyword.
466 --
467 -- If the current token is a reserved keyword, this routine returns
468 -- non-zero. Otherwise zero is returned. */
469
470 int is_reservedcxx . . $ `external/glpk/glpmpl.h:361:9`!(MPLcxx . . $ MPL# *mpl)
471 { return
472 mpl->tokencxx . . $ MPL#token. == T_ANDcxx . . $ `external/glpk/glpmpl.h:133:9`! && mpl->imagecxx . . $ MPL#image.[0] == 'a' ||
473 mpl->tokencxx . . $ MPL#token. == T_BYcxx . . $ `external/glpk/glpmpl.h:134:9`! ||
474 mpl->tokencxx . . $ MPL#token. == T_CROSScxx . . $ `external/glpk/glpmpl.h:135:9`! ||
475 mpl->tokencxx . . $ MPL#token. == T_DIFFcxx . . $ `external/glpk/glpmpl.h:136:9`! ||
476 mpl->tokencxx . . $ MPL#token. == T_DIVcxx . . $ `external/glpk/glpmpl.h:137:9`! ||
477 mpl->tokencxx . . $ MPL#token. == T_ELSEcxx . . $ `external/glpk/glpmpl.h:138:9`! ||
478 mpl->tokencxx . . $ MPL#token. == T_IFcxx . . $ `external/glpk/glpmpl.h:139:9`! ||
479 mpl->tokencxx . . $ MPL#token. == T_INcxx . . $ `external/glpk/glpmpl.h:140:9`! ||
480 mpl->tokencxx . . $ MPL#token. == T_INTERcxx . . $ `external/glpk/glpmpl.h:142:9`! ||
481 mpl->tokencxx . . $ MPL#token. == T_LESScxx . . $ `external/glpk/glpmpl.h:143:9`! ||
482 mpl->tokencxx . . $ MPL#token. == T_MODcxx . . $ `external/glpk/glpmpl.h:144:9`! ||
483 mpl->tokencxx . . $ MPL#token. == T_NOTcxx . . $ `external/glpk/glpmpl.h:145:9`! && mpl->imagecxx . . $ MPL#image.[0] == 'n' ||
484 mpl->tokencxx . . $ MPL#token. == T_ORcxx . . $ `external/glpk/glpmpl.h:146:9`! && mpl->imagecxx . . $ MPL#image.[0] == 'o' ||
485 mpl->tokencxx . . $ MPL#token. == T_SYMDIFFcxx . . $ `external/glpk/glpmpl.h:148:9`! ||
486 mpl->tokencxx . . $ MPL#token. == T_THENcxx . . $ `external/glpk/glpmpl.h:149:9`! ||
487 mpl->tokencxx . . $ MPL#token. == T_UNIONcxx . . $ `external/glpk/glpmpl.h:150:9`! ||
488 mpl->tokencxx . . $ MPL#token. == T_WITHINcxx . . $ `external/glpk/glpmpl.h:151:9`!;
489 }
490
491 /*----------------------------------------------------------------------
492 -- make_code - generate pseudo-code (basic routine).
493 --
494 -- This routine generates specified pseudo-code. It is assumed that all
495 -- other translator routines use this basic routine. */
496
497 CODEcxx . . $ CODE# *make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(MPLcxx . . $ MPL# *mpl, int op, OPERANDScxx . . $ OPERANDS# *arg, int type, int dim)
498 { CODEcxx . . $ CODE# *code;
499 DOMAINcxx . . $ `external/glpk/glpmpl.h:45:9`! *domain;
500 DOMAIN_BLOCKcxx . . $ DOMAIN_BLOCK# *block;
501 ARG_LISTcxx . . $ ARG_LIST# *e;
502 /* generate pseudo-code */
503 code = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(CODE);
504 code->opcxx . . $ CODE#op. = op;
505 code->vflagcxx . . $ CODE#vflag. = 0; /* is inherited from operand(s) */
506 /* copy operands and also make them referring to the pseudo-code
507 being generated, because the latter becomes the parent for all
508 its operands */
509 memsetcxx . . $ memset(d1de1e4fb215f1c6).(&code->argcxx . . $ CODE#arg., '?', sizeof(OPERANDScxx . . $ OPERANDS#));
510 switch (op)
511 { case O_NUMBERcxx . . $ `external/glpk/glpmpl.h:2075:9`!:
512 code->argcxx . . $ CODE#arg..numcxx . . $ OPERANDS#num. = arg->numcxx . . $ OPERANDS#num.;
513 break;
514 case O_STRINGcxx . . $ `external/glpk/glpmpl.h:2076:9`!:
515 code->argcxx . . $ CODE#arg..strcxx . . $ OPERANDS#str. = arg->strcxx . . $ OPERANDS#str.;
516 break;
517 case O_INDEXcxx . . $ `external/glpk/glpmpl.h:2077:9`!:
518 code->argcxx . . $ CODE#arg..indexcxx . . $ OPERANDS#index..slotcxx . . $ OPERANDS#$anonymous_type_3#slot. = arg->indexcxx . . $ OPERANDS#index..slotcxx . . $ OPERANDS#$anonymous_type_3#slot.;
519 code->argcxx . . $ CODE#arg..indexcxx . . $ OPERANDS#index..nextcxx . . $ OPERANDS#$anonymous_type_3#next. = arg->indexcxx . . $ OPERANDS#index..nextcxx . . $ OPERANDS#$anonymous_type_3#next.;
520 break;
521 case O_MEMNUMcxx . . $ `external/glpk/glpmpl.h:2078:9`!:
522 case O_MEMSYMcxx . . $ `external/glpk/glpmpl.h:2079:9`!:
523 for (e = arg->parcxx . . $ OPERANDS#par..listcxx . . $ OPERANDS#$anonymous_type_4#list.; e != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; e = e->nextcxx . . $ ARG_LIST#next.)
524 { xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(e->x != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
525 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(e->x->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
526 e->xcxx . . $ ARG_LIST#x.->upcxx . . $ CODE#up. = code;
527 code->vflagcxx . . $ CODE#vflag. |= e->xcxx . . $ ARG_LIST#x.->vflagcxx . . $ CODE#vflag.;
528 }
529 code->argcxx . . $ CODE#arg..parcxx . . $ OPERANDS#par..parcxx . . $ OPERANDS#$anonymous_type_4#par. = arg->parcxx . . $ OPERANDS#par..parcxx . . $ OPERANDS#$anonymous_type_4#par.;
530 code->argcxx . . $ CODE#arg..parcxx . . $ OPERANDS#par..listcxx . . $ OPERANDS#$anonymous_type_4#list. = arg->parcxx . . $ OPERANDS#par..listcxx . . $ OPERANDS#$anonymous_type_4#list.;
531 break;
532 case O_MEMSETcxx . . $ `external/glpk/glpmpl.h:2080:9`!:
533 for (e = arg->setcxx . . $ OPERANDS#set..listcxx . . $ OPERANDS#$anonymous_type_5#list.; e != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; e = e->nextcxx . . $ ARG_LIST#next.)
534 { xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(e->x != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
535 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(e->x->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
536 e->xcxx . . $ ARG_LIST#x.->upcxx . . $ CODE#up. = code;
537 code->vflagcxx . . $ CODE#vflag. |= e->xcxx . . $ ARG_LIST#x.->vflagcxx . . $ CODE#vflag.;
538 }
539 code->argcxx . . $ CODE#arg..setcxx . . $ OPERANDS#set..setcxx . . $ OPERANDS#$anonymous_type_5#set. = arg->setcxx . . $ OPERANDS#set..setcxx . . $ OPERANDS#$anonymous_type_5#set.;
540 code->argcxx . . $ CODE#arg..setcxx . . $ OPERANDS#set..listcxx . . $ OPERANDS#$anonymous_type_5#list. = arg->setcxx . . $ OPERANDS#set..listcxx . . $ OPERANDS#$anonymous_type_5#list.;
541 break;
542 case O_MEMVARcxx . . $ `external/glpk/glpmpl.h:2081:9`!:
543 for (e = arg->varcxx . . $ OPERANDS#var..listcxx . . $ OPERANDS#$anonymous_type_6#list.; e != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; e = e->nextcxx . . $ ARG_LIST#next.)
544 { xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(e->x != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
545 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(e->x->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
546 e->xcxx . . $ ARG_LIST#x.->upcxx . . $ CODE#up. = code;
547 code->vflagcxx . . $ CODE#vflag. |= e->xcxx . . $ ARG_LIST#x.->vflagcxx . . $ CODE#vflag.;
548 }
549 code->argcxx . . $ CODE#arg..varcxx . . $ OPERANDS#var..varcxx . . $ OPERANDS#$anonymous_type_6#var. = arg->varcxx . . $ OPERANDS#var..varcxx . . $ OPERANDS#$anonymous_type_6#var.;
550 code->argcxx . . $ CODE#arg..varcxx . . $ OPERANDS#var..listcxx . . $ OPERANDS#$anonymous_type_6#list. = arg->varcxx . . $ OPERANDS#var..listcxx . . $ OPERANDS#$anonymous_type_6#list.;
551 #if 1 /* 15/V-2010 */
552 code->argcxx . . $ CODE#arg..varcxx . . $ OPERANDS#var..suffcxx . . $ OPERANDS#$anonymous_type_6#suff. = arg->varcxx . . $ OPERANDS#var..suffcxx . . $ OPERANDS#$anonymous_type_6#suff.;
553 #endif
554 break;
555 #if 1 /* 15/V-2010 */
556 case O_MEMCONcxx . . $ `external/glpk/glpmpl.h:2082:9`!:
557 for (e = arg->concxx . . $ OPERANDS#con..listcxx . . $ OPERANDS#$anonymous_type_7#list.; e != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; e = e->nextcxx . . $ ARG_LIST#next.)
558 { xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(e->x != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
559 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(e->x->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
560 e->xcxx . . $ ARG_LIST#x.->upcxx . . $ CODE#up. = code;
561 code->vflagcxx . . $ CODE#vflag. |= e->xcxx . . $ ARG_LIST#x.->vflagcxx . . $ CODE#vflag.;
562 }
563 code->argcxx . . $ CODE#arg..concxx . . $ OPERANDS#con..concxx . . $ OPERANDS#$anonymous_type_7#con. = arg->concxx . . $ OPERANDS#con..concxx . . $ OPERANDS#$anonymous_type_7#con.;
564 code->argcxx . . $ CODE#arg..concxx . . $ OPERANDS#con..listcxx . . $ OPERANDS#$anonymous_type_7#list. = arg->concxx . . $ OPERANDS#con..listcxx . . $ OPERANDS#$anonymous_type_7#list.;
565 code->argcxx . . $ CODE#arg..concxx . . $ OPERANDS#con..suffcxx . . $ OPERANDS#$anonymous_type_7#suff. = arg->concxx . . $ OPERANDS#con..suffcxx . . $ OPERANDS#$anonymous_type_7#suff.;
566 break;
567 #endif
568 case O_TUPLEcxx . . $ `external/glpk/glpmpl.h:2083:9`!:
569 case O_MAKEcxx . . $ `external/glpk/glpmpl.h:2084:9`!:
570 for (e = arg->listcxx . . $ OPERANDS#list.; e != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; e = e->nextcxx . . $ ARG_LIST#next.)
571 { xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(e->x != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
572 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(e->x->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
573 e->xcxx . . $ ARG_LIST#x.->upcxx . . $ CODE#up. = code;
574 code->vflagcxx . . $ CODE#vflag. |= e->xcxx . . $ ARG_LIST#x.->vflagcxx . . $ CODE#vflag.;
575 }
576 code->argcxx . . $ CODE#arg..listcxx . . $ OPERANDS#list. = arg->listcxx . . $ OPERANDS#list.;
577 break;
578 case O_SLICEcxx . . $ `external/glpk/glpmpl.h:2085:9`!:
579 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg->slice != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
580 code->argcxx . . $ CODE#arg..slicecxx . . $ OPERANDS#slice. = arg->slicecxx . . $ OPERANDS#slice.;
581 break;
582 case O_IRAND224cxx . . $ `external/glpk/glpmpl.h:2087:9`!:
583 case O_UNIFORM01cxx . . $ `external/glpk/glpmpl.h:2088:9`!:
584 case O_NORMAL01cxx . . $ `external/glpk/glpmpl.h:2089:9`!:
585 case O_GMTIMEcxx . . $ `external/glpk/glpmpl.h:2090:9`!:
586 code->vflagcxx . . $ CODE#vflag. = 1;
587 break;
588 case O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!:
589 case O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!:
590 case O_CVTLOGcxx . . $ `external/glpk/glpmpl.h:2094:9`!:
591 case O_CVTTUPcxx . . $ `external/glpk/glpmpl.h:2095:9`!:
592 case O_CVTLFMcxx . . $ `external/glpk/glpmpl.h:2096:9`!:
593 case O_PLUScxx . . $ `external/glpk/glpmpl.h:2097:9`!:
594 case O_MINUScxx . . $ `external/glpk/glpmpl.h:2098:9`!:
595 case O_NOTcxx . . $ `external/glpk/glpmpl.h:2099:9`!:
596 case O_ABScxx . . $ `external/glpk/glpmpl.h:2100:9`!:
597 case O_CEILcxx . . $ `external/glpk/glpmpl.h:2101:9`!:
598 case O_FLOORcxx . . $ `external/glpk/glpmpl.h:2102:9`!:
599 case O_EXPcxx . . $ `external/glpk/glpmpl.h:2103:9`!:
600 case O_LOGcxx . . $ `external/glpk/glpmpl.h:2104:9`!:
601 case O_LOG10cxx . . $ `external/glpk/glpmpl.h:2105:9`!:
602 case O_SQRTcxx . . $ `external/glpk/glpmpl.h:2106:9`!:
603 case O_SINcxx . . $ `external/glpk/glpmpl.h:2107:9`!:
604 case O_COScxx . . $ `external/glpk/glpmpl.h:2108:9`!:
605 case O_ATANcxx . . $ `external/glpk/glpmpl.h:2109:9`!:
606 case O_ROUNDcxx . . $ `external/glpk/glpmpl.h:2110:9`!:
607 case O_TRUNCcxx . . $ `external/glpk/glpmpl.h:2111:9`!:
608 case O_CARDcxx . . $ `external/glpk/glpmpl.h:2112:9`!:
609 case O_LENGTHcxx . . $ `external/glpk/glpmpl.h:2113:9`!:
610 /* unary operation */
611 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg->arg.x != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
612 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg->arg.x->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
613 arg->argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x.->upcxx . . $ CODE#up. = code;
614 code->vflagcxx . . $ CODE#vflag. |= arg->argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x.->vflagcxx . . $ CODE#vflag.;
615 code->argcxx . . $ CODE#arg..argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x. = arg->argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x.;
616 break;
617 case O_ADDcxx . . $ `external/glpk/glpmpl.h:2115:9`!:
618 case O_SUBcxx . . $ `external/glpk/glpmpl.h:2116:9`!:
619 case O_LESScxx . . $ `external/glpk/glpmpl.h:2117:9`!:
620 case O_MULcxx . . $ `external/glpk/glpmpl.h:2118:9`!:
621 case O_DIVcxx . . $ `external/glpk/glpmpl.h:2119:9`!:
622 case O_IDIVcxx . . $ `external/glpk/glpmpl.h:2120:9`!:
623 case O_MODcxx . . $ `external/glpk/glpmpl.h:2121:9`!:
624 case O_POWERcxx . . $ `external/glpk/glpmpl.h:2122:9`!:
625 case O_ATAN2cxx . . $ `external/glpk/glpmpl.h:2123:9`!:
626 case O_ROUND2cxx . . $ `external/glpk/glpmpl.h:2124:9`!:
627 case O_TRUNC2cxx . . $ `external/glpk/glpmpl.h:2125:9`!:
628 case O_UNIFORMcxx . . $ `external/glpk/glpmpl.h:2126:9`!:
629 if (op == O_UNIFORMcxx . . $ `external/glpk/glpmpl.h:2126:9`!) code->vflagcxx . . $ CODE#vflag. = 1;
630 case O_NORMALcxx . . $ `external/glpk/glpmpl.h:2127:9`!:
631 if (op == O_NORMALcxx . . $ `external/glpk/glpmpl.h:2127:9`!) code->vflagcxx . . $ CODE#vflag. = 1;
632 case O_CONCATcxx . . $ `external/glpk/glpmpl.h:2128:9`!:
633 case O_LTcxx . . $ `external/glpk/glpmpl.h:2129:9`!:
634 case O_LEcxx . . $ `external/glpk/glpmpl.h:2130:9`!:
635 case O_EQcxx . . $ `external/glpk/glpmpl.h:2131:9`!:
636 case O_GEcxx . . $ `external/glpk/glpmpl.h:2132:9`!:
637 case O_GTcxx . . $ `external/glpk/glpmpl.h:2133:9`!:
638 case O_NEcxx . . $ `external/glpk/glpmpl.h:2134:9`!:
639 case O_ANDcxx . . $ `external/glpk/glpmpl.h:2135:9`!:
640 case O_ORcxx . . $ `external/glpk/glpmpl.h:2136:9`!:
641 case O_UNIONcxx . . $ `external/glpk/glpmpl.h:2137:9`!:
642 case O_DIFFcxx . . $ `external/glpk/glpmpl.h:2138:9`!:
643 case O_SYMDIFFcxx . . $ `external/glpk/glpmpl.h:2139:9`!:
644 case O_INTERcxx . . $ `external/glpk/glpmpl.h:2140:9`!:
645 case O_CROSScxx . . $ `external/glpk/glpmpl.h:2141:9`!:
646 case O_INcxx . . $ `external/glpk/glpmpl.h:2142:9`!:
647 case O_NOTINcxx . . $ `external/glpk/glpmpl.h:2143:9`!:
648 case O_WITHINcxx . . $ `external/glpk/glpmpl.h:2144:9`!:
649 case O_NOTWITHINcxx . . $ `external/glpk/glpmpl.h:2145:9`!:
650 case O_SUBSTRcxx . . $ `external/glpk/glpmpl.h:2146:9`!:
651 case O_STR2TIMEcxx . . $ `external/glpk/glpmpl.h:2147:9`!:
652 case O_TIME2STRcxx . . $ `external/glpk/glpmpl.h:2148:9`!:
653 /* binary operation */
654 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg->arg.x != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
655 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg->arg.x->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
656 arg->argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x.->upcxx . . $ CODE#up. = code;
657 code->vflagcxx . . $ CODE#vflag. |= arg->argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x.->vflagcxx . . $ CODE#vflag.;
658 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg->arg.y != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
659 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg->arg.y->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
660 arg->argcxx . . $ OPERANDS#arg..ycxx . . $ OPERANDS#$anonymous_type_8#y.->upcxx . . $ CODE#up. = code;
661 code->vflagcxx . . $ CODE#vflag. |= arg->argcxx . . $ OPERANDS#arg..ycxx . . $ OPERANDS#$anonymous_type_8#y.->vflagcxx . . $ CODE#vflag.;
662 code->argcxx . . $ CODE#arg..argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x. = arg->argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x.;
663 code->argcxx . . $ CODE#arg..argcxx . . $ OPERANDS#arg..ycxx . . $ OPERANDS#$anonymous_type_8#y. = arg->argcxx . . $ OPERANDS#arg..ycxx . . $ OPERANDS#$anonymous_type_8#y.;
664 break;
665 case O_DOTScxx . . $ `external/glpk/glpmpl.h:2150:9`!:
666 case O_FORKcxx . . $ `external/glpk/glpmpl.h:2151:9`!:
667 case O_SUBSTR3cxx . . $ `external/glpk/glpmpl.h:2152:9`!:
668 /* ternary operation */
669 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg->arg.x != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
670 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg->arg.x->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
671 arg->argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x.->upcxx . . $ CODE#up. = code;
672 code->vflagcxx . . $ CODE#vflag. |= arg->argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x.->vflagcxx . . $ CODE#vflag.;
673 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg->arg.y != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
674 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg->arg.y->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
675 arg->argcxx . . $ OPERANDS#arg..ycxx . . $ OPERANDS#$anonymous_type_8#y.->upcxx . . $ CODE#up. = code;
676 code->vflagcxx . . $ CODE#vflag. |= arg->argcxx . . $ OPERANDS#arg..ycxx . . $ OPERANDS#$anonymous_type_8#y.->vflagcxx . . $ CODE#vflag.;
677 if (arg->argcxx . . $ OPERANDS#arg..zcxx . . $ OPERANDS#$anonymous_type_8#z. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
678 { xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg->arg.z->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
679 arg->argcxx . . $ OPERANDS#arg..zcxx . . $ OPERANDS#$anonymous_type_8#z.->upcxx . . $ CODE#up. = code;
680 code->vflagcxx . . $ CODE#vflag. |= arg->argcxx . . $ OPERANDS#arg..zcxx . . $ OPERANDS#$anonymous_type_8#z.->vflagcxx . . $ CODE#vflag.;
681 }
682 code->argcxx . . $ CODE#arg..argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x. = arg->argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x.;
683 code->argcxx . . $ CODE#arg..argcxx . . $ OPERANDS#arg..ycxx . . $ OPERANDS#$anonymous_type_8#y. = arg->argcxx . . $ OPERANDS#arg..ycxx . . $ OPERANDS#$anonymous_type_8#y.;
684 code->argcxx . . $ CODE#arg..argcxx . . $ OPERANDS#arg..zcxx . . $ OPERANDS#$anonymous_type_8#z. = arg->argcxx . . $ OPERANDS#arg..zcxx . . $ OPERANDS#$anonymous_type_8#z.;
685 break;
686 case O_MINcxx . . $ `external/glpk/glpmpl.h:2154:9`!:
687 case O_MAXcxx . . $ `external/glpk/glpmpl.h:2155:9`!:
688 /* n-ary operation */
689 for (e = arg->listcxx . . $ OPERANDS#list.; e != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; e = e->nextcxx . . $ ARG_LIST#next.)
690 { xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(e->x != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
691 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(e->x->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
692 e->xcxx . . $ ARG_LIST#x.->upcxx . . $ CODE#up. = code;
693 code->vflagcxx . . $ CODE#vflag. |= e->xcxx . . $ ARG_LIST#x.->vflagcxx . . $ CODE#vflag.;
694 }
695 code->argcxx . . $ CODE#arg..listcxx . . $ OPERANDS#list. = arg->listcxx . . $ OPERANDS#list.;
696 break;
697 case O_SUMcxx . . $ `external/glpk/glpmpl.h:2157:9`!:
698 case O_PRODcxx . . $ `external/glpk/glpmpl.h:2158:9`!:
699 case O_MINIMUMcxx . . $ `external/glpk/glpmpl.h:2159:9`!:
700 case O_MAXIMUMcxx . . $ `external/glpk/glpmpl.h:2160:9`!:
701 case O_FORALLcxx . . $ `external/glpk/glpmpl.h:2161:9`!:
702 case O_EXISTScxx . . $ `external/glpk/glpmpl.h:2162:9`!:
703 case O_SETOFcxx . . $ `external/glpk/glpmpl.h:2163:9`!:
704 case O_BUILDcxx . . $ `external/glpk/glpmpl.h:2164:9`!:
705 /* iterated operation */
706 domain = arg->loopcxx . . $ OPERANDS#loop..domaincxx . . $ OPERANDS#$anonymous_type_9#domain.;
707 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(domain != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
708 if (domain->codecxx . . $ DOMAIN1#code. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
709 { xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(domain->code->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
710 domain->codecxx . . $ DOMAIN1#code.->upcxx . . $ CODE#up. = code;
711 code->vflagcxx . . $ CODE#vflag. |= domain->codecxx . . $ DOMAIN1#code.->vflagcxx . . $ CODE#vflag.;
712 }
713 for (block = domain->listcxx . . $ DOMAIN1#list.; block != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; block =
714 block->nextcxx . . $ DOMAIN_BLOCK#next.)
715 { xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(block->code != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
716 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(block->code->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
717 block->codecxx . . $ DOMAIN_BLOCK#code.->upcxx . . $ CODE#up. = code;
718 code->vflagcxx . . $ CODE#vflag. |= block->codecxx . . $ DOMAIN_BLOCK#code.->vflagcxx . . $ CODE#vflag.;
719 }
720 if (arg->loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
721 { xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg->loop.x->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
722 arg->loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.->upcxx . . $ CODE#up. = code;
723 code->vflagcxx . . $ CODE#vflag. |= arg->loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.->vflagcxx . . $ CODE#vflag.;
724 }
725 code->argcxx . . $ CODE#arg..loopcxx . . $ OPERANDS#loop..domaincxx . . $ OPERANDS#$anonymous_type_9#domain. = arg->loopcxx . . $ OPERANDS#loop..domaincxx . . $ OPERANDS#$anonymous_type_9#domain.;
726 code->argcxx . . $ CODE#arg..loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x. = arg->loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.;
727 break;
728 default:
729 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(op != op);
730 }
731 /* set other attributes of the pseudo-code */
732 code->typecxx . . $ CODE#type. = type;
733 code->dimcxx . . $ CODE#dim. = dim;
734 code->upcxx . . $ CODE#up. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
735 code->validcxx . . $ CODE#valid. = 0;
736 memsetcxx . . $ memset(d1de1e4fb215f1c6).(&code->valuecxx . . $ CODE#value., '?', sizeof(VALUEcxx . . $ VALUE#));
737 return code;
738 }
739
740 /*----------------------------------------------------------------------
741 -- make_unary - generate pseudo-code for unary operation.
742 --
743 -- This routine generates pseudo-code for unary operation. */
744
745 CODEcxx . . $ CODE# *make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(MPLcxx . . $ MPL# *mpl, int op, CODEcxx . . $ CODE# *x, int type, int dim)
746 { CODEcxx . . $ CODE# *code;
747 OPERANDScxx . . $ OPERANDS# arg;
748 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(x != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
749 arg.argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x. = x;
750 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, op, &arg, type, dim);
751 return code;
752 }
753
754 /*----------------------------------------------------------------------
755 -- make_binary - generate pseudo-code for binary operation.
756 --
757 -- This routine generates pseudo-code for binary operation. */
758
759 CODEcxx . . $ CODE# *make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(MPLcxx . . $ MPL# *mpl, int op, CODEcxx . . $ CODE# *x, CODEcxx . . $ CODE# *y, int type,
760 int dim)
761 { CODEcxx . . $ CODE# *code;
762 OPERANDScxx . . $ OPERANDS# arg;
763 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(x != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
764 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(y != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
765 arg.argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x. = x;
766 arg.argcxx . . $ OPERANDS#arg..ycxx . . $ OPERANDS#$anonymous_type_8#y. = y;
767 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, op, &arg, type, dim);
768 return code;
769 }
770
771 /*----------------------------------------------------------------------
772 -- make_ternary - generate pseudo-code for ternary operation.
773 --
774 -- This routine generates pseudo-code for ternary operation. */
775
776 CODEcxx . . $ CODE# *make_ternarycxx . . $ `external/glpk/glpmpl.h:378:9`!(MPLcxx . . $ MPL# *mpl, int op, CODEcxx . . $ CODE# *x, CODEcxx . . $ CODE# *y, CODEcxx . . $ CODE# *z,
777 int type, int dim)
778 { CODEcxx . . $ CODE# *code;
779 OPERANDScxx . . $ OPERANDS# arg;
780 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(x != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
781 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(y != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
782 /* third operand can be NULL */
783 arg.argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x. = x;
784 arg.argcxx . . $ OPERANDS#arg..ycxx . . $ OPERANDS#$anonymous_type_8#y. = y;
785 arg.argcxx . . $ OPERANDS#arg..zcxx . . $ OPERANDS#$anonymous_type_8#z. = z;
786 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, op, &arg, type, dim);
787 return code;
788 }
789
790 /*----------------------------------------------------------------------
791 -- numeric_literal - parse reference to numeric literal.
792 --
793 -- This routine parses primary expression using the syntax:
794 --
795 -- <primary expression> ::= <numeric literal> */
796
797 CODEcxx . . $ CODE# *numeric_literalcxx . . $ `external/glpk/glpmpl.h:383:9`!(MPLcxx . . $ MPL# *mpl)
798 { CODEcxx . . $ CODE# *code;
799 OPERANDScxx . . $ OPERANDS# arg;
800 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_NUMBERcxx . . $ `external/glpk/glpmpl.h:131:9`!);
801 arg.numcxx . . $ OPERANDS#num. = mpl->valuecxx . . $ MPL#value.;
802 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, O_NUMBERcxx . . $ `external/glpk/glpmpl.h:2075:9`!, &arg, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
803 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <numeric literal> */);
804 return code;
805 }
806
807 /*----------------------------------------------------------------------
808 -- string_literal - parse reference to string literal.
809 --
810 -- This routine parses primary expression using the syntax:
811 --
812 -- <primary expression> ::= <string literal> */
813
814 CODEcxx . . $ CODE# *string_literalcxx . . $ `external/glpk/glpmpl.h:387:9`!(MPLcxx . . $ MPL# *mpl)
815 { CODEcxx . . $ CODE# *code;
816 OPERANDScxx . . $ OPERANDS# arg;
817 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_STRINGcxx . . $ `external/glpk/glpmpl.h:132:9`!);
818 arg.strcxx . . $ OPERANDS#str. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
819 strcpycxx . . $ strcpy(b7b3a83273496486).(arg.strcxx . . $ OPERANDS#str., mpl->imagecxx . . $ MPL#image.);
820 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, O_STRINGcxx . . $ `external/glpk/glpmpl.h:2076:9`!, &arg, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
821 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <string literal> */);
822 return code;
823 }
824
825 /*----------------------------------------------------------------------
826 -- create_arg_list - create empty operands list.
827 --
828 -- This routine creates operands list, which is initially empty. */
829
830 ARG_LISTcxx . . $ ARG_LIST# *create_arg_listcxx . . $ `external/glpk/glpmpl.h:391:9`!(MPLcxx . . $ MPL# *mpl)
831 { ARG_LISTcxx . . $ ARG_LIST# *list;
832 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl == mpl);
833 list = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
834 return list;
835 }
836
837 /*----------------------------------------------------------------------
838 -- expand_arg_list - append operand to operands list.
839 --
840 -- This routine appends new operand to specified operands list. */
841
842 ARG_LISTcxx . . $ ARG_LIST# *expand_arg_listcxx . . $ `external/glpk/glpmpl.h:395:9`!(MPLcxx . . $ MPL# *mpl, ARG_LISTcxx . . $ ARG_LIST# *list, CODEcxx . . $ CODE# *x)
843 { ARG_LISTcxx . . $ ARG_LIST# *tail, *temp;
844 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(x != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
845 /* create new operands list entry */
846 tail = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(ARG_LIST);
847 tail->xcxx . . $ ARG_LIST#x. = x;
848 tail->nextcxx . . $ ARG_LIST#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
849 /* and append it to the operands list */
850 if (list == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
851 list = tail;
852 else
853 { for (temp = list; temp->nextcxx . . $ ARG_LIST#next. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; temp = temp->nextcxx . . $ ARG_LIST#next.);
854 temp->nextcxx . . $ ARG_LIST#next. = tail;
855 }
856 return list;
857 }
858
859 /*----------------------------------------------------------------------
860 -- arg_list_len - determine length of operands list.
861 --
862 -- This routine returns the number of operands in operands list. */
863
864 int arg_list_lencxx . . $ `external/glpk/glpmpl.h:399:9`!(MPLcxx . . $ MPL# *mpl, ARG_LISTcxx . . $ ARG_LIST# *list)
865 { ARG_LISTcxx . . $ ARG_LIST# *temp;
866 int len;
867 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl == mpl);
868 len = 0;
869 for (temp = list; temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; temp = temp->nextcxx . . $ ARG_LIST#next.) len++;
870 return len;
871 }
872
873 /*----------------------------------------------------------------------
874 -- subscript_list - parse subscript list.
875 --
876 -- This routine parses subscript list using the syntax:
877 --
878 -- <subscript list> ::= <subscript>
879 -- <subscript list> ::= <subscript list> , <subscript>
880 -- <subscript> ::= <expression 5> */
881
882 ARG_LISTcxx . . $ ARG_LIST# *subscript_listcxx . . $ `external/glpk/glpmpl.h:403:9`!(MPLcxx . . $ MPL# *mpl)
883 { ARG_LISTcxx . . $ ARG_LIST# *list;
884 CODEcxx . . $ CODE# *x;
885 list = create_arg_listcxx . . $ `external/glpk/glpmpl.h:391:9`!(mpl);
886 for (;;)
887 { /* parse subscript expression */
888 x = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
889 /* convert it to symbolic type, if necessary */
890 if (x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
891 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, x, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
892 /* check that now the expression is of symbolic type */
893 if (x->typecxx . . $ CODE#type. != A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
894 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "subscript expression has invalid type");
895 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(x->dim == 0);
896 /* and append it to the subscript list */
897 list = expand_arg_listcxx . . $ `external/glpk/glpmpl.h:395:9`!(mpl, list, x);
898 /* check a token that follows the subscript expression */
899 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
900 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
901 else if (mpl->tokencxx . . $ MPL#token. == T_RBRACKETcxx . . $ `external/glpk/glpmpl.h:174:9`!)
902 break;
903 else
904 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in subscript list");
905 }
906 return list;
907 }
908
909 #if 1 /* 15/V-2010 */
910 /*----------------------------------------------------------------------
911 -- object_reference - parse reference to named object.
912 --
913 -- This routine parses primary expression using the syntax:
914 --
915 -- <primary expression> ::= <dummy index>
916 -- <primary expression> ::= <set name>
917 -- <primary expression> ::= <set name> [ <subscript list> ]
918 -- <primary expression> ::= <parameter name>
919 -- <primary expression> ::= <parameter name> [ <subscript list> ]
920 -- <primary expression> ::= <variable name> <suffix>
921 -- <primary expression> ::= <variable name> [ <subscript list> ]
922 -- <suffix>
923 -- <primary expression> ::= <constraint name> <suffix>
924 -- <primary expression> ::= <constraint name> [ <subscript list> ]
925 -- <suffix>
926 -- <dummy index> ::= <symbolic name>
927 -- <set name> ::= <symbolic name>
928 -- <parameter name> ::= <symbolic name>
929 -- <variable name> ::= <symbolic name>
930 -- <constraint name> ::= <symbolic name>
931 -- <suffix> ::= <empty> | .lb | .ub | .status | .val | .dual */
932
933 CODEcxx . . $ CODE# *object_referencecxx . . $ `external/glpk/glpmpl.h:407:9`!(MPLcxx . . $ MPL# *mpl)
934 { AVLNODEcxx . . $ AVLNODE# *node;
935 DOMAIN_SLOTcxx . . $ DOMAIN_SLOT# *slot;
936 SETcxx . . $ SET# *set;
937 PARAMETERcxx . . $ PARAMETER# *par;
938 VARIABLEcxx . . $ VARIABLE# *var;
939 CONSTRAINTcxx . . $ CONSTRAINT# *con;
940 ARG_LISTcxx . . $ ARG_LIST# *list;
941 OPERANDScxx . . $ OPERANDS# arg;
942 CODEcxx . . $ CODE# *code;
943 char *name;
944 int dim, suff;
945 /* find the object in the symbolic name table */
946 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!);
947 node = avl_find_nodecxx . . $ `external/glpk/glpavl.h:101:9`!(mpl->treecxx . . $ MPL#tree., mpl->imagecxx . . $ MPL#image.);
948 if (node == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
949 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s not defined", mpl->imagecxx . . $ MPL#image.);
950 /* check the object type and obtain its dimension */
951 switch (avl_get_node_typecxx . . $ `external/glpk/glpavl.h:105:9`!(node))
952 { case A_INDEXcxx . . $ `external/glpk/glpmpl.h:89:9`!:
953 /* dummy index */
954 slot = (DOMAIN_SLOTcxx . . $ DOMAIN_SLOT# *)avl_get_node_linkcxx . . $ `external/glpk/glpavl.h:109:9`!(node);
955 name = slot->namecxx . . $ DOMAIN_SLOT#name.;
956 dim = 0;
957 break;
958 case A_SETcxx . . $ `external/glpk/glpmpl.h:100:9`!:
959 /* model set */
960 set = (SETcxx . . $ SET# *)avl_get_node_linkcxx . . $ `external/glpk/glpavl.h:109:9`!(node);
961 name = set->namecxx . . $ SET#name.;
962 dim = set->dimcxx . . $ SET#dim.;
963 /* if a set object is referenced in its own declaration and
964 the dimen attribute is not specified yet, use dimen 1 by
965 default */
966 if (set->dimencxx . . $ SET#dimen. == 0) set->dimencxx . . $ SET#dimen. = 1;
967 break;
968 case A_PARAMETERcxx . . $ `external/glpk/glpmpl.h:98:9`!:
969 /* model parameter */
970 par = (PARAMETERcxx . . $ PARAMETER# *)avl_get_node_linkcxx . . $ `external/glpk/glpavl.h:109:9`!(node);
971 name = par->namecxx . . $ PARAMETER#name.;
972 dim = par->dimcxx . . $ PARAMETER#dim.;
973 break;
974 case A_VARIABLEcxx . . $ `external/glpk/glpmpl.h:105:9`!:
975 /* model variable */
976 var = (VARIABLEcxx . . $ VARIABLE# *)avl_get_node_linkcxx . . $ `external/glpk/glpavl.h:109:9`!(node);
977 name = var->namecxx . . $ VARIABLE#name.;
978 dim = var->dimcxx . . $ VARIABLE#dim.;
979 break;
980 case A_CONSTRAINTcxx . . $ `external/glpk/glpmpl.h:81:9`!:
981 /* model constraint or objective */
982 con = (CONSTRAINTcxx . . $ CONSTRAINT# *)avl_get_node_linkcxx . . $ `external/glpk/glpavl.h:109:9`!(node);
983 name = con->namecxx . . $ CONSTRAINT#name.;
984 dim = con->dimcxx . . $ CONSTRAINT#dim.;
985 break;
986 default:
987 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(node != node);
988 }
989 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
990 /* parse optional subscript list */
991 if (mpl->tokencxx . . $ MPL#token. == T_LBRACKETcxx . . $ `external/glpk/glpmpl.h:173:9`!)
992 { /* subscript list is specified */
993 if (dim == 0)
994 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s cannot be subscripted", name);
995 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* [ */);
996 list = subscript_listcxx . . $ `external/glpk/glpmpl.h:403:9`!(mpl);
997 if (dim != arg_list_lencxx . . $ `external/glpk/glpmpl.h:399:9`!(mpl, list))
998 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s must have %d subscript%s rather than %d",
999 name, dim, dim == 1 ? "" : "s", arg_list_lencxx . . $ `external/glpk/glpmpl.h:399:9`!(mpl, list));
1000 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_RBRACKETcxx . . $ `external/glpk/glpmpl.h:174:9`!);
1001 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ] */);
1002 }
1003 else
1004 { /* subscript list is not specified */
1005 if (dim != 0)
1006 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s must be subscripted", name);
1007 list = create_arg_listcxx . . $ `external/glpk/glpmpl.h:391:9`!(mpl);
1008 }
1009 /* parse optional suffix */
1010 if (!mpl->flag_scxx . . $ MPL#flag_s. && avl_get_node_typecxx . . $ `external/glpk/glpavl.h:105:9`!(node) == A_VARIABLEcxx . . $ `external/glpk/glpmpl.h:105:9`!)
1011 suff = DOT_NONEcxx . . $ `external/glpk/glpmpl.h:2018:9`!;
1012 else
1013 suff = DOT_VALcxx . . $ `external/glpk/glpmpl.h:2022:9`!;
1014 if (mpl->tokencxx . . $ MPL#token. == T_POINTcxx . . $ `external/glpk/glpmpl.h:165:9`!)
1015 { get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* . */);
1016 if (mpl->tokencxx . . $ MPL#token. != T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
1017 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid use of period");
1018 if (!(avl_get_node_typecxx . . $ `external/glpk/glpavl.h:105:9`!(node) == A_VARIABLEcxx . . $ `external/glpk/glpmpl.h:105:9`! ||
1019 avl_get_node_typecxx . . $ `external/glpk/glpavl.h:105:9`!(node) == A_CONSTRAINTcxx . . $ `external/glpk/glpmpl.h:81:9`!))
1020 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s cannot have a suffix", name);
1021 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "lb") == 0)
1022 suff = DOT_LBcxx . . $ `external/glpk/glpmpl.h:2019:9`!;
1023 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "ub") == 0)
1024 suff = DOT_UBcxx . . $ `external/glpk/glpmpl.h:2020:9`!;
1025 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "status") == 0)
1026 suff = DOT_STATUScxx . . $ `external/glpk/glpmpl.h:2021:9`!;
1027 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "val") == 0)
1028 suff = DOT_VALcxx . . $ `external/glpk/glpmpl.h:2022:9`!;
1029 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "dual") == 0)
1030 suff = DOT_DUALcxx . . $ `external/glpk/glpmpl.h:2023:9`!;
1031 else
1032 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "suffix .%s invalid", mpl->imagecxx . . $ MPL#image.);
1033 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* suffix */);
1034 }
1035 /* generate pseudo-code to take value of the object */
1036 switch (avl_get_node_typecxx . . $ `external/glpk/glpavl.h:105:9`!(node))
1037 { case A_INDEXcxx . . $ `external/glpk/glpmpl.h:89:9`!:
1038 arg.indexcxx . . $ OPERANDS#index..slotcxx . . $ OPERANDS#$anonymous_type_3#slot. = slot;
1039 arg.indexcxx . . $ OPERANDS#index..nextcxx . . $ OPERANDS#$anonymous_type_3#next. = slot->listcxx . . $ DOMAIN_SLOT#list.;
1040 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, O_INDEXcxx . . $ `external/glpk/glpmpl.h:2077:9`!, &arg, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
1041 slot->listcxx . . $ DOMAIN_SLOT#list. = code;
1042 break;
1043 case A_SETcxx . . $ `external/glpk/glpmpl.h:100:9`!:
1044 arg.setcxx . . $ OPERANDS#set..setcxx . . $ OPERANDS#$anonymous_type_5#set. = set;
1045 arg.setcxx . . $ OPERANDS#set..listcxx . . $ OPERANDS#$anonymous_type_5#list. = list;
1046 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, O_MEMSETcxx . . $ `external/glpk/glpmpl.h:2080:9`!, &arg, A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!,
1047 set->dimencxx . . $ SET#dimen.);
1048 break;
1049 case A_PARAMETERcxx . . $ `external/glpk/glpmpl.h:98:9`!:
1050 arg.parcxx . . $ OPERANDS#par..parcxx . . $ OPERANDS#$anonymous_type_4#par. = par;
1051 arg.parcxx . . $ OPERANDS#par..listcxx . . $ OPERANDS#$anonymous_type_4#list. = list;
1052 if (par->typecxx . . $ PARAMETER#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
1053 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, O_MEMSYMcxx . . $ `external/glpk/glpmpl.h:2079:9`!, &arg, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
1054 else
1055 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, O_MEMNUMcxx . . $ `external/glpk/glpmpl.h:2078:9`!, &arg, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
1056 break;
1057 case A_VARIABLEcxx . . $ `external/glpk/glpmpl.h:105:9`!:
1058 if (!mpl->flag_scxx . . $ MPL#flag_s. && (suff == DOT_STATUScxx . . $ `external/glpk/glpmpl.h:2021:9`! || suff == DOT_VALcxx . . $ `external/glpk/glpmpl.h:2022:9`!
1059 || suff == DOT_DUALcxx . . $ `external/glpk/glpmpl.h:2023:9`!))
1060 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid reference to status, primal value, o"
1061 "r dual value of variable %s above solve statement",
1062 var->namecxx . . $ VARIABLE#name.);
1063 arg.varcxx . . $ OPERANDS#var..varcxx . . $ OPERANDS#$anonymous_type_6#var. = var;
1064 arg.varcxx . . $ OPERANDS#var..listcxx . . $ OPERANDS#$anonymous_type_6#list. = list;
1065 arg.varcxx . . $ OPERANDS#var..suffcxx . . $ OPERANDS#$anonymous_type_6#suff. = suff;
1066 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, O_MEMVARcxx . . $ `external/glpk/glpmpl.h:2081:9`!, &arg, suff == DOT_NONEcxx . . $ `external/glpk/glpmpl.h:2018:9`! ?
1067 A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`! : A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
1068 break;
1069 case A_CONSTRAINTcxx . . $ `external/glpk/glpmpl.h:81:9`!:
1070 if (!mpl->flag_scxx . . $ MPL#flag_s. && (suff == DOT_STATUScxx . . $ `external/glpk/glpmpl.h:2021:9`! || suff == DOT_VALcxx . . $ `external/glpk/glpmpl.h:2022:9`!
1071 || suff == DOT_DUALcxx . . $ `external/glpk/glpmpl.h:2023:9`!))
1072 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid reference to status, primal value, o"
1073 "r dual value of %s %s above solve statement",
1074 con->typecxx . . $ CONSTRAINT#type. == A_CONSTRAINTcxx . . $ `external/glpk/glpmpl.h:81:9`! ? "constraint" : "objective"
1075 , con->namecxx . . $ CONSTRAINT#name.);
1076 arg.concxx . . $ OPERANDS#con..concxx . . $ OPERANDS#$anonymous_type_7#con. = con;
1077 arg.concxx . . $ OPERANDS#con..listcxx . . $ OPERANDS#$anonymous_type_7#list. = list;
1078 arg.concxx . . $ OPERANDS#con..suffcxx . . $ OPERANDS#$anonymous_type_7#suff. = suff;
1079 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, O_MEMCONcxx . . $ `external/glpk/glpmpl.h:2082:9`!, &arg, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
1080 break;
1081 default:
1082 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(node != node);
1083 }
1084 return code;
1085 }
1086 #endif
1087
1088 /*----------------------------------------------------------------------
1089 -- numeric_argument - parse argument passed to built-in function.
1090 --
1091 -- This routine parses an argument passed to numeric built-in function
1092 -- using the syntax:
1093 --
1094 -- <arg> ::= <expression 5> */
1095
1096 CODEcxx . . $ CODE# *numeric_argumentcxx . . $ `external/glpk/glpmpl.h:411:9`!(MPLcxx . . $ MPL# *mpl, char *func)
1097 { CODEcxx . . $ CODE# *x;
1098 x = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
1099 /* convert the argument to numeric type, if necessary */
1100 if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
1101 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
1102 /* check that now the argument is of numeric type */
1103 if (x->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
1104 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "argument for %s has invalid type", func);
1105 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(x->dim == 0);
1106 return x;
1107 }
1108
1109 #if 1 /* 15/VII-2006 */
1110 CODEcxx . . $ CODE# *symbolic_argumentcxx . . $ `external/glpk/glpmpl.h:415:9`!(MPLcxx . . $ MPL# *mpl, char *func)
1111 { CODEcxx . . $ CODE# *x;
1112 x = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
1113 /* convert the argument to symbolic type, if necessary */
1114 if (x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
1115 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, x, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
1116 /* check that now the argument is of symbolic type */
1117 if (x->typecxx . . $ CODE#type. != A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
1118 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "argument for %s has invalid type", func);
1119 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(x->dim == 0);
1120 return x;
1121 }
1122 #endif
1123
1124 #if 1 /* 15/VII-2006 */
1125 CODEcxx . . $ CODE# *elemset_argumentcxx . . $ `external/glpk/glpmpl.h:418:9`!(MPLcxx . . $ MPL# *mpl, char *func)
1126 { CODEcxx . . $ CODE# *x;
1127 x = expression_9cxx . . $ `external/glpk/glpmpl.h:526:9`!(mpl);
1128 if (x->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
1129 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "argument for %s has invalid type", func);
1130 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(x->dim > 0);
1131 return x;
1132 }
1133 #endif
1134
1135 /*----------------------------------------------------------------------
1136 -- function_reference - parse reference to built-in function.
1137 --
1138 -- This routine parses primary expression using the syntax:
1139 --
1140 -- <primary expression> ::= abs ( <arg> )
1141 -- <primary expression> ::= ceil ( <arg> )
1142 -- <primary expression> ::= floor ( <arg> )
1143 -- <primary expression> ::= exp ( <arg> )
1144 -- <primary expression> ::= log ( <arg> )
1145 -- <primary expression> ::= log10 ( <arg> )
1146 -- <primary expression> ::= max ( <arg list> )
1147 -- <primary expression> ::= min ( <arg list> )
1148 -- <primary expression> ::= sqrt ( <arg> )
1149 -- <primary expression> ::= sin ( <arg> )
1150 -- <primary expression> ::= cos ( <arg> )
1151 -- <primary expression> ::= atan ( <arg> )
1152 -- <primary expression> ::= atan2 ( <arg> , <arg> )
1153 -- <primary expression> ::= round ( <arg> )
1154 -- <primary expression> ::= round ( <arg> , <arg> )
1155 -- <primary expression> ::= trunc ( <arg> )
1156 -- <primary expression> ::= trunc ( <arg> , <arg> )
1157 -- <primary expression> ::= Irand224 ( )
1158 -- <primary expression> ::= Uniform01 ( )
1159 -- <primary expression> ::= Uniform ( <arg> , <arg> )
1160 -- <primary expression> ::= Normal01 ( )
1161 -- <primary expression> ::= Normal ( <arg> , <arg> )
1162 -- <primary expression> ::= card ( <arg> )
1163 -- <primary expression> ::= length ( <arg> )
1164 -- <primary expression> ::= substr ( <arg> , <arg> )
1165 -- <primary expression> ::= substr ( <arg> , <arg> , <arg> )
1166 -- <primary expression> ::= str2time ( <arg> , <arg> )
1167 -- <primary expression> ::= time2str ( <arg> , <arg> )
1168 -- <primary expression> ::= gmtime ( )
1169 -- <arg list> ::= <arg>
1170 -- <arg list> ::= <arg list> , <arg> */
1171
1172 CODEcxx . . $ CODE# *function_referencecxx . . $ `external/glpk/glpmpl.h:421:9`!(MPLcxx . . $ MPL# *mpl)
1173 { CODEcxx . . $ CODE# *code;
1174 OPERANDScxx . . $ OPERANDS# arg;
1175 int op;
1176 char func[15+1];
1177 /* determine operation code */
1178 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!);
1179 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "abs") == 0)
1180 op = O_ABScxx . . $ `external/glpk/glpmpl.h:2100:9`!;
1181 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "ceil") == 0)
1182 op = O_CEILcxx . . $ `external/glpk/glpmpl.h:2101:9`!;
1183 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "floor") == 0)
1184 op = O_FLOORcxx . . $ `external/glpk/glpmpl.h:2102:9`!;
1185 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "exp") == 0)
1186 op = O_EXPcxx . . $ `external/glpk/glpmpl.h:2103:9`!;
1187 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "log") == 0)
1188 op = O_LOGcxx . . $ `external/glpk/glpmpl.h:2104:9`!;
1189 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "log10") == 0)
1190 op = O_LOG10cxx . . $ `external/glpk/glpmpl.h:2105:9`!;
1191 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "sqrt") == 0)
1192 op = O_SQRTcxx . . $ `external/glpk/glpmpl.h:2106:9`!;
1193 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "sin") == 0)
1194 op = O_SINcxx . . $ `external/glpk/glpmpl.h:2107:9`!;
1195 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "cos") == 0)
1196 op = O_COScxx . . $ `external/glpk/glpmpl.h:2108:9`!;
1197 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "atan") == 0)
1198 op = O_ATANcxx . . $ `external/glpk/glpmpl.h:2109:9`!;
1199 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "min") == 0)
1200 op = O_MINcxx . . $ `external/glpk/glpmpl.h:2154:9`!;
1201 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "max") == 0)
1202 op = O_MAXcxx . . $ `external/glpk/glpmpl.h:2155:9`!;
1203 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "round") == 0)
1204 op = O_ROUNDcxx . . $ `external/glpk/glpmpl.h:2110:9`!;
1205 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "trunc") == 0)
1206 op = O_TRUNCcxx . . $ `external/glpk/glpmpl.h:2111:9`!;
1207 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "Irand224") == 0)
1208 op = O_IRAND224cxx . . $ `external/glpk/glpmpl.h:2087:9`!;
1209 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "Uniform01") == 0)
1210 op = O_UNIFORM01cxx . . $ `external/glpk/glpmpl.h:2088:9`!;
1211 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "Uniform") == 0)
1212 op = O_UNIFORMcxx . . $ `external/glpk/glpmpl.h:2126:9`!;
1213 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "Normal01") == 0)
1214 op = O_NORMAL01cxx . . $ `external/glpk/glpmpl.h:2089:9`!;
1215 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "Normal") == 0)
1216 op = O_NORMALcxx . . $ `external/glpk/glpmpl.h:2127:9`!;
1217 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "card") == 0)
1218 op = O_CARDcxx . . $ `external/glpk/glpmpl.h:2112:9`!;
1219 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "length") == 0)
1220 op = O_LENGTHcxx . . $ `external/glpk/glpmpl.h:2113:9`!;
1221 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "substr") == 0)
1222 op = O_SUBSTRcxx . . $ `external/glpk/glpmpl.h:2146:9`!;
1223 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "str2time") == 0)
1224 op = O_STR2TIMEcxx . . $ `external/glpk/glpmpl.h:2147:9`!;
1225 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "time2str") == 0)
1226 op = O_TIME2STRcxx . . $ `external/glpk/glpmpl.h:2148:9`!;
1227 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "gmtime") == 0)
1228 op = O_GMTIMEcxx . . $ `external/glpk/glpmpl.h:2090:9`!;
1229 else
1230 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "function %s unknown", mpl->imagecxx . . $ MPL#image.);
1231 /* save symbolic name of the function */
1232 strcpycxx . . $ strcpy(b7b3a83273496486).(func, mpl->imagecxx . . $ MPL#image.);
1233 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(strlen(func) < sizeof(func));
1234 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
1235 /* check the left parenthesis that follows the function name */
1236 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_LEFTcxx . . $ `external/glpk/glpmpl.h:171:9`!);
1237 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ( */);
1238 /* parse argument list */
1239 if (op == O_MINcxx . . $ `external/glpk/glpmpl.h:2154:9`! || op == O_MAXcxx . . $ `external/glpk/glpmpl.h:2155:9`!)
1240 { /* min and max allow arbitrary number of arguments */
1241 arg.listcxx . . $ OPERANDS#list. = create_arg_listcxx . . $ `external/glpk/glpmpl.h:391:9`!(mpl);
1242 /* parse argument list */
1243 for (;;)
1244 { /* parse argument and append it to the operands list */
1245 arg.listcxx . . $ OPERANDS#list. = expand_arg_listcxx . . $ `external/glpk/glpmpl.h:395:9`!(mpl, arg.listcxx . . $ OPERANDS#list.,
1246 numeric_argumentcxx . . $ `external/glpk/glpmpl.h:411:9`!(mpl, func));
1247 /* check a token that follows the argument */
1248 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1249 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
1250 else if (mpl->tokencxx . . $ MPL#token. == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!)
1251 break;
1252 else
1253 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in argument list for %s", func);
1254 }
1255 }
1256 else if (op == O_IRAND224cxx . . $ `external/glpk/glpmpl.h:2087:9`! || op == O_UNIFORM01cxx . . $ `external/glpk/glpmpl.h:2088:9`! || op ==
1257 O_NORMAL01cxx . . $ `external/glpk/glpmpl.h:2089:9`! || op == O_GMTIMEcxx . . $ `external/glpk/glpmpl.h:2090:9`!)
1258 { /* Irand224, Uniform01, Normal01, gmtime need no arguments */
1259 if (mpl->tokencxx . . $ MPL#token. != T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!)
1260 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s needs no arguments", func);
1261 }
1262 else if (op == O_UNIFORMcxx . . $ `external/glpk/glpmpl.h:2126:9`! || op == O_NORMALcxx . . $ `external/glpk/glpmpl.h:2127:9`!)
1263 { /* Uniform and Normal need two arguments */
1264 /* parse the first argument */
1265 arg.argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x. = numeric_argumentcxx . . $ `external/glpk/glpmpl.h:411:9`!(mpl, func);
1266 /* check a token that follows the first argument */
1267 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1268 ;
1269 else if (mpl->tokencxx . . $ MPL#token. == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!)
1270 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s needs two arguments", func);
1271 else
1272 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in argument for %s", func);
1273 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
1274 /* parse the second argument */
1275 arg.argcxx . . $ OPERANDS#arg..ycxx . . $ OPERANDS#$anonymous_type_8#y. = numeric_argumentcxx . . $ `external/glpk/glpmpl.h:411:9`!(mpl, func);
1276 /* check a token that follows the second argument */
1277 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1278 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s needs two argument", func);
1279 else if (mpl->tokencxx . . $ MPL#token. == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!)
1280 ;
1281 else
1282 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in argument for %s", func);
1283 }
1284 else if (op == O_ATANcxx . . $ `external/glpk/glpmpl.h:2109:9`! || op == O_ROUNDcxx . . $ `external/glpk/glpmpl.h:2110:9`! || op == O_TRUNCcxx . . $ `external/glpk/glpmpl.h:2111:9`!)
1285 { /* atan, round, and trunc need one or two arguments */
1286 /* parse the first argument */
1287 arg.argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x. = numeric_argumentcxx . . $ `external/glpk/glpmpl.h:411:9`!(mpl, func);
1288 /* parse the second argument, if specified */
1289 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1290 { switch (op)
1291 { case O_ATANcxx . . $ `external/glpk/glpmpl.h:2109:9`!: op = O_ATAN2cxx . . $ `external/glpk/glpmpl.h:2123:9`!; break;
1292 case O_ROUNDcxx . . $ `external/glpk/glpmpl.h:2110:9`!: op = O_ROUND2cxx . . $ `external/glpk/glpmpl.h:2124:9`!; break;
1293 case O_TRUNCcxx . . $ `external/glpk/glpmpl.h:2111:9`!: op = O_TRUNC2cxx . . $ `external/glpk/glpmpl.h:2125:9`!; break;
1294 default: xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(op != op);
1295 }
1296 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
1297 arg.argcxx . . $ OPERANDS#arg..ycxx . . $ OPERANDS#$anonymous_type_8#y. = numeric_argumentcxx . . $ `external/glpk/glpmpl.h:411:9`!(mpl, func);
1298 }
1299 /* check a token that follows the last argument */
1300 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1301 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s needs one or two arguments", func);
1302 else if (mpl->tokencxx . . $ MPL#token. == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!)
1303 ;
1304 else
1305 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in argument for %s", func);
1306 }
1307 else if (op == O_SUBSTRcxx . . $ `external/glpk/glpmpl.h:2146:9`!)
1308 { /* substr needs two or three arguments */
1309 /* parse the first argument */
1310 arg.argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x. = symbolic_argumentcxx . . $ `external/glpk/glpmpl.h:415:9`!(mpl, func);
1311 /* check a token that follows the first argument */
1312 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1313 ;
1314 else if (mpl->tokencxx . . $ MPL#token. == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!)
1315 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s needs two or three arguments", func);
1316 else
1317 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in argument for %s", func);
1318 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
1319 /* parse the second argument */
1320 arg.argcxx . . $ OPERANDS#arg..ycxx . . $ OPERANDS#$anonymous_type_8#y. = numeric_argumentcxx . . $ `external/glpk/glpmpl.h:411:9`!(mpl, func);
1321 /* parse the third argument, if specified */
1322 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1323 { op = O_SUBSTR3cxx . . $ `external/glpk/glpmpl.h:2152:9`!;
1324 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
1325 arg.argcxx . . $ OPERANDS#arg..zcxx . . $ OPERANDS#$anonymous_type_8#z. = numeric_argumentcxx . . $ `external/glpk/glpmpl.h:411:9`!(mpl, func);
1326 }
1327 /* check a token that follows the last argument */
1328 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1329 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s needs two or three arguments", func);
1330 else if (mpl->tokencxx . . $ MPL#token. == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!)
1331 ;
1332 else
1333 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in argument for %s", func);
1334 }
1335 else if (op == O_STR2TIMEcxx . . $ `external/glpk/glpmpl.h:2147:9`!)
1336 { /* str2time needs two arguments, both symbolic */
1337 /* parse the first argument */
1338 arg.argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x. = symbolic_argumentcxx . . $ `external/glpk/glpmpl.h:415:9`!(mpl, func);
1339 /* check a token that follows the first argument */
1340 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1341 ;
1342 else if (mpl->tokencxx . . $ MPL#token. == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!)
1343 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s needs two arguments", func);
1344 else
1345 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in argument for %s", func);
1346 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
1347 /* parse the second argument */
1348 arg.argcxx . . $ OPERANDS#arg..ycxx . . $ OPERANDS#$anonymous_type_8#y. = symbolic_argumentcxx . . $ `external/glpk/glpmpl.h:415:9`!(mpl, func);
1349 /* check a token that follows the second argument */
1350 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1351 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s needs two argument", func);
1352 else if (mpl->tokencxx . . $ MPL#token. == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!)
1353 ;
1354 else
1355 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in argument for %s", func);
1356 }
1357 else if (op == O_TIME2STRcxx . . $ `external/glpk/glpmpl.h:2148:9`!)
1358 { /* time2str needs two arguments, numeric and symbolic */
1359 /* parse the first argument */
1360 arg.argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x. = numeric_argumentcxx . . $ `external/glpk/glpmpl.h:411:9`!(mpl, func);
1361 /* check a token that follows the first argument */
1362 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1363 ;
1364 else if (mpl->tokencxx . . $ MPL#token. == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!)
1365 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s needs two arguments", func);
1366 else
1367 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in argument for %s", func);
1368 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
1369 /* parse the second argument */
1370 arg.argcxx . . $ OPERANDS#arg..ycxx . . $ OPERANDS#$anonymous_type_8#y. = symbolic_argumentcxx . . $ `external/glpk/glpmpl.h:415:9`!(mpl, func);
1371 /* check a token that follows the second argument */
1372 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1373 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s needs two argument", func);
1374 else if (mpl->tokencxx . . $ MPL#token. == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!)
1375 ;
1376 else
1377 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in argument for %s", func);
1378 }
1379 else
1380 { /* other functions need one argument */
1381 if (op == O_CARDcxx . . $ `external/glpk/glpmpl.h:2112:9`!)
1382 arg.argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x. = elemset_argumentcxx . . $ `external/glpk/glpmpl.h:418:9`!(mpl, func);
1383 else if (op == O_LENGTHcxx . . $ `external/glpk/glpmpl.h:2113:9`!)
1384 arg.argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x. = symbolic_argumentcxx . . $ `external/glpk/glpmpl.h:415:9`!(mpl, func);
1385 else
1386 arg.argcxx . . $ OPERANDS#arg..xcxx . . $ OPERANDS#$anonymous_type_8#x. = numeric_argumentcxx . . $ `external/glpk/glpmpl.h:411:9`!(mpl, func);
1387 /* check a token that follows the argument */
1388 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1389 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s needs one argument", func);
1390 else if (mpl->tokencxx . . $ MPL#token. == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!)
1391 ;
1392 else
1393 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in argument for %s", func);
1394 }
1395 /* make pseudo-code to call the built-in function */
1396 if (op == O_SUBSTRcxx . . $ `external/glpk/glpmpl.h:2146:9`! || op == O_SUBSTR3cxx . . $ `external/glpk/glpmpl.h:2152:9`! || op == O_TIME2STRcxx . . $ `external/glpk/glpmpl.h:2148:9`!)
1397 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, op, &arg, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
1398 else
1399 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, op, &arg, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
1400 /* the reference ends with the right parenthesis */
1401 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!);
1402 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ) */);
1403 return code;
1404 }
1405
1406 /*----------------------------------------------------------------------
1407 -- create_domain - create empty domain.
1408 --
1409 -- This routine creates empty domain, which is initially empty, i.e.
1410 -- has no domain blocks. */
1411
1412 DOMAINcxx . . $ `external/glpk/glpmpl.h:45:9`! *create_domaincxx . . $ `external/glpk/glpmpl.h:425:9`!(MPLcxx . . $ MPL# *mpl)
1413 { DOMAINcxx . . $ `external/glpk/glpmpl.h:45:9`! *domain;
1414 domain = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(DOMAINcxx . . $ `external/glpk/glpmpl.h:45:9`!);
1415 domain->listcxx . . $ DOMAIN1#list. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1416 domain->codecxx . . $ DOMAIN1#code. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1417 return domain;
1418 }
1419
1420 /*----------------------------------------------------------------------
1421 -- create_block - create empty domain block.
1422 --
1423 -- This routine creates empty domain block, which is initially empty,
1424 -- i.e. has no domain slots. */
1425
1426 DOMAIN_BLOCKcxx . . $ DOMAIN_BLOCK# *create_blockcxx . . $ `external/glpk/glpmpl.h:429:9`!(MPLcxx . . $ MPL# *mpl)
1427 { DOMAIN_BLOCKcxx . . $ DOMAIN_BLOCK# *block;
1428 block = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(DOMAIN_BLOCK);
1429 block->listcxx . . $ DOMAIN_BLOCK#list. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1430 block->codecxx . . $ DOMAIN_BLOCK#code. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1431 block->backupcxx . . $ DOMAIN_BLOCK#backup. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1432 block->nextcxx . . $ DOMAIN_BLOCK#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1433 return block;
1434 }
1435
1436 /*----------------------------------------------------------------------
1437 -- append_block - append domain block to specified domain.
1438 --
1439 -- This routine adds given domain block to the end of the block list of
1440 -- specified domain. */
1441
1442 void append_blockcxx . . $ `external/glpk/glpmpl.h:433:9`!(MPLcxx . . $ MPL# *mpl, DOMAINcxx . . $ `external/glpk/glpmpl.h:45:9`! *domain, DOMAIN_BLOCKcxx . . $ DOMAIN_BLOCK# *block)
1443 { DOMAIN_BLOCKcxx . . $ DOMAIN_BLOCK# *temp;
1444 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl == mpl);
1445 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(domain != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1446 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(block != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1447 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(block->next == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1448 if (domain->listcxx . . $ DOMAIN1#list. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
1449 domain->listcxx . . $ DOMAIN1#list. = block;
1450 else
1451 { for (temp = domain->listcxx . . $ DOMAIN1#list.; temp->nextcxx . . $ DOMAIN_BLOCK#next. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; temp =
1452 temp->nextcxx . . $ DOMAIN_BLOCK#next.);
1453 temp->nextcxx . . $ DOMAIN_BLOCK#next. = block;
1454 }
1455 return;
1456 }
1457
1458 /*----------------------------------------------------------------------
1459 -- append_slot - create and append new slot to domain block.
1460 --
1461 -- This routine creates new domain slot and adds it to the end of slot
1462 -- list of specified domain block.
1463 --
1464 -- The parameter name is symbolic name of the dummy index associated
1465 -- with the slot (the character string must be allocated). NULL means
1466 -- the dummy index is not explicitly specified.
1467 --
1468 -- The parameter code is pseudo-code for computing symbolic value, at
1469 -- which the dummy index is bounded. NULL means the dummy index is free
1470 -- in the domain scope. */
1471
1472 DOMAIN_SLOTcxx . . $ DOMAIN_SLOT# *append_slotcxx . . $ `external/glpk/glpmpl.h:437:9`!(MPLcxx . . $ MPL# *mpl, DOMAIN_BLOCKcxx . . $ DOMAIN_BLOCK# *block, char *name,
1473 CODEcxx . . $ CODE# *code)
1474 { DOMAIN_SLOTcxx . . $ DOMAIN_SLOT# *slot, *temp;
1475 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(block != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1476 slot = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(DOMAIN_SLOT);
1477 slot->namecxx . . $ DOMAIN_SLOT#name. = name;
1478 slot->codecxx . . $ DOMAIN_SLOT#code. = code;
1479 slot->valuecxx . . $ DOMAIN_SLOT#value. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1480 slot->listcxx . . $ DOMAIN_SLOT#list. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1481 slot->nextcxx . . $ DOMAIN_SLOT#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1482 if (block->listcxx . . $ DOMAIN_BLOCK#list. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
1483 block->listcxx . . $ DOMAIN_BLOCK#list. = slot;
1484 else
1485 { for (temp = block->listcxx . . $ DOMAIN_BLOCK#list.; temp->nextcxx . . $ DOMAIN_SLOT#next. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; temp =
1486 temp->nextcxx . . $ DOMAIN_SLOT#next.);
1487 temp->nextcxx . . $ DOMAIN_SLOT#next. = slot;
1488 }
1489 return slot;
1490 }
1491
1492 /*----------------------------------------------------------------------
1493 -- expression_list - parse expression list.
1494 --
1495 -- This routine parses a list of one or more expressions enclosed into
1496 -- the parentheses using the syntax:
1497 --
1498 -- <primary expression> ::= ( <expression list> )
1499 -- <expression list> ::= <expression 13>
1500 -- <expression list> ::= <expression 13> , <expression list>
1501 --
1502 -- Note that this construction may have three different meanings:
1503 --
1504 -- 1. If <expression list> consists of only one expression, <primary
1505 -- expression> is a parenthesized expression, which may be of any
1506 -- valid type (not necessarily 1-tuple).
1507 --
1508 -- 2. If <expression list> consists of several expressions separated by
1509 -- commae, where no expression is undeclared symbolic name, <primary
1510 -- expression> is a n-tuple.
1511 --
1512 -- 3. If <expression list> consists of several expressions separated by
1513 -- commae, where at least one expression is undeclared symbolic name
1514 -- (that denotes a dummy index), <primary expression> is a slice and
1515 -- can be only used as constituent of indexing expression. */
1516
1517 #define max_dimcxx . . $ `external/glpk/glpmpl01.c:1517:9`! 20
1518 /* maximal number of components allowed within parentheses */
1519
1520 CODEcxx . . $ CODE# *expression_listcxx . . $ `external/glpk/glpmpl.h:442:9`!(MPLcxx . . $ MPL# *mpl)
1521 { CODEcxx . . $ CODE# *code;
1522 OPERANDScxx . . $ OPERANDS# arg;
1523 structcxx . . $ _glp_mpl_expression_list(10e7cfd07fe51f66).$anonymous_type_0# { char *namecxx . . $ _glp_mpl_expression_list(10e7cfd07fe51f66).$anonymous_type_0#name.; CODEcxx . . $ CODE# *codecxx . . $ _glp_mpl_expression_list(10e7cfd07fe51f66).$anonymous_type_0#code.; } list[1+max_dimcxx . . $ `external/glpk/glpmpl01.c:1517:9`!];
1524 int flag_x, next_token, dim, j, slice = 0;
1525 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_LEFTcxx . . $ `external/glpk/glpmpl.h:171:9`!);
1526 /* the flag, which allows recognizing undeclared symbolic names
1527 as dummy indices, will be automatically reset by get_token(),
1528 so save it before scanning the next token */
1529 flag_x = mpl->flag_xcxx . . $ MPL#flag_x.;
1530 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ( */);
1531 /* parse <expression list> */
1532 for (dim = 1; ; dim++)
1533 { if (dim > max_dimcxx . . $ `external/glpk/glpmpl01.c:1517:9`!)
1534 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "too many components within parentheses");
1535 /* current component of <expression list> can be either dummy
1536 index or expression */
1537 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
1538 { /* symbolic name is recognized as dummy index only if:
1539 the flag, which allows that, is set, and
1540 the name is followed by comma or right parenthesis, and
1541 the name is undeclared */
1542 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
1543 next_token = mpl->tokencxx . . $ MPL#token.;
1544 unget_tokencxx . . $ `external/glpk/glpmpl.h:353:9`!(mpl);
1545 if (!(flag_x &&
1546 (next_token == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`! || next_token == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!) &&
1547 avl_find_nodecxx . . $ `external/glpk/glpavl.h:101:9`!(mpl->treecxx . . $ MPL#tree., mpl->imagecxx . . $ MPL#image.) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!))
1548 { /* this is not dummy index */
1549 goto expr;
1550 }
1551 /* all dummy indices within the same slice must have unique
1552 symbolic names */
1553 for (j = 1; j < dim; j++)
1554 { if (list[j].namecxx . . $ _glp_mpl_expression_list(10e7cfd07fe51f66).$anonymous_type_0#name. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && strcmpcxx . . $ strcmp(5ae29d726ae57f88).(list[j].namecxx . . $ _glp_mpl_expression_list(10e7cfd07fe51f66).$anonymous_type_0#name.,
1555 mpl->imagecxx . . $ MPL#image.) == 0)
1556 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "duplicate dummy index %s not allowed",
1557 mpl->imagecxx . . $ MPL#image.);
1558 }
1559 /* current component of <expression list> is dummy index */
1560 list[dim].namecxx . . $ _glp_mpl_expression_list(10e7cfd07fe51f66).$anonymous_type_0#name.
1561 = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
1562 strcpycxx . . $ strcpy(b7b3a83273496486).(list[dim].namecxx . . $ _glp_mpl_expression_list(10e7cfd07fe51f66).$anonymous_type_0#name., mpl->imagecxx . . $ MPL#image.);
1563 list[dim].codecxx . . $ _glp_mpl_expression_list(10e7cfd07fe51f66).$anonymous_type_0#code. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1564 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
1565 /* <expression list> is a slice, because at least one dummy
1566 index has appeared */
1567 slice = 1;
1568 /* note that the context ( <dummy index> ) is not allowed,
1569 i.e. in this case <primary expression> is considered as
1570 a parenthesized expression */
1571 if (dim == 1 && mpl->tokencxx . . $ MPL#token. == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!)
1572 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s not defined", list[dim].namecxx . . $ _glp_mpl_expression_list(10e7cfd07fe51f66).$anonymous_type_0#name.);
1573 }
1574 else
1575 expr: { /* current component of <expression list> is expression */
1576 code = expression_13cxx . . $ `external/glpk/glpmpl.h:542:9`!(mpl);
1577 /* if the current expression is followed by comma or it is
1578 not the very first expression, entire <expression list>
1579 is n-tuple or slice, in which case the current expression
1580 should be converted to symbolic type, if necessary */
1581 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`! || dim > 1)
1582 { if (code->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
1583 code = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, code, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
1584 /* now the expression must be of symbolic type */
1585 if (code->typecxx . . $ CODE#type. != A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
1586 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "component expression has invalid type");
1587 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(code->dim == 0);
1588 }
1589 list[dim].namecxx . . $ _glp_mpl_expression_list(10e7cfd07fe51f66).$anonymous_type_0#name. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1590 list[dim].codecxx . . $ _glp_mpl_expression_list(10e7cfd07fe51f66).$anonymous_type_0#code. = code;
1591 }
1592 /* check a token that follows the current component */
1593 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1594 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
1595 else if (mpl->tokencxx . . $ MPL#token. == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!)
1596 break;
1597 else
1598 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "right parenthesis missing where expected");
1599 }
1600 /* generate pseudo-code for <primary expression> */
1601 if (dim == 1 && !slice)
1602 { /* <primary expression> is a parenthesized expression */
1603 code = list[1].codecxx . . $ _glp_mpl_expression_list(10e7cfd07fe51f66).$anonymous_type_0#code.;
1604 }
1605 else if (!slice)
1606 { /* <primary expression> is a n-tuple */
1607 arg.listcxx . . $ OPERANDS#list. = create_arg_listcxx . . $ `external/glpk/glpmpl.h:391:9`!(mpl);
1608 for (j = 1; j <= dim; j++)
1609 arg.listcxx . . $ OPERANDS#list. = expand_arg_listcxx . . $ `external/glpk/glpmpl.h:395:9`!(mpl, arg.listcxx . . $ OPERANDS#list., list[j].codecxx . . $ _glp_mpl_expression_list(10e7cfd07fe51f66).$anonymous_type_0#code.);
1610 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, O_TUPLEcxx . . $ `external/glpk/glpmpl.h:2083:9`!, &arg, A_TUPLEcxx . . $ `external/glpk/glpmpl.h:104:9`!, dim);
1611 }
1612 else
1613 { /* <primary expression> is a slice */
1614 arg.slicecxx . . $ OPERANDS#slice. = create_blockcxx . . $ `external/glpk/glpmpl.h:429:9`!(mpl);
1615 for (j = 1; j <= dim; j++)
1616 append_slotcxx . . $ `external/glpk/glpmpl.h:437:9`!(mpl, arg.slicecxx . . $ OPERANDS#slice., list[j].namecxx . . $ _glp_mpl_expression_list(10e7cfd07fe51f66).$anonymous_type_0#name., list[j].codecxx . . $ _glp_mpl_expression_list(10e7cfd07fe51f66).$anonymous_type_0#code.);
1617 /* note that actually pseudo-codes with op = O_SLICE are never
1618 evaluated */
1619 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, O_SLICEcxx . . $ `external/glpk/glpmpl.h:2085:9`!, &arg, A_TUPLEcxx . . $ `external/glpk/glpmpl.h:104:9`!, dim);
1620 }
1621 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ) */);
1622 /* if <primary expression> is a slice, there must be the keyword
1623 'in', which follows the right parenthesis */
1624 if (slice && mpl->tokencxx . . $ MPL#token. != T_INcxx . . $ `external/glpk/glpmpl.h:140:9`!)
1625 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "keyword in missing where expected");
1626 /* if the slice flag is set and there is the keyword 'in', which
1627 follows <primary expression>, the latter must be a slice */
1628 if (flag_x && mpl->tokencxx . . $ MPL#token. == T_INcxx . . $ `external/glpk/glpmpl.h:140:9`! && !slice)
1629 { if (dim == 1)
1630 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in indexing expression");
1631 else
1632 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "0-ary slice not allowed");
1633 }
1634 return code;
1635 }
1636
1637 /*----------------------------------------------------------------------
1638 -- literal set - parse literal set.
1639 --
1640 -- This routine parses literal set using the syntax:
1641 --
1642 -- <literal set> ::= { <member list> }
1643 -- <member list> ::= <member expression>
1644 -- <member list> ::= <member list> , <member expression>
1645 -- <member expression> ::= <expression 5>
1646 --
1647 -- It is assumed that the left curly brace and the very first member
1648 -- expression that follows it are already parsed. The right curly brace
1649 -- remains unscanned on exit. */
1650
1651 CODEcxx . . $ CODE# *literal_setcxx . . $ `external/glpk/glpmpl.h:446:9`!(MPLcxx . . $ MPL# *mpl, CODEcxx . . $ CODE# *code)
1652 { OPERANDScxx . . $ OPERANDS# arg;
1653 int j;
1654 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(code != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1655 arg.listcxx . . $ OPERANDS#list. = create_arg_listcxx . . $ `external/glpk/glpmpl.h:391:9`!(mpl);
1656 /* parse <member list> */
1657 for (j = 1; ; j++)
1658 { /* all member expressions must be n-tuples; so, if the current
1659 expression is not n-tuple, convert it to 1-tuple */
1660 if (code->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
1661 code = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, code, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
1662 if (code->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
1663 code = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTTUPcxx . . $ `external/glpk/glpmpl.h:2095:9`!, code, A_TUPLEcxx . . $ `external/glpk/glpmpl.h:104:9`!, 1);
1664 /* now the expression must be n-tuple */
1665 if (code->typecxx . . $ CODE#type. != A_TUPLEcxx . . $ `external/glpk/glpmpl.h:104:9`!)
1666 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "member expression has invalid type");
1667 /* all member expressions must have identical dimension */
1668 if (arg.listcxx . . $ OPERANDS#list. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && arg.listcxx . . $ OPERANDS#list.->xcxx . . $ ARG_LIST#x.->dimcxx . . $ CODE#dim. != code->dimcxx . . $ CODE#dim.)
1669 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "member %d has %d component%s while member %d ha"
1670 "s %d component%s",
1671 j-1, arg.listcxx . . $ OPERANDS#list.->xcxx . . $ ARG_LIST#x.->dimcxx . . $ CODE#dim., arg.listcxx . . $ OPERANDS#list.->xcxx . . $ ARG_LIST#x.->dimcxx . . $ CODE#dim. == 1 ? "" : "s",
1672 j, code->dimcxx . . $ CODE#dim., code->dimcxx . . $ CODE#dim. == 1 ? "" : "s");
1673 /* append the current expression to the member list */
1674 arg.listcxx . . $ OPERANDS#list. = expand_arg_listcxx . . $ `external/glpk/glpmpl.h:395:9`!(mpl, arg.listcxx . . $ OPERANDS#list., code);
1675 /* check a token that follows the current expression */
1676 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1677 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
1678 else if (mpl->tokencxx . . $ MPL#token. == T_RBRACEcxx . . $ `external/glpk/glpmpl.h:176:9`!)
1679 break;
1680 else
1681 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in literal set");
1682 /* parse the next expression that follows the comma */
1683 code = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
1684 }
1685 /* generate pseudo-code for <literal set> */
1686 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, O_MAKEcxx . . $ `external/glpk/glpmpl.h:2084:9`!, &arg, A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!, arg.listcxx . . $ OPERANDS#list.->xcxx . . $ ARG_LIST#x.->dimcxx . . $ CODE#dim.);
1687 return code;
1688 }
1689
1690 /*----------------------------------------------------------------------
1691 -- indexing_expression - parse indexing expression.
1692 --
1693 -- This routine parses indexing expression using the syntax:
1694 --
1695 -- <indexing expression> ::= <literal set>
1696 -- <indexing expression> ::= { <indexing list> }
1697 -- <indexing expression> ::= { <indexing list> : <logical expression> }
1698 -- <indexing list> ::= <indexing element>
1699 -- <indexing list> ::= <indexing list> , <indexing element>
1700 -- <indexing element> ::= <basic expression>
1701 -- <indexing element> ::= <dummy index> in <basic expression>
1702 -- <indexing element> ::= <slice> in <basic expression>
1703 -- <dummy index> ::= <symbolic name>
1704 -- <slice> ::= ( <expression list> )
1705 -- <basic expression> ::= <expression 9>
1706 -- <logical expression> ::= <expression 13>
1707 --
1708 -- This routine creates domain for <indexing expression>, where each
1709 -- domain block corresponds to <indexing element>, and each domain slot
1710 -- corresponds to individual indexing position. */
1711
1712 DOMAINcxx . . $ `external/glpk/glpmpl.h:45:9`! *indexing_expressioncxx . . $ `external/glpk/glpmpl.h:450:9`!(MPLcxx . . $ MPL# *mpl)
1713 { DOMAINcxx . . $ `external/glpk/glpmpl.h:45:9`! *domain;
1714 DOMAIN_BLOCKcxx . . $ DOMAIN_BLOCK# *block;
1715 DOMAIN_SLOTcxx . . $ DOMAIN_SLOT# *slot;
1716 CODEcxx . . $ CODE# *code;
1717 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!);
1718 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* { */);
1719 if (mpl->tokencxx . . $ MPL#token. == T_RBRACEcxx . . $ `external/glpk/glpmpl.h:176:9`!)
1720 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "empty indexing expression not allowed");
1721 /* create domain to be constructed */
1722 domain = create_domaincxx . . $ `external/glpk/glpmpl.h:425:9`!(mpl);
1723 /* parse either <member list> or <indexing list> that follows the
1724 left brace */
1725 for (;;)
1726 { /* domain block for <indexing element> is not created yet */
1727 block = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1728 /* pseudo-code for <basic expression> is not generated yet */
1729 code = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1730 /* check a token, which <indexing element> begins with */
1731 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
1732 { /* it is a symbolic name */
1733 int next_token;
1734 char *name;
1735 /* symbolic name is recognized as dummy index only if it is
1736 followed by the keyword 'in' and not declared */
1737 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
1738 next_token = mpl->tokencxx . . $ MPL#token.;
1739 unget_tokencxx . . $ `external/glpk/glpmpl.h:353:9`!(mpl);
1740 if (!(next_token == T_INcxx . . $ `external/glpk/glpmpl.h:140:9`! &&
1741 avl_find_nodecxx . . $ `external/glpk/glpavl.h:101:9`!(mpl->treecxx . . $ MPL#tree., mpl->imagecxx . . $ MPL#image.) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!))
1742 { /* this is not dummy index; the symbolic name begins an
1743 expression, which is either <basic expression> or the
1744 very first <member expression> in <literal set> */
1745 goto expr;
1746 }
1747 /* create domain block with one slot, which is assigned the
1748 dummy index */
1749 block = create_blockcxx . . $ `external/glpk/glpmpl.h:429:9`!(mpl);
1750 name = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
1751 strcpycxx . . $ strcpy(b7b3a83273496486).(name, mpl->imagecxx . . $ MPL#image.);
1752 append_slotcxx . . $ `external/glpk/glpmpl.h:437:9`!(mpl, block, name, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1753 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
1754 /* the keyword 'in' is already checked above */
1755 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_INcxx . . $ `external/glpk/glpmpl.h:140:9`!);
1756 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* in */);
1757 /* <basic expression> that follows the keyword 'in' will be
1758 parsed below */
1759 }
1760 else if (mpl->tokencxx . . $ MPL#token. == T_LEFTcxx . . $ `external/glpk/glpmpl.h:171:9`!)
1761 { /* it is the left parenthesis; parse expression that begins
1762 with this parenthesis (the flag is set in order to allow
1763 recognizing slices; see the routine expression_list) */
1764 mpl->flag_xcxx . . $ MPL#flag_x. = 1;
1765 code = expression_9cxx . . $ `external/glpk/glpmpl.h:526:9`!(mpl);
1766 if (code->opcxx . . $ CODE#op. != O_SLICEcxx . . $ `external/glpk/glpmpl.h:2085:9`!)
1767 { /* this is either <basic expression> or the very first
1768 <member expression> in <literal set> */
1769 goto expr;
1770 }
1771 /* this is a slice; besides the corresponding domain block
1772 is already created by expression_list() */
1773 block = code->argcxx . . $ CODE#arg..slicecxx . . $ OPERANDS#slice.;
1774 code = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; /* <basic expression> is not parsed yet */
1775 /* the keyword 'in' following the slice is already checked
1776 by expression_list() */
1777 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_INcxx . . $ `external/glpk/glpmpl.h:140:9`!);
1778 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* in */);
1779 /* <basic expression> that follows the keyword 'in' will be
1780 parsed below */
1781 }
1782 expr: /* parse expression that follows either the keyword 'in' (in
1783 which case it can be <basic expression) or the left brace
1784 (in which case it can be <basic expression> as well as the
1785 very first <member expression> in <literal set>); note that
1786 this expression can be already parsed above */
1787 if (code == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) code = expression_9cxx . . $ `external/glpk/glpmpl.h:526:9`!(mpl);
1788 /* check the type of the expression just parsed */
1789 if (code->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
1790 { /* it is not <basic expression> and therefore it can only
1791 be the very first <member expression> in <literal set>;
1792 however, then there must be no dummy index neither slice
1793 between the left brace and this expression */
1794 if (block != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
1795 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "domain expression has invalid type");
1796 /* parse the rest part of <literal set> and make this set
1797 be <basic expression>, i.e. the construction {a, b, c}
1798 is parsed as it were written as {A}, where A = {a, b, c}
1799 is a temporary elemental set */
1800 code = literal_setcxx . . $ `external/glpk/glpmpl.h:446:9`!(mpl, code);
1801 }
1802 /* now pseudo-code for <basic set> has been built */
1803 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(code != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1804 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(code->type == A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!);
1805 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(code->dim > 0);
1806 /* if domain block for the current <indexing element> is still
1807 not created, create it for fake slice of the same dimension
1808 as <basic set> */
1809 if (block == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
1810 { int j;
1811 block = create_blockcxx . . $ `external/glpk/glpmpl.h:429:9`!(mpl);
1812 for (j = 1; j <= code->dimcxx . . $ CODE#dim.; j++)
1813 append_slotcxx . . $ `external/glpk/glpmpl.h:437:9`!(mpl, block, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1814 }
1815 /* number of indexing positions in <indexing element> must be
1816 the same as dimension of n-tuples in basic set */
1817 { int dim = 0;
1818 for (slot = block->listcxx . . $ DOMAIN_BLOCK#list.; slot != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; slot = slot->nextcxx . . $ DOMAIN_SLOT#next.)
1819 dim++;
1820 if (dim != code->dimcxx . . $ CODE#dim.)
1821 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl,"%d %s specified for set of dimension %d",
1822 dim, dim == 1 ? "index" : "indices", code->dimcxx . . $ CODE#dim.);
1823 }
1824 /* store pseudo-code for <basic set> in the domain block */
1825 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(block->code == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1826 block->codecxx . . $ DOMAIN_BLOCK#code. = code;
1827 /* and append the domain block to the domain */
1828 append_blockcxx . . $ `external/glpk/glpmpl.h:433:9`!(mpl, domain, block);
1829 /* the current <indexing element> has been completely parsed;
1830 include all its dummy indices into the symbolic name table
1831 to make them available for referencing from expressions;
1832 implicit declarations of dummy indices remain valid while
1833 the corresponding domain scope is valid */
1834 for (slot = block->listcxx . . $ DOMAIN_BLOCK#list.; slot != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; slot = slot->nextcxx . . $ DOMAIN_SLOT#next.)
1835 if (slot->namecxx . . $ DOMAIN_SLOT#name. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
1836 { AVLNODEcxx . . $ AVLNODE# *node;
1837 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(avl_find_nodecxx . . $ `external/glpk/glpavl.h:101:9`!(mpl->tree, slot->name) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1838 node = avl_insert_nodecxx . . $ `external/glpk/glpavl.h:89:9`!(mpl->treecxx . . $ MPL#tree., slot->namecxx . . $ DOMAIN_SLOT#name.);
1839 avl_set_node_typecxx . . $ `external/glpk/glpavl.h:93:9`!(node, A_INDEXcxx . . $ `external/glpk/glpmpl.h:89:9`!);
1840 avl_set_node_linkcxx . . $ `external/glpk/glpavl.h:97:9`!(node, (void *)slot);
1841 }
1842 /* check a token that follows <indexing element> */
1843 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
1844 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
1845 else if (mpl->tokencxx . . $ MPL#token. == T_COLONcxx . . $ `external/glpk/glpmpl.h:167:9`! || mpl->tokencxx . . $ MPL#token. == T_RBRACEcxx . . $ `external/glpk/glpmpl.h:176:9`!)
1846 break;
1847 else
1848 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in indexing expression");
1849 }
1850 /* parse <logical expression> that follows the colon */
1851 if (mpl->tokencxx . . $ MPL#token. == T_COLONcxx . . $ `external/glpk/glpmpl.h:167:9`!)
1852 { get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* : */);
1853 code = expression_13cxx . . $ `external/glpk/glpmpl.h:542:9`!(mpl);
1854 /* convert the expression to logical type, if necessary */
1855 if (code->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
1856 code = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, code, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
1857 if (code->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
1858 code = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLOGcxx . . $ `external/glpk/glpmpl.h:2094:9`!, code, A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!, 0);
1859 /* now the expression must be of logical type */
1860 if (code->typecxx . . $ CODE#type. != A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!)
1861 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following colon has invalid type");
1862 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(code->dim == 0);
1863 domain->codecxx . . $ DOMAIN1#code. = code;
1864 /* the right brace must follow the logical expression */
1865 if (mpl->tokencxx . . $ MPL#token. != T_RBRACEcxx . . $ `external/glpk/glpmpl.h:176:9`!)
1866 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in indexing expression");
1867 }
1868 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* } */);
1869 return domain;
1870 }
1871
1872 /*----------------------------------------------------------------------
1873 -- close_scope - close scope of indexing expression.
1874 --
1875 -- The routine closes the scope of indexing expression specified by its
1876 -- domain and thereby makes all dummy indices introduced in the indexing
1877 -- expression no longer available for referencing. */
1878
1879 void close_scopecxx . . $ `external/glpk/glpmpl.h:454:9`!(MPLcxx . . $ MPL# *mpl, DOMAINcxx . . $ `external/glpk/glpmpl.h:45:9`! *domain)
1880 { DOMAIN_BLOCKcxx . . $ DOMAIN_BLOCK# *block;
1881 DOMAIN_SLOTcxx . . $ DOMAIN_SLOT# *slot;
1882 AVLNODEcxx . . $ AVLNODE# *node;
1883 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(domain != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1884 /* remove all dummy indices from the symbolic names table */
1885 for (block = domain->listcxx . . $ DOMAIN1#list.; block != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; block = block->nextcxx . . $ DOMAIN_BLOCK#next.)
1886 { for (slot = block->listcxx . . $ DOMAIN_BLOCK#list.; slot != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; slot = slot->nextcxx . . $ DOMAIN_SLOT#next.)
1887 { if (slot->namecxx . . $ DOMAIN_SLOT#name. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
1888 { node = avl_find_nodecxx . . $ `external/glpk/glpavl.h:101:9`!(mpl->treecxx . . $ MPL#tree., slot->namecxx . . $ DOMAIN_SLOT#name.);
1889 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1890 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(avl_get_node_typecxx . . $ `external/glpk/glpavl.h:105:9`!(node) == A_INDEXcxx . . $ `external/glpk/glpmpl.h:89:9`!);
1891 avl_delete_nodecxx . . $ `external/glpk/glpavl.h:113:9`!(mpl->treecxx . . $ MPL#tree., node);
1892 }
1893 }
1894 }
1895 return;
1896 }
1897
1898 /*----------------------------------------------------------------------
1899 -- iterated_expression - parse iterated expression.
1900 --
1901 -- This routine parses primary expression using the syntax:
1902 --
1903 -- <primary expression> ::= <iterated expression>
1904 -- <iterated expression> ::= sum <indexing expression> <expression 3>
1905 -- <iterated expression> ::= prod <indexing expression> <expression 3>
1906 -- <iterated expression> ::= min <indexing expression> <expression 3>
1907 -- <iterated expression> ::= max <indexing expression> <expression 3>
1908 -- <iterated expression> ::= exists <indexing expression>
1909 -- <expression 12>
1910 -- <iterated expression> ::= forall <indexing expression>
1911 -- <expression 12>
1912 -- <iterated expression> ::= setof <indexing expression> <expression 5>
1913 --
1914 -- Note that parsing "integrand" depends on the iterated operator. */
1915
1916 #if 1 /* 07/IX-2008 */
1917 static void link_upcxx . . $ link_up(252e71a3ed0d1697).(CODEcxx . . $ CODE# *code)
1918 { /* if we have something like sum{(i+1,j,k-1) in E} x[i,j,k],
1919 where i and k are dummy indices defined out of the iterated
1920 expression, we should link up pseudo-code for computing i+1
1921 and k-1 to pseudo-code for computing the iterated expression;
1922 this is needed to invalidate current value of the iterated
1923 expression once i or k have been changed */
1924 DOMAIN_BLOCKcxx . . $ DOMAIN_BLOCK# *block;
1925 DOMAIN_SLOTcxx . . $ DOMAIN_SLOT# *slot;
1926 for (block = code->argcxx . . $ CODE#arg..loopcxx . . $ OPERANDS#loop..domaincxx . . $ OPERANDS#$anonymous_type_9#domain.->listcxx . . $ DOMAIN1#list.; block != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1927 block = block->nextcxx . . $ DOMAIN_BLOCK#next.)
1928 { for (slot = block->listcxx . . $ DOMAIN_BLOCK#list.; slot != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; slot = slot->nextcxx . . $ DOMAIN_SLOT#next.)
1929 { if (slot->codecxx . . $ DOMAIN_SLOT#code. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
1930 { xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(slot->code->up == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1931 slot->codecxx . . $ DOMAIN_SLOT#code.->upcxx . . $ CODE#up. = code;
1932 }
1933 }
1934 }
1935 return;
1936 }
1937 #endif
1938
1939 CODEcxx . . $ CODE# *iterated_expressioncxx . . $ `external/glpk/glpmpl.h:458:9`!(MPLcxx . . $ MPL# *mpl)
1940 { CODEcxx . . $ CODE# *code;
1941 OPERANDScxx . . $ OPERANDS# arg;
1942 int op;
1943 char opstr[8];
1944 /* determine operation code */
1945 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!);
1946 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "sum") == 0)
1947 op = O_SUMcxx . . $ `external/glpk/glpmpl.h:2157:9`!;
1948 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "prod") == 0)
1949 op = O_PRODcxx . . $ `external/glpk/glpmpl.h:2158:9`!;
1950 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "min") == 0)
1951 op = O_MINIMUMcxx . . $ `external/glpk/glpmpl.h:2159:9`!;
1952 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "max") == 0)
1953 op = O_MAXIMUMcxx . . $ `external/glpk/glpmpl.h:2160:9`!;
1954 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "forall") == 0)
1955 op = O_FORALLcxx . . $ `external/glpk/glpmpl.h:2161:9`!;
1956 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "exists") == 0)
1957 op = O_EXISTScxx . . $ `external/glpk/glpmpl.h:2162:9`!;
1958 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mpl->imagecxx . . $ MPL#image., "setof") == 0)
1959 op = O_SETOFcxx . . $ `external/glpk/glpmpl.h:2163:9`!;
1960 else
1961 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "operator %s unknown", mpl->imagecxx . . $ MPL#image.);
1962 strcpycxx . . $ strcpy(b7b3a83273496486).(opstr, mpl->imagecxx . . $ MPL#image.);
1963 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(strlen(opstr) < sizeof(opstr));
1964 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
1965 /* check the left brace that follows the operator name */
1966 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!);
1967 /* parse indexing expression that controls iterating */
1968 arg.loopcxx . . $ OPERANDS#loop..domaincxx . . $ OPERANDS#$anonymous_type_9#domain. = indexing_expressioncxx . . $ `external/glpk/glpmpl.h:450:9`!(mpl);
1969 /* parse "integrand" expression and generate pseudo-code */
1970 switch (op)
1971 { case O_SUMcxx . . $ `external/glpk/glpmpl.h:2157:9`!:
1972 case O_PRODcxx . . $ `external/glpk/glpmpl.h:2158:9`!:
1973 case O_MINIMUMcxx . . $ `external/glpk/glpmpl.h:2159:9`!:
1974 case O_MAXIMUMcxx . . $ `external/glpk/glpmpl.h:2160:9`!:
1975 arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x. = expression_3cxx . . $ `external/glpk/glpmpl.h:502:9`!(mpl);
1976 /* convert the integrand to numeric type, if necessary */
1977 if (arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
1978 arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.,
1979 A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
1980 /* now the integrand must be of numeric type or linear form
1981 (the latter is only allowed for the sum operator) */
1982 if (!(arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! ||
1983 op == O_SUMcxx . . $ `external/glpk/glpmpl.h:2157:9`! && arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!))
1984 err: mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "integrand following %s{...} has invalid type"
1985 , opstr);
1986 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg.loop.x->dim == 0);
1987 /* generate pseudo-code */
1988 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, op, &arg, arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.->typecxx . . $ CODE#type., 0);
1989 break;
1990 case O_FORALLcxx . . $ `external/glpk/glpmpl.h:2161:9`!:
1991 case O_EXISTScxx . . $ `external/glpk/glpmpl.h:2162:9`!:
1992 arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x. = expression_12cxx . . $ `external/glpk/glpmpl.h:538:9`!(mpl);
1993 /* convert the integrand to logical type, if necessary */
1994 if (arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
1995 arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.,
1996 A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
1997 if (arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
1998 arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLOGcxx . . $ `external/glpk/glpmpl.h:2094:9`!, arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.,
1999 A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!, 0);
2000 /* now the integrand must be of logical type */
2001 if (arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.->typecxx . . $ CODE#type. != A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!) goto err;
2002 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg.loop.x->dim == 0);
2003 /* generate pseudo-code */
2004 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, op, &arg, A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!, 0);
2005 break;
2006 case O_SETOFcxx . . $ `external/glpk/glpmpl.h:2163:9`!:
2007 arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x. = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
2008 /* convert the integrand to 1-tuple, if necessary */
2009 if (arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2010 arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.,
2011 A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
2012 if (arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2013 arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTTUPcxx . . $ `external/glpk/glpmpl.h:2095:9`!, arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.,
2014 A_TUPLEcxx . . $ `external/glpk/glpmpl.h:104:9`!, 1);
2015 /* now the integrand must be n-tuple */
2016 if (arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.->typecxx . . $ CODE#type. != A_TUPLEcxx . . $ `external/glpk/glpmpl.h:104:9`!) goto err;
2017 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(arg.loop.x->dim > 0);
2018 /* generate pseudo-code */
2019 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, op, &arg, A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!, arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x.->dimcxx . . $ CODE#dim.);
2020 break;
2021 default:
2022 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(op != op);
2023 }
2024 /* close the scope of the indexing expression */
2025 close_scopecxx . . $ `external/glpk/glpmpl.h:454:9`!(mpl, arg.loopcxx . . $ OPERANDS#loop..domaincxx . . $ OPERANDS#$anonymous_type_9#domain.);
2026 #if 1 /* 07/IX-2008 */
2027 link_upcxx . . $ link_up(252e71a3ed0d1697).(code);
2028 #endif
2029 return code;
2030 }
2031
2032 /*----------------------------------------------------------------------
2033 -- domain_arity - determine arity of domain.
2034 --
2035 -- This routine returns arity of specified domain, which is number of
2036 -- its free dummy indices. */
2037
2038 int domain_aritycxx . . $ `external/glpk/glpmpl.h:462:9`!(MPLcxx . . $ MPL# *mpl, DOMAINcxx . . $ `external/glpk/glpmpl.h:45:9`! *domain)
2039 { DOMAIN_BLOCKcxx . . $ DOMAIN_BLOCK# *block;
2040 DOMAIN_SLOTcxx . . $ DOMAIN_SLOT# *slot;
2041 int arity;
2042 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl == mpl);
2043 arity = 0;
2044 for (block = domain->listcxx . . $ DOMAIN1#list.; block != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; block = block->nextcxx . . $ DOMAIN_BLOCK#next.)
2045 for (slot = block->listcxx . . $ DOMAIN_BLOCK#list.; slot != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; slot = slot->nextcxx . . $ DOMAIN_SLOT#next.)
2046 if (slot->codecxx . . $ DOMAIN_SLOT#code. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) arity++;
2047 return arity;
2048 }
2049
2050 /*----------------------------------------------------------------------
2051 -- set_expression - parse set expression.
2052 --
2053 -- This routine parses primary expression using the syntax:
2054 --
2055 -- <primary expression> ::= { }
2056 -- <primary expression> ::= <indexing expression> */
2057
2058 CODEcxx . . $ CODE# *set_expressioncxx . . $ `external/glpk/glpmpl.h:466:9`!(MPLcxx . . $ MPL# *mpl)
2059 { CODEcxx . . $ CODE# *code;
2060 OPERANDScxx . . $ OPERANDS# arg;
2061 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!);
2062 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* { */);
2063 /* check a token that follows the left brace */
2064 if (mpl->tokencxx . . $ MPL#token. == T_RBRACEcxx . . $ `external/glpk/glpmpl.h:176:9`!)
2065 { /* it is the right brace, so the resultant is an empty set of
2066 dimension 1 */
2067 arg.listcxx . . $ OPERANDS#list. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
2068 /* generate pseudo-code to build the resultant set */
2069 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, O_MAKEcxx . . $ `external/glpk/glpmpl.h:2084:9`!, &arg, A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!, 1);
2070 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* } */);
2071 }
2072 else
2073 { /* the next token begins an indexing expression */
2074 unget_tokencxx . . $ `external/glpk/glpmpl.h:353:9`!(mpl);
2075 arg.loopcxx . . $ OPERANDS#loop..domaincxx . . $ OPERANDS#$anonymous_type_9#domain. = indexing_expressioncxx . . $ `external/glpk/glpmpl.h:450:9`!(mpl);
2076 arg.loopcxx . . $ OPERANDS#loop..xcxx . . $ OPERANDS#$anonymous_type_9#x. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; /* integrand is not used */
2077 /* close the scope of the indexing expression */
2078 close_scopecxx . . $ `external/glpk/glpmpl.h:454:9`!(mpl, arg.loopcxx . . $ OPERANDS#loop..domaincxx . . $ OPERANDS#$anonymous_type_9#domain.);
2079 /* generate pseudo-code to build the resultant set */
2080 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, O_BUILDcxx . . $ `external/glpk/glpmpl.h:2164:9`!, &arg, A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!,
2081 domain_aritycxx . . $ `external/glpk/glpmpl.h:462:9`!(mpl, arg.loopcxx . . $ OPERANDS#loop..domaincxx . . $ OPERANDS#$anonymous_type_9#domain.));
2082 #if 1 /* 07/IX-2008 */
2083 link_upcxx . . $ link_up(252e71a3ed0d1697).(code);
2084 #endif
2085 }
2086 return code;
2087 }
2088
2089 /*----------------------------------------------------------------------
2090 -- branched_expression - parse conditional expression.
2091 --
2092 -- This routine parses primary expression using the syntax:
2093 --
2094 -- <primary expression> ::= <branched expression>
2095 -- <branched expression> ::= if <logical expression> then <expression 9>
2096 -- <branched expression> ::= if <logical expression> then <expression 9>
2097 -- else <expression 9>
2098 -- <logical expression> ::= <expression 13> */
2099
2100 CODEcxx . . $ CODE# *branched_expressioncxx . . $ `external/glpk/glpmpl.h:470:9`!(MPLcxx . . $ MPL# *mpl)
2101 { CODEcxx . . $ CODE# *code, *x, *y, *z;
2102 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_IFcxx . . $ `external/glpk/glpmpl.h:139:9`!);
2103 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* if */);
2104 /* parse <logical expression> that follows 'if' */
2105 x = expression_13cxx . . $ `external/glpk/glpmpl.h:542:9`!(mpl);
2106 /* convert the expression to logical type, if necessary */
2107 if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2108 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2109 if (x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2110 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLOGcxx . . $ `external/glpk/glpmpl.h:2094:9`!, x, A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!, 0);
2111 /* now the expression must be of logical type */
2112 if (x->typecxx . . $ CODE#type. != A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!)
2113 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following if has invalid type");
2114 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(x->dim == 0);
2115 /* the keyword 'then' must follow the logical expression */
2116 if (mpl->tokencxx . . $ MPL#token. != T_THENcxx . . $ `external/glpk/glpmpl.h:149:9`!)
2117 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "keyword then missing where expected");
2118 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* then */);
2119 /* parse <expression> that follows 'then' and check its type */
2120 y = expression_9cxx . . $ `external/glpk/glpmpl.h:526:9`!(mpl);
2121 if (!(y->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`! ||
2122 y->typecxx . . $ CODE#type. == A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`! || y->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!))
2123 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following then has invalid type");
2124 /* if the expression that follows the keyword 'then' is elemental
2125 set, the keyword 'else' cannot be omitted; otherwise else-part
2126 is optional */
2127 if (mpl->tokencxx . . $ MPL#token. != T_ELSEcxx . . $ `external/glpk/glpmpl.h:138:9`!)
2128 { if (y->typecxx . . $ CODE#type. == A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
2129 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "keyword else missing where expected");
2130 z = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
2131 goto skip;
2132 }
2133 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* else */);
2134 /* parse <expression> that follow 'else' and check its type */
2135 z = expression_9cxx . . $ `external/glpk/glpmpl.h:526:9`!(mpl);
2136 if (!(z->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || z->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`! ||
2137 z->typecxx . . $ CODE#type. == A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`! || z->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!))
2138 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following else has invalid type");
2139 /* convert to identical types, if necessary */
2140 if (y->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`! || z->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!)
2141 { if (y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2142 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2143 if (y->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2144 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLFMcxx . . $ `external/glpk/glpmpl.h:2096:9`!, y, A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!, 0);
2145 if (z->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2146 z = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, z, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2147 if (z->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2148 z = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLFMcxx . . $ `external/glpk/glpmpl.h:2096:9`!, z, A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!, 0);
2149 }
2150 if (y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`! || z->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2151 { if (y->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2152 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, y, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
2153 if (z->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2154 z = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, z, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
2155 }
2156 /* now both expressions must have identical types */
2157 if (y->typecxx . . $ CODE#type. != z->typecxx . . $ CODE#type.)
2158 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expressions following then and else have incompati"
2159 "ble types");
2160 /* and identical dimensions */
2161 if (y->dimcxx . . $ CODE#dim. != z->dimcxx . . $ CODE#dim.)
2162 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expressions following then and else have different"
2163 " dimensions %d and %d, respectively", y->dimcxx . . $ CODE#dim., z->dimcxx . . $ CODE#dim.);
2164 skip: /* generate pseudo-code to perform branching */
2165 code = make_ternarycxx . . $ `external/glpk/glpmpl.h:378:9`!(mpl, O_FORKcxx . . $ `external/glpk/glpmpl.h:2151:9`!, x, y, z, y->typecxx . . $ CODE#type., y->dimcxx . . $ CODE#dim.);
2166 return code;
2167 }
2168
2169 /*----------------------------------------------------------------------
2170 -- primary_expression - parse primary expression.
2171 --
2172 -- This routine parses primary expression using the syntax:
2173 --
2174 -- <primary expression> ::= <numeric literal>
2175 -- <primary expression> ::= Infinity
2176 -- <primary expression> ::= <string literal>
2177 -- <primary expression> ::= <dummy index>
2178 -- <primary expression> ::= <set name>
2179 -- <primary expression> ::= <set name> [ <subscript list> ]
2180 -- <primary expression> ::= <parameter name>
2181 -- <primary expression> ::= <parameter name> [ <subscript list> ]
2182 -- <primary expression> ::= <variable name>
2183 -- <primary expression> ::= <variable name> [ <subscript list> ]
2184 -- <primary expression> ::= <built-in function> ( <argument list> )
2185 -- <primary expression> ::= ( <expression list> )
2186 -- <primary expression> ::= <iterated expression>
2187 -- <primary expression> ::= { }
2188 -- <primary expression> ::= <indexing expression>
2189 -- <primary expression> ::= <branched expression>
2190 --
2191 -- For complete list of syntactic rules for <primary expression> see
2192 -- comments to the corresponding parsing routines. */
2193
2194 CODEcxx . . $ CODE# *primary_expressioncxx . . $ `external/glpk/glpmpl.h:474:9`!(MPLcxx . . $ MPL# *mpl)
2195 { CODEcxx . . $ CODE# *code;
2196 if (mpl->tokencxx . . $ MPL#token. == T_NUMBERcxx . . $ `external/glpk/glpmpl.h:131:9`!)
2197 { /* parse numeric literal */
2198 code = numeric_literalcxx . . $ `external/glpk/glpmpl.h:383:9`!(mpl);
2199 }
2200 #if 1 /* 21/VII-2006 */
2201 else if (mpl->tokencxx . . $ MPL#token. == T_INFINITYcxx . . $ `external/glpk/glpmpl.h:141:9`!)
2202 { /* parse "infinity" */
2203 OPERANDScxx . . $ OPERANDS# arg;
2204 arg.numcxx . . $ OPERANDS#num. = DBL_MAXcxx . . $ `<external>/18143172452841944454/float.h:105:9`!;
2205 code = make_codecxx . . $ `external/glpk/glpmpl.h:365:9`!(mpl, O_NUMBERcxx . . $ `external/glpk/glpmpl.h:2075:9`!, &arg, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2206 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* Infinity */);
2207 }
2208 #endif
2209 else if (mpl->tokencxx . . $ MPL#token. == T_STRINGcxx . . $ `external/glpk/glpmpl.h:132:9`!)
2210 { /* parse string literal */
2211 code = string_literalcxx . . $ `external/glpk/glpmpl.h:387:9`!(mpl);
2212 }
2213 else if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
2214 { int next_token;
2215 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
2216 next_token = mpl->tokencxx . . $ MPL#token.;
2217 unget_tokencxx . . $ `external/glpk/glpmpl.h:353:9`!(mpl);
2218 /* check a token that follows <symbolic name> */
2219 switch (next_token)
2220 { case T_LBRACKETcxx . . $ `external/glpk/glpmpl.h:173:9`!:
2221 /* parse reference to subscripted object */
2222 code = object_referencecxx . . $ `external/glpk/glpmpl.h:407:9`!(mpl);
2223 break;
2224 case T_LEFTcxx . . $ `external/glpk/glpmpl.h:171:9`!:
2225 /* parse reference to built-in function */
2226 code = function_referencecxx . . $ `external/glpk/glpmpl.h:421:9`!(mpl);
2227 break;
2228 case T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!:
2229 /* parse iterated expression */
2230 code = iterated_expressioncxx . . $ `external/glpk/glpmpl.h:458:9`!(mpl);
2231 break;
2232 default:
2233 /* parse reference to unsubscripted object */
2234 code = object_referencecxx . . $ `external/glpk/glpmpl.h:407:9`!(mpl);
2235 break;
2236 }
2237 }
2238 else if (mpl->tokencxx . . $ MPL#token. == T_LEFTcxx . . $ `external/glpk/glpmpl.h:171:9`!)
2239 { /* parse parenthesized expression */
2240 code = expression_listcxx . . $ `external/glpk/glpmpl.h:442:9`!(mpl);
2241 }
2242 else if (mpl->tokencxx . . $ MPL#token. == T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!)
2243 { /* parse set expression */
2244 code = set_expressioncxx . . $ `external/glpk/glpmpl.h:466:9`!(mpl);
2245 }
2246 else if (mpl->tokencxx . . $ MPL#token. == T_IFcxx . . $ `external/glpk/glpmpl.h:139:9`!)
2247 { /* parse conditional expression */
2248 code = branched_expressioncxx . . $ `external/glpk/glpmpl.h:470:9`!(mpl);
2249 }
2250 else if (is_reservedcxx . . $ `external/glpk/glpmpl.h:361:9`!(mpl))
2251 { /* other reserved keywords cannot be used here */
2252 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid use of reserved keyword %s", mpl->imagecxx . . $ MPL#image.);
2253 }
2254 else
2255 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in expression");
2256 return code;
2257 }
2258
2259 /*----------------------------------------------------------------------
2260 -- error_preceding - raise error if preceding operand has wrong type.
2261 --
2262 -- This routine is called to raise error if operand that precedes some
2263 -- infix operator has invalid type. */
2264
2265 void error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(MPLcxx . . $ MPL# *mpl, char *opstr)
2266 { mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "operand preceding %s has invalid type", opstr);
2267 /* no return */
2268 }
2269
2270 /*----------------------------------------------------------------------
2271 -- error_following - raise error if following operand has wrong type.
2272 --
2273 -- This routine is called to raise error if operand that follows some
2274 -- infix operator has invalid type. */
2275
2276 void error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(MPLcxx . . $ MPL# *mpl, char *opstr)
2277 { mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "operand following %s has invalid type", opstr);
2278 /* no return */
2279 }
2280
2281 /*----------------------------------------------------------------------
2282 -- error_dimension - raise error if operands have different dimension.
2283 --
2284 -- This routine is called to raise error if two operands of some infix
2285 -- operator have different dimension. */
2286
2287 void error_dimensioncxx . . $ `external/glpk/glpmpl.h:486:9`!(MPLcxx . . $ MPL# *mpl, char *opstr, int dim1, int dim2)
2288 { mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "operands preceding and following %s have different di"
2289 "mensions %d and %d, respectively", opstr, dim1, dim2);
2290 /* no return */
2291 }
2292
2293 /*----------------------------------------------------------------------
2294 -- expression_0 - parse expression of level 0.
2295 --
2296 -- This routine parses expression of level 0 using the syntax:
2297 --
2298 -- <expression 0> ::= <primary expression> */
2299
2300 CODEcxx . . $ CODE# *expression_0cxx . . $ `external/glpk/glpmpl.h:490:9`!(MPLcxx . . $ MPL# *mpl)
2301 { CODEcxx . . $ CODE# *code;
2302 code = primary_expressioncxx . . $ `external/glpk/glpmpl.h:474:9`!(mpl);
2303 return code;
2304 }
2305
2306 /*----------------------------------------------------------------------
2307 -- expression_1 - parse expression of level 1.
2308 --
2309 -- This routine parses expression of level 1 using the syntax:
2310 --
2311 -- <expression 1> ::= <expression 0>
2312 -- <expression 1> ::= <expression 0> <power> <expression 1>
2313 -- <expression 1> ::= <expression 0> <power> <expression 2>
2314 -- <power> ::= ^ | ** */
2315
2316 CODEcxx . . $ CODE# *expression_1cxx . . $ `external/glpk/glpmpl.h:494:9`!(MPLcxx . . $ MPL# *mpl)
2317 { CODEcxx . . $ CODE# *x, *y;
2318 char opstr[8];
2319 x = expression_0cxx . . $ `external/glpk/glpmpl.h:490:9`!(mpl);
2320 if (mpl->tokencxx . . $ MPL#token. == T_POWERcxx . . $ `external/glpk/glpmpl.h:156:9`!)
2321 { strcpycxx . . $ strcpy(b7b3a83273496486).(opstr, mpl->imagecxx . . $ MPL#image.);
2322 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(strlen(opstr) < sizeof(opstr));
2323 if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2324 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2325 if (x->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2326 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, opstr);
2327 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ^ | ** */);
2328 if (mpl->tokencxx . . $ MPL#token. == T_PLUScxx . . $ `external/glpk/glpmpl.h:152:9`! || mpl->tokencxx . . $ MPL#token. == T_MINUScxx . . $ `external/glpk/glpmpl.h:153:9`!)
2329 y = expression_2cxx . . $ `external/glpk/glpmpl.h:498:9`!(mpl);
2330 else
2331 y = expression_1cxx . . $ `external/glpk/glpmpl.h:494:9`!(mpl);
2332 if (y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2333 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2334 if (y->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2335 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, opstr);
2336 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_POWERcxx . . $ `external/glpk/glpmpl.h:2122:9`!, x, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2337 }
2338 return x;
2339 }
2340
2341 /*----------------------------------------------------------------------
2342 -- expression_2 - parse expression of level 2.
2343 --
2344 -- This routine parses expression of level 2 using the syntax:
2345 --
2346 -- <expression 2> ::= <expression 1>
2347 -- <expression 2> ::= + <expression 1>
2348 -- <expression 2> ::= - <expression 1> */
2349
2350 CODEcxx . . $ CODE# *expression_2cxx . . $ `external/glpk/glpmpl.h:498:9`!(MPLcxx . . $ MPL# *mpl)
2351 { CODEcxx . . $ CODE# *x;
2352 if (mpl->tokencxx . . $ MPL#token. == T_PLUScxx . . $ `external/glpk/glpmpl.h:152:9`!)
2353 { get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* + */);
2354 x = expression_1cxx . . $ `external/glpk/glpmpl.h:494:9`!(mpl);
2355 if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2356 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2357 if (!(x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || x->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!))
2358 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "+");
2359 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_PLUScxx . . $ `external/glpk/glpmpl.h:2097:9`!, x, x->typecxx . . $ CODE#type., 0);
2360 }
2361 else if (mpl->tokencxx . . $ MPL#token. == T_MINUScxx . . $ `external/glpk/glpmpl.h:153:9`!)
2362 { get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* - */);
2363 x = expression_1cxx . . $ `external/glpk/glpmpl.h:494:9`!(mpl);
2364 if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2365 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2366 if (!(x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || x->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!))
2367 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "-");
2368 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_MINUScxx . . $ `external/glpk/glpmpl.h:2098:9`!, x, x->typecxx . . $ CODE#type., 0);
2369 }
2370 else
2371 x = expression_1cxx . . $ `external/glpk/glpmpl.h:494:9`!(mpl);
2372 return x;
2373 }
2374
2375 /*----------------------------------------------------------------------
2376 -- expression_3 - parse expression of level 3.
2377 --
2378 -- This routine parses expression of level 3 using the syntax:
2379 --
2380 -- <expression 3> ::= <expression 2>
2381 -- <expression 3> ::= <expression 3> * <expression 2>
2382 -- <expression 3> ::= <expression 3> / <expression 2>
2383 -- <expression 3> ::= <expression 3> div <expression 2>
2384 -- <expression 3> ::= <expression 3> mod <expression 2> */
2385
2386 CODEcxx . . $ CODE# *expression_3cxx . . $ `external/glpk/glpmpl.h:502:9`!(MPLcxx . . $ MPL# *mpl)
2387 { CODEcxx . . $ CODE# *x, *y;
2388 x = expression_2cxx . . $ `external/glpk/glpmpl.h:498:9`!(mpl);
2389 for (;;)
2390 { if (mpl->tokencxx . . $ MPL#token. == T_ASTERISKcxx . . $ `external/glpk/glpmpl.h:154:9`!)
2391 { if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2392 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2393 if (!(x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || x->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!))
2394 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, "*");
2395 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* * */);
2396 y = expression_2cxx . . $ `external/glpk/glpmpl.h:498:9`!(mpl);
2397 if (y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2398 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2399 if (!(y->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || y->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!))
2400 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "*");
2401 if (x->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`! && y->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!)
2402 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "multiplication of linear forms not allowed");
2403 if (x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! && y->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2404 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_MULcxx . . $ `external/glpk/glpmpl.h:2118:9`!, x, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2405 else
2406 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_MULcxx . . $ `external/glpk/glpmpl.h:2118:9`!, x, y, A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!, 0);
2407 }
2408 else if (mpl->tokencxx . . $ MPL#token. == T_SLASHcxx . . $ `external/glpk/glpmpl.h:155:9`!)
2409 { if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2410 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2411 if (!(x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || x->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!))
2412 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, "/");
2413 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* / */);
2414 y = expression_2cxx . . $ `external/glpk/glpmpl.h:498:9`!(mpl);
2415 if (y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2416 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2417 if (y->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2418 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "/");
2419 if (x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2420 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_DIVcxx . . $ `external/glpk/glpmpl.h:2119:9`!, x, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2421 else
2422 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_DIVcxx . . $ `external/glpk/glpmpl.h:2119:9`!, x, y, A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!, 0);
2423 }
2424 else if (mpl->tokencxx . . $ MPL#token. == T_DIVcxx . . $ `external/glpk/glpmpl.h:137:9`!)
2425 { if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2426 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2427 if (x->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2428 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, "div");
2429 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* div */);
2430 y = expression_2cxx . . $ `external/glpk/glpmpl.h:498:9`!(mpl);
2431 if (y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2432 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2433 if (y->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2434 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "div");
2435 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_IDIVcxx . . $ `external/glpk/glpmpl.h:2120:9`!, x, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2436 }
2437 else if (mpl->tokencxx . . $ MPL#token. == T_MODcxx . . $ `external/glpk/glpmpl.h:144:9`!)
2438 { if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2439 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2440 if (x->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2441 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, "mod");
2442 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* mod */);
2443 y = expression_2cxx . . $ `external/glpk/glpmpl.h:498:9`!(mpl);
2444 if (y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2445 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2446 if (y->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2447 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "mod");
2448 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_MODcxx . . $ `external/glpk/glpmpl.h:2121:9`!, x, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2449 }
2450 else
2451 break;
2452 }
2453 return x;
2454 }
2455
2456 /*----------------------------------------------------------------------
2457 -- expression_4 - parse expression of level 4.
2458 --
2459 -- This routine parses expression of level 4 using the syntax:
2460 --
2461 -- <expression 4> ::= <expression 3>
2462 -- <expression 4> ::= <expression 4> + <expression 3>
2463 -- <expression 4> ::= <expression 4> - <expression 3>
2464 -- <expression 4> ::= <expression 4> less <expression 3> */
2465
2466 CODEcxx . . $ CODE# *expression_4cxx . . $ `external/glpk/glpmpl.h:506:9`!(MPLcxx . . $ MPL# *mpl)
2467 { CODEcxx . . $ CODE# *x, *y;
2468 x = expression_3cxx . . $ `external/glpk/glpmpl.h:502:9`!(mpl);
2469 for (;;)
2470 { if (mpl->tokencxx . . $ MPL#token. == T_PLUScxx . . $ `external/glpk/glpmpl.h:152:9`!)
2471 { if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2472 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2473 if (!(x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || x->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!))
2474 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, "+");
2475 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* + */);
2476 y = expression_3cxx . . $ `external/glpk/glpmpl.h:502:9`!(mpl);
2477 if (y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2478 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2479 if (!(y->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || y->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!))
2480 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "+");
2481 if (x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! && y->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!)
2482 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLFMcxx . . $ `external/glpk/glpmpl.h:2096:9`!, x, A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!, 0);
2483 if (x->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`! && y->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2484 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLFMcxx . . $ `external/glpk/glpmpl.h:2096:9`!, y, A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!, 0);
2485 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_ADDcxx . . $ `external/glpk/glpmpl.h:2115:9`!, x, y, x->typecxx . . $ CODE#type., 0);
2486 }
2487 else if (mpl->tokencxx . . $ MPL#token. == T_MINUScxx . . $ `external/glpk/glpmpl.h:153:9`!)
2488 { if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2489 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2490 if (!(x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || x->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!))
2491 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, "-");
2492 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* - */);
2493 y = expression_3cxx . . $ `external/glpk/glpmpl.h:502:9`!(mpl);
2494 if (y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2495 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2496 if (!(y->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || y->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!))
2497 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "-");
2498 if (x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! && y->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!)
2499 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLFMcxx . . $ `external/glpk/glpmpl.h:2096:9`!, x, A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!, 0);
2500 if (x->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`! && y->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2501 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLFMcxx . . $ `external/glpk/glpmpl.h:2096:9`!, y, A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!, 0);
2502 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_SUBcxx . . $ `external/glpk/glpmpl.h:2116:9`!, x, y, x->typecxx . . $ CODE#type., 0);
2503 }
2504 else if (mpl->tokencxx . . $ MPL#token. == T_LESScxx . . $ `external/glpk/glpmpl.h:143:9`!)
2505 { if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2506 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2507 if (x->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2508 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, "less");
2509 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* less */);
2510 y = expression_3cxx . . $ `external/glpk/glpmpl.h:502:9`!(mpl);
2511 if (y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2512 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2513 if (y->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2514 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "less");
2515 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_LESScxx . . $ `external/glpk/glpmpl.h:2117:9`!, x, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2516 }
2517 else
2518 break;
2519 }
2520 return x;
2521 }
2522
2523 /*----------------------------------------------------------------------
2524 -- expression_5 - parse expression of level 5.
2525 --
2526 -- This routine parses expression of level 5 using the syntax:
2527 --
2528 -- <expression 5> ::= <expression 4>
2529 -- <expression 5> ::= <expression 5> & <expression 4> */
2530
2531 CODEcxx . . $ CODE# *expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(MPLcxx . . $ MPL# *mpl)
2532 { CODEcxx . . $ CODE# *x, *y;
2533 x = expression_4cxx . . $ `external/glpk/glpmpl.h:506:9`!(mpl);
2534 for (;;)
2535 { if (mpl->tokencxx . . $ MPL#token. == T_CONCATcxx . . $ `external/glpk/glpmpl.h:163:9`!)
2536 { if (x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2537 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, x, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
2538 if (x->typecxx . . $ CODE#type. != A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2539 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, "&");
2540 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* & */);
2541 y = expression_4cxx . . $ `external/glpk/glpmpl.h:506:9`!(mpl);
2542 if (y->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2543 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, y, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
2544 if (y->typecxx . . $ CODE#type. != A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2545 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "&");
2546 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_CONCATcxx . . $ `external/glpk/glpmpl.h:2128:9`!, x, y, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
2547 }
2548 else
2549 break;
2550 }
2551 return x;
2552 }
2553
2554 /*----------------------------------------------------------------------
2555 -- expression_6 - parse expression of level 6.
2556 --
2557 -- This routine parses expression of level 6 using the syntax:
2558 --
2559 -- <expression 6> ::= <expression 5>
2560 -- <expression 6> ::= <expression 5> .. <expression 5>
2561 -- <expression 6> ::= <expression 5> .. <expression 5> by
2562 -- <expression 5> */
2563
2564 CODEcxx . . $ CODE# *expression_6cxx . . $ `external/glpk/glpmpl.h:514:9`!(MPLcxx . . $ MPL# *mpl)
2565 { CODEcxx . . $ CODE# *x, *y, *z;
2566 x = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
2567 if (mpl->tokencxx . . $ MPL#token. == T_DOTScxx . . $ `external/glpk/glpmpl.h:170:9`!)
2568 { if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2569 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2570 if (x->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2571 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, "..");
2572 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* .. */);
2573 y = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
2574 if (y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2575 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2576 if (y->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2577 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "..");
2578 if (mpl->tokencxx . . $ MPL#token. == T_BYcxx . . $ `external/glpk/glpmpl.h:134:9`!)
2579 { get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* by */);
2580 z = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
2581 if (z->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2582 z = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, z, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2583 if (z->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2584 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "by");
2585 }
2586 else
2587 z = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
2588 x = make_ternarycxx . . $ `external/glpk/glpmpl.h:378:9`!(mpl, O_DOTScxx . . $ `external/glpk/glpmpl.h:2150:9`!, x, y, z, A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!, 1);
2589 }
2590 return x;
2591 }
2592
2593 /*----------------------------------------------------------------------
2594 -- expression_7 - parse expression of level 7.
2595 --
2596 -- This routine parses expression of level 7 using the syntax:
2597 --
2598 -- <expression 7> ::= <expression 6>
2599 -- <expression 7> ::= <expression 7> cross <expression 6> */
2600
2601 CODEcxx . . $ CODE# *expression_7cxx . . $ `external/glpk/glpmpl.h:518:9`!(MPLcxx . . $ MPL# *mpl)
2602 { CODEcxx . . $ CODE# *x, *y;
2603 x = expression_6cxx . . $ `external/glpk/glpmpl.h:514:9`!(mpl);
2604 for (;;)
2605 { if (mpl->tokencxx . . $ MPL#token. == T_CROSScxx . . $ `external/glpk/glpmpl.h:135:9`!)
2606 { if (x->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
2607 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, "cross");
2608 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* cross */);
2609 y = expression_6cxx . . $ `external/glpk/glpmpl.h:514:9`!(mpl);
2610 if (y->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
2611 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "cross");
2612 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_CROSScxx . . $ `external/glpk/glpmpl.h:2141:9`!, x, y, A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!,
2613 x->dimcxx . . $ CODE#dim. + y->dimcxx . . $ CODE#dim.);
2614 }
2615 else
2616 break;
2617 }
2618 return x;
2619 }
2620
2621 /*----------------------------------------------------------------------
2622 -- expression_8 - parse expression of level 8.
2623 --
2624 -- This routine parses expression of level 8 using the syntax:
2625 --
2626 -- <expression 8> ::= <expression 7>
2627 -- <expression 8> ::= <expression 8> inter <expression 7> */
2628
2629 CODEcxx . . $ CODE# *expression_8cxx . . $ `external/glpk/glpmpl.h:522:9`!(MPLcxx . . $ MPL# *mpl)
2630 { CODEcxx . . $ CODE# *x, *y;
2631 x = expression_7cxx . . $ `external/glpk/glpmpl.h:518:9`!(mpl);
2632 for (;;)
2633 { if (mpl->tokencxx . . $ MPL#token. == T_INTERcxx . . $ `external/glpk/glpmpl.h:142:9`!)
2634 { if (x->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
2635 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, "inter");
2636 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* inter */);
2637 y = expression_7cxx . . $ `external/glpk/glpmpl.h:518:9`!(mpl);
2638 if (y->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
2639 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "inter");
2640 if (x->dimcxx . . $ CODE#dim. != y->dimcxx . . $ CODE#dim.)
2641 error_dimensioncxx . . $ `external/glpk/glpmpl.h:486:9`!(mpl, "inter", x->dimcxx . . $ CODE#dim., y->dimcxx . . $ CODE#dim.);
2642 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_INTERcxx . . $ `external/glpk/glpmpl.h:2140:9`!, x, y, A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!, x->dimcxx . . $ CODE#dim.);
2643 }
2644 else
2645 break;
2646 }
2647 return x;
2648 }
2649
2650 /*----------------------------------------------------------------------
2651 -- expression_9 - parse expression of level 9.
2652 --
2653 -- This routine parses expression of level 9 using the syntax:
2654 --
2655 -- <expression 9> ::= <expression 8>
2656 -- <expression 9> ::= <expression 9> union <expression 8>
2657 -- <expression 9> ::= <expression 9> diff <expression 8>
2658 -- <expression 9> ::= <expression 9> symdiff <expression 8> */
2659
2660 CODEcxx . . $ CODE# *expression_9cxx . . $ `external/glpk/glpmpl.h:526:9`!(MPLcxx . . $ MPL# *mpl)
2661 { CODEcxx . . $ CODE# *x, *y;
2662 x = expression_8cxx . . $ `external/glpk/glpmpl.h:522:9`!(mpl);
2663 for (;;)
2664 { if (mpl->tokencxx . . $ MPL#token. == T_UNIONcxx . . $ `external/glpk/glpmpl.h:150:9`!)
2665 { if (x->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
2666 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, "union");
2667 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* union */);
2668 y = expression_8cxx . . $ `external/glpk/glpmpl.h:522:9`!(mpl);
2669 if (y->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
2670 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "union");
2671 if (x->dimcxx . . $ CODE#dim. != y->dimcxx . . $ CODE#dim.)
2672 error_dimensioncxx . . $ `external/glpk/glpmpl.h:486:9`!(mpl, "union", x->dimcxx . . $ CODE#dim., y->dimcxx . . $ CODE#dim.);
2673 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_UNIONcxx . . $ `external/glpk/glpmpl.h:2137:9`!, x, y, A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!, x->dimcxx . . $ CODE#dim.);
2674 }
2675 else if (mpl->tokencxx . . $ MPL#token. == T_DIFFcxx . . $ `external/glpk/glpmpl.h:136:9`!)
2676 { if (x->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
2677 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, "diff");
2678 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* diff */);
2679 y = expression_8cxx . . $ `external/glpk/glpmpl.h:522:9`!(mpl);
2680 if (y->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
2681 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "diff");
2682 if (x->dimcxx . . $ CODE#dim. != y->dimcxx . . $ CODE#dim.)
2683 error_dimensioncxx . . $ `external/glpk/glpmpl.h:486:9`!(mpl, "diff", x->dimcxx . . $ CODE#dim., y->dimcxx . . $ CODE#dim.);
2684 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_DIFFcxx . . $ `external/glpk/glpmpl.h:2138:9`!, x, y, A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!, x->dimcxx . . $ CODE#dim.);
2685 }
2686 else if (mpl->tokencxx . . $ MPL#token. == T_SYMDIFFcxx . . $ `external/glpk/glpmpl.h:148:9`!)
2687 { if (x->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
2688 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, "symdiff");
2689 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* symdiff */);
2690 y = expression_8cxx . . $ `external/glpk/glpmpl.h:522:9`!(mpl);
2691 if (y->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
2692 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, "symdiff");
2693 if (x->dimcxx . . $ CODE#dim. != y->dimcxx . . $ CODE#dim.)
2694 error_dimensioncxx . . $ `external/glpk/glpmpl.h:486:9`!(mpl, "symdiff", x->dimcxx . . $ CODE#dim., y->dimcxx . . $ CODE#dim.);
2695 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_SYMDIFFcxx . . $ `external/glpk/glpmpl.h:2139:9`!, x, y, A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!, x->dimcxx . . $ CODE#dim.);
2696 }
2697 else
2698 break;
2699 }
2700 return x;
2701 }
2702
2703 /*----------------------------------------------------------------------
2704 -- expression_10 - parse expression of level 10.
2705 --
2706 -- This routine parses expression of level 10 using the syntax:
2707 --
2708 -- <expression 10> ::= <expression 9>
2709 -- <expression 10> ::= <expression 9> <rho> <expression 9>
2710 -- <rho> ::= < | <= | = | == | >= | > | <> | != | in | not in | ! in |
2711 -- within | not within | ! within */
2712
2713 CODEcxx . . $ CODE# *expression_10cxx . . $ `external/glpk/glpmpl.h:530:9`!(MPLcxx . . $ MPL# *mpl)
2714 { CODEcxx . . $ CODE# *x, *y;
2715 int op = -1;
2716 char opstr[16];
2717 x = expression_9cxx . . $ `external/glpk/glpmpl.h:526:9`!(mpl);
2718 strcpycxx . . $ strcpy(b7b3a83273496486).(opstr, "");
2719 switch (mpl->tokencxx . . $ MPL#token.)
2720 { case T_LTcxx . . $ `external/glpk/glpmpl.h:157:9`!:
2721 op = O_LTcxx . . $ `external/glpk/glpmpl.h:2129:9`!; break;
2722 case T_LEcxx . . $ `external/glpk/glpmpl.h:158:9`!:
2723 op = O_LEcxx . . $ `external/glpk/glpmpl.h:2130:9`!; break;
2724 case T_EQcxx . . $ `external/glpk/glpmpl.h:159:9`!:
2725 op = O_EQcxx . . $ `external/glpk/glpmpl.h:2131:9`!; break;
2726 case T_GEcxx . . $ `external/glpk/glpmpl.h:160:9`!:
2727 op = O_GEcxx . . $ `external/glpk/glpmpl.h:2132:9`!; break;
2728 case T_GTcxx . . $ `external/glpk/glpmpl.h:161:9`!:
2729 op = O_GTcxx . . $ `external/glpk/glpmpl.h:2133:9`!; break;
2730 case T_NEcxx . . $ `external/glpk/glpmpl.h:162:9`!:
2731 op = O_NEcxx . . $ `external/glpk/glpmpl.h:2134:9`!; break;
2732 case T_INcxx . . $ `external/glpk/glpmpl.h:140:9`!:
2733 op = O_INcxx . . $ `external/glpk/glpmpl.h:2142:9`!; break;
2734 case T_WITHINcxx . . $ `external/glpk/glpmpl.h:151:9`!:
2735 op = O_WITHINcxx . . $ `external/glpk/glpmpl.h:2144:9`!; break;
2736 case T_NOTcxx . . $ `external/glpk/glpmpl.h:145:9`!:
2737 strcpycxx . . $ strcpy(b7b3a83273496486).(opstr, mpl->imagecxx . . $ MPL#image.);
2738 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* not | ! */);
2739 if (mpl->tokencxx . . $ MPL#token. == T_INcxx . . $ `external/glpk/glpmpl.h:140:9`!)
2740 op = O_NOTINcxx . . $ `external/glpk/glpmpl.h:2143:9`!;
2741 else if (mpl->tokencxx . . $ MPL#token. == T_WITHINcxx . . $ `external/glpk/glpmpl.h:151:9`!)
2742 op = O_NOTWITHINcxx . . $ `external/glpk/glpmpl.h:2145:9`!;
2743 else
2744 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid use of %s", opstr);
2745 strcatcxx . . $ strcat(b7b3a83273496486).(opstr, " ");
2746 break;
2747 default:
2748 goto done;
2749 }
2750 strcatcxx . . $ strcat(b7b3a83273496486).(opstr, mpl->imagecxx . . $ MPL#image.);
2751 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(strlen(opstr) < sizeof(opstr));
2752 switch (op)
2753 { case O_EQcxx . . $ `external/glpk/glpmpl.h:2131:9`!:
2754 case O_NEcxx . . $ `external/glpk/glpmpl.h:2134:9`!:
2755 #if 1 /* 02/VIII-2008 */
2756 case O_LTcxx . . $ `external/glpk/glpmpl.h:2129:9`!:
2757 case O_LEcxx . . $ `external/glpk/glpmpl.h:2130:9`!:
2758 case O_GTcxx . . $ `external/glpk/glpmpl.h:2133:9`!:
2759 case O_GEcxx . . $ `external/glpk/glpmpl.h:2132:9`!:
2760 #endif
2761 if (!(x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!))
2762 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, opstr);
2763 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <rho> */);
2764 y = expression_9cxx . . $ `external/glpk/glpmpl.h:526:9`!(mpl);
2765 if (!(y->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!))
2766 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, opstr);
2767 if (x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! && y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2768 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, x, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
2769 if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`! && y->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2770 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, y, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
2771 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, op, x, y, A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!, 0);
2772 break;
2773 #if 0 /* 02/VIII-2008 */
2774 case O_LT:
2775 case O_LE:
2776 case O_GT:
2777 case O_GE:
2778 if (x->type == A_SYMBOLIC)
2779 x = make_unary(mpl, O_CVTNUM, x, A_NUMERIC, 0);
2780 if (x->type != A_NUMERIC)
2781 error_preceding(mpl, opstr);
2782 get_token(mpl /* <rho> */);
2783 y = expression_9(mpl);
2784 if (y->type == A_SYMBOLIC)
2785 y = make_unary(mpl, O_CVTNUM, y, A_NUMERIC, 0);
2786 if (y->type != A_NUMERIC)
2787 error_following(mpl, opstr);
2788 x = make_binary(mpl, op, x, y, A_LOGICAL, 0);
2789 break;
2790 #endif
2791 case O_INcxx . . $ `external/glpk/glpmpl.h:2142:9`!:
2792 case O_NOTINcxx . . $ `external/glpk/glpmpl.h:2143:9`!:
2793 if (x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2794 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, x, A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
2795 if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2796 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTTUPcxx . . $ `external/glpk/glpmpl.h:2095:9`!, x, A_TUPLEcxx . . $ `external/glpk/glpmpl.h:104:9`!, 1);
2797 if (x->typecxx . . $ CODE#type. != A_TUPLEcxx . . $ `external/glpk/glpmpl.h:104:9`!)
2798 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, opstr);
2799 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <rho> */);
2800 y = expression_9cxx . . $ `external/glpk/glpmpl.h:526:9`!(mpl);
2801 if (y->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
2802 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, opstr);
2803 if (x->dimcxx . . $ CODE#dim. != y->dimcxx . . $ CODE#dim.)
2804 error_dimensioncxx . . $ `external/glpk/glpmpl.h:486:9`!(mpl, opstr, x->dimcxx . . $ CODE#dim., y->dimcxx . . $ CODE#dim.);
2805 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, op, x, y, A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!, 0);
2806 break;
2807 case O_WITHINcxx . . $ `external/glpk/glpmpl.h:2144:9`!:
2808 case O_NOTWITHINcxx . . $ `external/glpk/glpmpl.h:2145:9`!:
2809 if (x->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
2810 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, opstr);
2811 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <rho> */);
2812 y = expression_9cxx . . $ `external/glpk/glpmpl.h:526:9`!(mpl);
2813 if (y->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
2814 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, opstr);
2815 if (x->dimcxx . . $ CODE#dim. != y->dimcxx . . $ CODE#dim.)
2816 error_dimensioncxx . . $ `external/glpk/glpmpl.h:486:9`!(mpl, opstr, x->dimcxx . . $ CODE#dim., y->dimcxx . . $ CODE#dim.);
2817 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, op, x, y, A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!, 0);
2818 break;
2819 default:
2820 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(op != op);
2821 }
2822 done: return x;
2823 }
2824
2825 /*----------------------------------------------------------------------
2826 -- expression_11 - parse expression of level 11.
2827 --
2828 -- This routine parses expression of level 11 using the syntax:
2829 --
2830 -- <expression 11> ::= <expression 10>
2831 -- <expression 11> ::= not <expression 10>
2832 -- <expression 11> ::= ! <expression 10> */
2833
2834 CODEcxx . . $ CODE# *expression_11cxx . . $ `external/glpk/glpmpl.h:534:9`!(MPLcxx . . $ MPL# *mpl)
2835 { CODEcxx . . $ CODE# *x;
2836 char opstr[8];
2837 if (mpl->tokencxx . . $ MPL#token. == T_NOTcxx . . $ `external/glpk/glpmpl.h:145:9`!)
2838 { strcpycxx . . $ strcpy(b7b3a83273496486).(opstr, mpl->imagecxx . . $ MPL#image.);
2839 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(strlen(opstr) < sizeof(opstr));
2840 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* not | ! */);
2841 x = expression_10cxx . . $ `external/glpk/glpmpl.h:530:9`!(mpl);
2842 if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2843 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2844 if (x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2845 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLOGcxx . . $ `external/glpk/glpmpl.h:2094:9`!, x, A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!, 0);
2846 if (x->typecxx . . $ CODE#type. != A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!)
2847 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, opstr);
2848 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_NOTcxx . . $ `external/glpk/glpmpl.h:2099:9`!, x, A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!, 0);
2849 }
2850 else
2851 x = expression_10cxx . . $ `external/glpk/glpmpl.h:530:9`!(mpl);
2852 return x;
2853 }
2854
2855 /*----------------------------------------------------------------------
2856 -- expression_12 - parse expression of level 12.
2857 --
2858 -- This routine parses expression of level 12 using the syntax:
2859 --
2860 -- <expression 12> ::= <expression 11>
2861 -- <expression 12> ::= <expression 12> and <expression 11>
2862 -- <expression 12> ::= <expression 12> && <expression 11> */
2863
2864 CODEcxx . . $ CODE# *expression_12cxx . . $ `external/glpk/glpmpl.h:538:9`!(MPLcxx . . $ MPL# *mpl)
2865 { CODEcxx . . $ CODE# *x, *y;
2866 char opstr[8];
2867 x = expression_11cxx . . $ `external/glpk/glpmpl.h:534:9`!(mpl);
2868 for (;;)
2869 { if (mpl->tokencxx . . $ MPL#token. == T_ANDcxx . . $ `external/glpk/glpmpl.h:133:9`!)
2870 { strcpycxx . . $ strcpy(b7b3a83273496486).(opstr, mpl->imagecxx . . $ MPL#image.);
2871 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(strlen(opstr) < sizeof(opstr));
2872 if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2873 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2874 if (x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2875 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLOGcxx . . $ `external/glpk/glpmpl.h:2094:9`!, x, A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!, 0);
2876 if (x->typecxx . . $ CODE#type. != A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!)
2877 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, opstr);
2878 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* and | && */);
2879 y = expression_11cxx . . $ `external/glpk/glpmpl.h:534:9`!(mpl);
2880 if (y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2881 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2882 if (y->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2883 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLOGcxx . . $ `external/glpk/glpmpl.h:2094:9`!, y, A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!, 0);
2884 if (y->typecxx . . $ CODE#type. != A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!)
2885 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, opstr);
2886 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_ANDcxx . . $ `external/glpk/glpmpl.h:2135:9`!, x, y, A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!, 0);
2887 }
2888 else
2889 break;
2890 }
2891 return x;
2892 }
2893
2894 /*----------------------------------------------------------------------
2895 -- expression_13 - parse expression of level 13.
2896 --
2897 -- This routine parses expression of level 13 using the syntax:
2898 --
2899 -- <expression 13> ::= <expression 12>
2900 -- <expression 13> ::= <expression 13> or <expression 12>
2901 -- <expression 13> ::= <expression 13> || <expression 12> */
2902
2903 CODEcxx . . $ CODE# *expression_13cxx . . $ `external/glpk/glpmpl.h:542:9`!(MPLcxx . . $ MPL# *mpl)
2904 { CODEcxx . . $ CODE# *x, *y;
2905 char opstr[8];
2906 x = expression_12cxx . . $ `external/glpk/glpmpl.h:538:9`!(mpl);
2907 for (;;)
2908 { if (mpl->tokencxx . . $ MPL#token. == T_ORcxx . . $ `external/glpk/glpmpl.h:146:9`!)
2909 { strcpycxx . . $ strcpy(b7b3a83273496486).(opstr, mpl->imagecxx . . $ MPL#image.);
2910 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(strlen(opstr) < sizeof(opstr));
2911 if (x->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2912 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, x, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2913 if (x->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2914 x = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLOGcxx . . $ `external/glpk/glpmpl.h:2094:9`!, x, A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!, 0);
2915 if (x->typecxx . . $ CODE#type. != A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!)
2916 error_precedingcxx . . $ `external/glpk/glpmpl.h:478:9`!(mpl, opstr);
2917 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* or | || */);
2918 y = expression_12cxx . . $ `external/glpk/glpmpl.h:538:9`!(mpl);
2919 if (y->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
2920 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, y, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
2921 if (y->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
2922 y = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLOGcxx . . $ `external/glpk/glpmpl.h:2094:9`!, y, A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!, 0);
2923 if (y->typecxx . . $ CODE#type. != A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!)
2924 error_followingcxx . . $ `external/glpk/glpmpl.h:482:9`!(mpl, opstr);
2925 x = make_binarycxx . . $ `external/glpk/glpmpl.h:373:9`!(mpl, O_ORcxx . . $ `external/glpk/glpmpl.h:2136:9`!, x, y, A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!, 0);
2926 }
2927 else
2928 break;
2929 }
2930 return x;
2931 }
2932
2933 /*----------------------------------------------------------------------
2934 -- set_statement - parse set statement.
2935 --
2936 -- This routine parses set statement using the syntax:
2937 --
2938 -- <set statement> ::= set <symbolic name> <alias> <domain>
2939 -- <attributes> ;
2940 -- <alias> ::= <empty>
2941 -- <alias> ::= <string literal>
2942 -- <domain> ::= <empty>
2943 -- <domain> ::= <indexing expression>
2944 -- <attributes> ::= <empty>
2945 -- <attributes> ::= <attributes> , dimen <numeric literal>
2946 -- <attributes> ::= <attributes> , within <expression 9>
2947 -- <attributes> ::= <attributes> , := <expression 9>
2948 -- <attributes> ::= <attributes> , default <expression 9>
2949 --
2950 -- Commae in <attributes> are optional and may be omitted anywhere. */
2951
2952 SETcxx . . $ SET# *set_statementcxx . . $ `external/glpk/glpmpl.h:546:9`!(MPLcxx . . $ MPL# *mpl)
2953 { SETcxx . . $ SET# *set;
2954 int dimen_used = 0;
2955 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "set"));
2956 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* set */);
2957 /* symbolic name must follow the keyword 'set' */
2958 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
2959 ;
2960 else if (is_reservedcxx . . $ `external/glpk/glpmpl.h:361:9`!(mpl))
2961 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid use of reserved keyword %s", mpl->imagecxx . . $ MPL#image.);
2962 else
2963 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "symbolic name missing where expected");
2964 /* there must be no other object with the same name */
2965 if (avl_find_nodecxx . . $ `external/glpk/glpavl.h:101:9`!(mpl->treecxx . . $ MPL#tree., mpl->imagecxx . . $ MPL#image.) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
2966 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s multiply declared", mpl->imagecxx . . $ MPL#image.);
2967 /* create model set */
2968 set = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(SET);
2969 set->namecxx . . $ SET#name. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
2970 strcpycxx . . $ strcpy(b7b3a83273496486).(set->namecxx . . $ SET#name., mpl->imagecxx . . $ MPL#image.);
2971 set->aliascxx . . $ SET#alias. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
2972 set->dimcxx . . $ SET#dim. = 0;
2973 set->domaincxx . . $ SET#domain. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
2974 set->dimencxx . . $ SET#dimen. = 0;
2975 set->withincxx . . $ SET#within. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
2976 set->assigncxx . . $ SET#assign. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
2977 set->optioncxx . . $ SET#option. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
2978 set->gadgetcxx . . $ SET#gadget. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
2979 set->datacxx . . $ SET#data. = 0;
2980 set->arraycxx . . $ SET#array. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
2981 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
2982 /* parse optional alias */
2983 if (mpl->tokencxx . . $ MPL#token. == T_STRINGcxx . . $ `external/glpk/glpmpl.h:132:9`!)
2984 { set->aliascxx . . $ SET#alias. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
2985 strcpycxx . . $ strcpy(b7b3a83273496486).(set->aliascxx . . $ SET#alias., mpl->imagecxx . . $ MPL#image.);
2986 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <string literal> */);
2987 }
2988 /* parse optional indexing expression */
2989 if (mpl->tokencxx . . $ MPL#token. == T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!)
2990 { set->domaincxx . . $ SET#domain. = indexing_expressioncxx . . $ `external/glpk/glpmpl.h:450:9`!(mpl);
2991 set->dimcxx . . $ SET#dim. = domain_aritycxx . . $ `external/glpk/glpmpl.h:462:9`!(mpl, set->domaincxx . . $ SET#domain.);
2992 }
2993 /* include the set name in the symbolic names table */
2994 { AVLNODEcxx . . $ AVLNODE# *node;
2995 node = avl_insert_nodecxx . . $ `external/glpk/glpavl.h:89:9`!(mpl->treecxx . . $ MPL#tree., set->namecxx . . $ SET#name.);
2996 avl_set_node_typecxx . . $ `external/glpk/glpavl.h:93:9`!(node, A_SETcxx . . $ `external/glpk/glpmpl.h:100:9`!);
2997 avl_set_node_linkcxx . . $ `external/glpk/glpavl.h:97:9`!(node, (void *)set);
2998 }
2999 /* parse the list of optional attributes */
3000 for (;;)
3001 { if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
3002 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
3003 else if (mpl->tokencxx . . $ MPL#token. == T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!)
3004 break;
3005 if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "dimen"))
3006 { /* dimension of set members */
3007 int dimen;
3008 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* dimen */);
3009 if (!(mpl->tokencxx . . $ MPL#token. == T_NUMBERcxx . . $ `external/glpk/glpmpl.h:131:9`! &&
3010 1.0 <= mpl->valuecxx . . $ MPL#value. && mpl->valuecxx . . $ MPL#value. <= 20.0 &&
3011 floor(mpl->valuecxx . . $ MPL#value.) == mpl->valuecxx . . $ MPL#value.))
3012 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "dimension must be integer between 1 and 20");
3013 dimen = (int)(mpl->valuecxx . . $ MPL#value. + 0.5);
3014 if (dimen_used)
3015 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "at most one dimension attribute allowed");
3016 if (set->dimencxx . . $ SET#dimen. > 0)
3017 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "dimension %d conflicts with dimension %d alr"
3018 "eady determined", dimen, set->dimencxx . . $ SET#dimen.);
3019 set->dimencxx . . $ SET#dimen. = dimen;
3020 dimen_used = 1;
3021 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <numeric literal> */);
3022 }
3023 else if (mpl->tokencxx . . $ MPL#token. == T_WITHINcxx . . $ `external/glpk/glpmpl.h:151:9`! || mpl->tokencxx . . $ MPL#token. == T_INcxx . . $ `external/glpk/glpmpl.h:140:9`!)
3024 { /* restricting superset */
3025 WITHINcxx . . $ WITHIN# *within, *temp;
3026 if (mpl->tokencxx . . $ MPL#token. == T_INcxx . . $ `external/glpk/glpmpl.h:140:9`! && !mpl->as_withincxx . . $ MPL#as_within.)
3027 { warningcxx . . $ `external/glpk/glpmpl.h:2485:9`!(mpl, "keyword in understood as within");
3028 mpl->as_withincxx . . $ MPL#as_within. = 1;
3029 }
3030 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* within */);
3031 /* create new restricting superset list entry and append it
3032 to the within-list */
3033 within = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(WITHIN);
3034 within->codecxx . . $ WITHIN#code. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3035 within->nextcxx . . $ WITHIN#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3036 if (set->withincxx . . $ SET#within. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
3037 set->withincxx . . $ SET#within. = within;
3038 else
3039 { for (temp = set->withincxx . . $ SET#within.; temp->nextcxx . . $ WITHIN#next. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; temp =
3040 temp->nextcxx . . $ WITHIN#next.);
3041 temp->nextcxx . . $ WITHIN#next. = within;
3042 }
3043 /* parse an expression that follows 'within' */
3044 within->codecxx . . $ WITHIN#code. = expression_9cxx . . $ `external/glpk/glpmpl.h:526:9`!(mpl);
3045 if (within->codecxx . . $ WITHIN#code.->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
3046 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following within has invalid type"
3047 );
3048 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(within->code->dim > 0);
3049 /* check/set dimension of set members */
3050 if (set->dimencxx . . $ SET#dimen. == 0) set->dimencxx . . $ SET#dimen. = within->codecxx . . $ WITHIN#code.->dimcxx . . $ CODE#dim.;
3051 if (set->dimencxx . . $ SET#dimen. != within->codecxx . . $ WITHIN#code.->dimcxx . . $ CODE#dim.)
3052 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "set expression following within must have di"
3053 "mension %d rather than %d",
3054 set->dimencxx . . $ SET#dimen., within->codecxx . . $ WITHIN#code.->dimcxx . . $ CODE#dim.);
3055 }
3056 else if (mpl->tokencxx . . $ MPL#token. == T_ASSIGNcxx . . $ `external/glpk/glpmpl.h:169:9`!)
3057 { /* assignment expression */
3058 if (!(set->assigncxx . . $ SET#assign. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && set->optioncxx . . $ SET#option. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! &&
3059 set->gadgetcxx . . $ SET#gadget. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!))
3060 err: mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "at most one := or default/data allowed");
3061 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* := */);
3062 /* parse an expression that follows ':=' */
3063 set->assigncxx . . $ SET#assign. = expression_9cxx . . $ `external/glpk/glpmpl.h:526:9`!(mpl);
3064 if (set->assigncxx . . $ SET#assign.->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
3065 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following := has invalid type");
3066 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(set->assign->dim > 0);
3067 /* check/set dimension of set members */
3068 if (set->dimencxx . . $ SET#dimen. == 0) set->dimencxx . . $ SET#dimen. = set->assigncxx . . $ SET#assign.->dimcxx . . $ CODE#dim.;
3069 if (set->dimencxx . . $ SET#dimen. != set->assigncxx . . $ SET#assign.->dimcxx . . $ CODE#dim.)
3070 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "set expression following := must have dimens"
3071 "ion %d rather than %d",
3072 set->dimencxx . . $ SET#dimen., set->assigncxx . . $ SET#assign.->dimcxx . . $ CODE#dim.);
3073 }
3074 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "default"))
3075 { /* expression for default value */
3076 if (!(set->assigncxx . . $ SET#assign. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && set->optioncxx . . $ SET#option. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)) goto err;
3077 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* := */);
3078 /* parse an expression that follows 'default' */
3079 set->optioncxx . . $ SET#option. = expression_9cxx . . $ `external/glpk/glpmpl.h:526:9`!(mpl);
3080 if (set->optioncxx . . $ SET#option.->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
3081 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following default has invalid typ"
3082 "e");
3083 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(set->option->dim > 0);
3084 /* check/set dimension of set members */
3085 if (set->dimencxx . . $ SET#dimen. == 0) set->dimencxx . . $ SET#dimen. = set->optioncxx . . $ SET#option.->dimcxx . . $ CODE#dim.;
3086 if (set->dimencxx . . $ SET#dimen. != set->optioncxx . . $ SET#option.->dimcxx . . $ CODE#dim.)
3087 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "set expression following default must have d"
3088 "imension %d rather than %d",
3089 set->dimencxx . . $ SET#dimen., set->optioncxx . . $ SET#option.->dimcxx . . $ CODE#dim.);
3090 }
3091 #if 1 /* 12/XII-2008 */
3092 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "data"))
3093 { /* gadget to initialize the set by data from plain set */
3094 GADGETcxx . . $ GADGET# *gadget;
3095 AVLNODEcxx . . $ AVLNODE# *node;
3096 int i, k, fff[20];
3097 if (!(set->assigncxx . . $ SET#assign. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && set->gadgetcxx . . $ SET#gadget. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)) goto err;
3098 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* data */);
3099 set->gadgetcxx . . $ SET#gadget. = gadget = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(GADGET);
3100 /* set name must follow the keyword 'data' */
3101 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
3102 ;
3103 else if (is_reservedcxx . . $ `external/glpk/glpmpl.h:361:9`!(mpl))
3104 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid use of reserved keyword %s",
3105 mpl->imagecxx . . $ MPL#image.);
3106 else
3107 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "set name missing where expected");
3108 /* find the set in the symbolic name table */
3109 node = avl_find_nodecxx . . $ `external/glpk/glpavl.h:101:9`!(mpl->treecxx . . $ MPL#tree., mpl->imagecxx . . $ MPL#image.);
3110 if (node == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
3111 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s not defined", mpl->imagecxx . . $ MPL#image.);
3112 if (avl_get_node_typecxx . . $ `external/glpk/glpavl.h:105:9`!(node) != A_SETcxx . . $ `external/glpk/glpmpl.h:100:9`!)
3113 err1: mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s not a plain set", mpl->imagecxx . . $ MPL#image.);
3114 gadget->setcxx . . $ GADGET#set. = avl_get_node_linkcxx . . $ `external/glpk/glpavl.h:109:9`!(node);
3115 if (gadget->setcxx . . $ GADGET#set.->dimcxx . . $ SET#dim. != 0) goto err1;
3116 if (gadget->setcxx . . $ GADGET#set. == set)
3117 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "set cannot be initialized by itself");
3118 /* check and set dimensions */
3119 if (set->dimcxx . . $ SET#dim. >= gadget->setcxx . . $ GADGET#set.->dimencxx . . $ SET#dimen.)
3120 err2: mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "dimension of %s too small", mpl->imagecxx . . $ MPL#image.);
3121 if (set->dimencxx . . $ SET#dimen. == 0)
3122 set->dimencxx . . $ SET#dimen. = gadget->setcxx . . $ GADGET#set.->dimencxx . . $ SET#dimen. - set->dimcxx . . $ SET#dim.;
3123 if (set->dimcxx . . $ SET#dim. + set->dimencxx . . $ SET#dimen. > gadget->setcxx . . $ GADGET#set.->dimencxx . . $ SET#dimen.)
3124 goto err2;
3125 else if (set->dimcxx . . $ SET#dim. + set->dimencxx . . $ SET#dimen. < gadget->setcxx . . $ GADGET#set.->dimencxx . . $ SET#dimen.)
3126 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "dimension of %s too big", mpl->imagecxx . . $ MPL#image.);
3127 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* set name */);
3128 /* left parenthesis must follow the set name */
3129 if (mpl->tokencxx . . $ MPL#token. == T_LEFTcxx . . $ `external/glpk/glpmpl.h:171:9`!)
3130 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ( */);
3131 else
3132 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "left parenthesis missing where expected");
3133 /* parse permutation of component numbers */
3134 for (k = 0; k < gadget->setcxx . . $ GADGET#set.->dimencxx . . $ SET#dimen.; k++) fff[k] = 0;
3135 k = 0;
3136 for (;;)
3137 { if (mpl->tokencxx . . $ MPL#token. != T_NUMBERcxx . . $ `external/glpk/glpmpl.h:131:9`!)
3138 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "component number missing where expected");
3139 if (str2intcxx . . $ `external/glpk/glplib.h:81:9`!(mpl->imagecxx . . $ MPL#image., &i) != 0)
3140 err3: mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "component number must be integer between "
3141 "1 and %d", gadget->setcxx . . $ GADGET#set.->dimencxx . . $ SET#dimen.);
3142 if (!(1 <= i && i <= gadget->setcxx . . $ GADGET#set.->dimencxx . . $ SET#dimen.)) goto err3;
3143 if (fff[i-1] != 0)
3144 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "component %d multiply specified", i);
3145 gadget->indcxx . . $ GADGET#ind.[k++] = i, fff[i-1] = 1;
3146 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(k <= gadget->set->dimen);
3147 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* number */);
3148 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
3149 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
3150 else if (mpl->tokencxx . . $ MPL#token. == T_RIGHTcxx . . $ `external/glpk/glpmpl.h:172:9`!)
3151 break;
3152 else
3153 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in data attribute");
3154 }
3155 if (k < gadget->setcxx . . $ GADGET#set.->dimencxx . . $ SET#dimen.)
3156 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "there are must be %d components rather than "
3157 "%d", gadget->setcxx . . $ GADGET#set.->dimencxx . . $ SET#dimen., k);
3158 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ) */);
3159 }
3160 #endif
3161 else
3162 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in set statement");
3163 }
3164 /* close the domain scope */
3165 if (set->domaincxx . . $ SET#domain. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) close_scopecxx . . $ `external/glpk/glpmpl.h:454:9`!(mpl, set->domaincxx . . $ SET#domain.);
3166 /* if dimension of set members is still unknown, set it to 1 */
3167 if (set->dimencxx . . $ SET#dimen. == 0) set->dimencxx . . $ SET#dimen. = 1;
3168 /* the set statement has been completely parsed */
3169 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!);
3170 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ; */);
3171 return set;
3172 }
3173
3174 /*----------------------------------------------------------------------
3175 -- parameter_statement - parse parameter statement.
3176 --
3177 -- This routine parses parameter statement using the syntax:
3178 --
3179 -- <parameter statement> ::= param <symbolic name> <alias> <domain>
3180 -- <attributes> ;
3181 -- <alias> ::= <empty>
3182 -- <alias> ::= <string literal>
3183 -- <domain> ::= <empty>
3184 -- <domain> ::= <indexing expression>
3185 -- <attributes> ::= <empty>
3186 -- <attributes> ::= <attributes> , integer
3187 -- <attributes> ::= <attributes> , binary
3188 -- <attributes> ::= <attributes> , symbolic
3189 -- <attributes> ::= <attributes> , <rho> <expression 5>
3190 -- <attributes> ::= <attributes> , in <expression 9>
3191 -- <attributes> ::= <attributes> , := <expression 5>
3192 -- <attributes> ::= <attributes> , default <expression 5>
3193 -- <rho> ::= < | <= | = | == | >= | > | <> | !=
3194 --
3195 -- Commae in <attributes> are optional and may be omitted anywhere. */
3196
3197 PARAMETERcxx . . $ PARAMETER# *parameter_statementcxx . . $ `external/glpk/glpmpl.h:550:9`!(MPLcxx . . $ MPL# *mpl)
3198 { PARAMETERcxx . . $ PARAMETER# *par;
3199 int integer_used = 0, binary_used = 0, symbolic_used = 0;
3200 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "param"));
3201 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* param */);
3202 /* symbolic name must follow the keyword 'param' */
3203 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
3204 ;
3205 else if (is_reservedcxx . . $ `external/glpk/glpmpl.h:361:9`!(mpl))
3206 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid use of reserved keyword %s", mpl->imagecxx . . $ MPL#image.);
3207 else
3208 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "symbolic name missing where expected");
3209 /* there must be no other object with the same name */
3210 if (avl_find_nodecxx . . $ `external/glpk/glpavl.h:101:9`!(mpl->treecxx . . $ MPL#tree., mpl->imagecxx . . $ MPL#image.) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
3211 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s multiply declared", mpl->imagecxx . . $ MPL#image.);
3212 /* create model parameter */
3213 par = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(PARAMETER);
3214 par->namecxx . . $ PARAMETER#name. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
3215 strcpycxx . . $ strcpy(b7b3a83273496486).(par->namecxx . . $ PARAMETER#name., mpl->imagecxx . . $ MPL#image.);
3216 par->aliascxx . . $ PARAMETER#alias. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3217 par->dimcxx . . $ PARAMETER#dim. = 0;
3218 par->domaincxx . . $ PARAMETER#domain. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3219 par->typecxx . . $ PARAMETER#type. = A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!;
3220 par->condcxx . . $ PARAMETER#cond. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3221 par->incxx . . $ PARAMETER#in. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3222 par->assigncxx . . $ PARAMETER#assign. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3223 par->optioncxx . . $ PARAMETER#option. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3224 par->datacxx . . $ PARAMETER#data. = 0;
3225 par->defvalcxx . . $ PARAMETER#defval. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3226 par->arraycxx . . $ PARAMETER#array. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3227 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
3228 /* parse optional alias */
3229 if (mpl->tokencxx . . $ MPL#token. == T_STRINGcxx . . $ `external/glpk/glpmpl.h:132:9`!)
3230 { par->aliascxx . . $ PARAMETER#alias. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
3231 strcpycxx . . $ strcpy(b7b3a83273496486).(par->aliascxx . . $ PARAMETER#alias., mpl->imagecxx . . $ MPL#image.);
3232 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <string literal> */);
3233 }
3234 /* parse optional indexing expression */
3235 if (mpl->tokencxx . . $ MPL#token. == T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!)
3236 { par->domaincxx . . $ PARAMETER#domain. = indexing_expressioncxx . . $ `external/glpk/glpmpl.h:450:9`!(mpl);
3237 par->dimcxx . . $ PARAMETER#dim. = domain_aritycxx . . $ `external/glpk/glpmpl.h:462:9`!(mpl, par->domaincxx . . $ PARAMETER#domain.);
3238 }
3239 /* include the parameter name in the symbolic names table */
3240 { AVLNODEcxx . . $ AVLNODE# *node;
3241 node = avl_insert_nodecxx . . $ `external/glpk/glpavl.h:89:9`!(mpl->treecxx . . $ MPL#tree., par->namecxx . . $ PARAMETER#name.);
3242 avl_set_node_typecxx . . $ `external/glpk/glpavl.h:93:9`!(node, A_PARAMETERcxx . . $ `external/glpk/glpmpl.h:98:9`!);
3243 avl_set_node_linkcxx . . $ `external/glpk/glpavl.h:97:9`!(node, (void *)par);
3244 }
3245 /* parse the list of optional attributes */
3246 for (;;)
3247 { if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
3248 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
3249 else if (mpl->tokencxx . . $ MPL#token. == T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!)
3250 break;
3251 if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "integer"))
3252 { if (integer_used)
3253 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "at most one integer allowed");
3254 if (par->typecxx . . $ PARAMETER#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
3255 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "symbolic parameter cannot be integer");
3256 if (par->typecxx . . $ PARAMETER#type. != A_BINARYcxx . . $ `external/glpk/glpmpl.h:79:9`!) par->typecxx . . $ PARAMETER#type. = A_INTEGERcxx . . $ `external/glpk/glpmpl.h:91:9`!;
3257 integer_used = 1;
3258 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* integer */);
3259 }
3260 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "binary"))
3261 bin: { if (binary_used)
3262 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "at most one binary allowed");
3263 if (par->typecxx . . $ PARAMETER#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
3264 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "symbolic parameter cannot be binary");
3265 par->typecxx . . $ PARAMETER#type. = A_BINARYcxx . . $ `external/glpk/glpmpl.h:79:9`!;
3266 binary_used = 1;
3267 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* binary */);
3268 }
3269 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "logical"))
3270 { if (!mpl->as_binarycxx . . $ MPL#as_binary.)
3271 { warningcxx . . $ `external/glpk/glpmpl.h:2485:9`!(mpl, "keyword logical understood as binary");
3272 mpl->as_binarycxx . . $ MPL#as_binary. = 1;
3273 }
3274 goto bin;
3275 }
3276 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "symbolic"))
3277 { if (symbolic_used)
3278 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "at most one symbolic allowed");
3279 if (par->typecxx . . $ PARAMETER#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
3280 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "integer or binary parameter cannot be symbol"
3281 "ic");
3282 /* the parameter may be referenced from expressions given
3283 in the same parameter declaration, so its type must be
3284 completed before parsing that expressions */
3285 if (!(par->condcxx . . $ PARAMETER#cond. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && par->incxx . . $ PARAMETER#in. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! &&
3286 par->assigncxx . . $ PARAMETER#assign. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && par->optioncxx . . $ PARAMETER#option. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!))
3287 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "keyword symbolic must precede any other para"
3288 "meter attributes");
3289 par->typecxx . . $ PARAMETER#type. = A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!;
3290 symbolic_used = 1;
3291 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* symbolic */);
3292 }
3293 else if (mpl->tokencxx . . $ MPL#token. == T_LTcxx . . $ `external/glpk/glpmpl.h:157:9`! || mpl->tokencxx . . $ MPL#token. == T_LEcxx . . $ `external/glpk/glpmpl.h:158:9`! ||
3294 mpl->tokencxx . . $ MPL#token. == T_EQcxx . . $ `external/glpk/glpmpl.h:159:9`! || mpl->tokencxx . . $ MPL#token. == T_GEcxx . . $ `external/glpk/glpmpl.h:160:9`! ||
3295 mpl->tokencxx . . $ MPL#token. == T_GTcxx . . $ `external/glpk/glpmpl.h:161:9`! || mpl->tokencxx . . $ MPL#token. == T_NEcxx . . $ `external/glpk/glpmpl.h:162:9`!)
3296 { /* restricting condition */
3297 CONDITIONcxx . . $ CONDITION# *cond, *temp;
3298 char opstr[8];
3299 /* create new restricting condition list entry and append
3300 it to the conditions list */
3301 cond = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(CONDITION);
3302 switch (mpl->tokencxx . . $ MPL#token.)
3303 { case T_LTcxx . . $ `external/glpk/glpmpl.h:157:9`!:
3304 cond->rhocxx . . $ CONDITION#rho. = O_LTcxx . . $ `external/glpk/glpmpl.h:2129:9`!, strcpycxx . . $ strcpy(b7b3a83273496486).(opstr, mpl->imagecxx . . $ MPL#image.); break;
3305 case T_LEcxx . . $ `external/glpk/glpmpl.h:158:9`!:
3306 cond->rhocxx . . $ CONDITION#rho. = O_LEcxx . . $ `external/glpk/glpmpl.h:2130:9`!, strcpycxx . . $ strcpy(b7b3a83273496486).(opstr, mpl->imagecxx . . $ MPL#image.); break;
3307 case T_EQcxx . . $ `external/glpk/glpmpl.h:159:9`!:
3308 cond->rhocxx . . $ CONDITION#rho. = O_EQcxx . . $ `external/glpk/glpmpl.h:2131:9`!, strcpycxx . . $ strcpy(b7b3a83273496486).(opstr, mpl->imagecxx . . $ MPL#image.); break;
3309 case T_GEcxx . . $ `external/glpk/glpmpl.h:160:9`!:
3310 cond->rhocxx . . $ CONDITION#rho. = O_GEcxx . . $ `external/glpk/glpmpl.h:2132:9`!, strcpycxx . . $ strcpy(b7b3a83273496486).(opstr, mpl->imagecxx . . $ MPL#image.); break;
3311 case T_GTcxx . . $ `external/glpk/glpmpl.h:161:9`!:
3312 cond->rhocxx . . $ CONDITION#rho. = O_GTcxx . . $ `external/glpk/glpmpl.h:2133:9`!, strcpycxx . . $ strcpy(b7b3a83273496486).(opstr, mpl->imagecxx . . $ MPL#image.); break;
3313 case T_NEcxx . . $ `external/glpk/glpmpl.h:162:9`!:
3314 cond->rhocxx . . $ CONDITION#rho. = O_NEcxx . . $ `external/glpk/glpmpl.h:2134:9`!, strcpycxx . . $ strcpy(b7b3a83273496486).(opstr, mpl->imagecxx . . $ MPL#image.); break;
3315 default:
3316 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token != mpl->token);
3317 }
3318 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(strlen(opstr) < sizeof(opstr));
3319 cond->codecxx . . $ CONDITION#code. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3320 cond->nextcxx . . $ CONDITION#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3321 if (par->condcxx . . $ PARAMETER#cond. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
3322 par->condcxx . . $ PARAMETER#cond. = cond;
3323 else
3324 { for (temp = par->condcxx . . $ PARAMETER#cond.; temp->nextcxx . . $ CONDITION#next. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; temp =
3325 temp->nextcxx . . $ CONDITION#next.);
3326 temp->nextcxx . . $ CONDITION#next. = cond;
3327 }
3328 #if 0 /* 13/VIII-2008 */
3329 if (par->type == A_SYMBOLIC &&
3330 !(cond->rho == O_EQ || cond->rho == O_NE))
3331 mpl_error(mpl, "inequality restriction not allowed");
3332 #endif
3333 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* rho */);
3334 /* parse an expression that follows relational operator */
3335 cond->codecxx . . $ CONDITION#code. = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
3336 if (!(cond->codecxx . . $ CONDITION#code.->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! ||
3337 cond->codecxx . . $ CONDITION#code.->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!))
3338 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following %s has invalid type",
3339 opstr);
3340 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(cond->code->dim == 0);
3341 /* convert to the parameter type, if necessary */
3342 if (par->typecxx . . $ PARAMETER#type. != A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`! && cond->codecxx . . $ CONDITION#code.->typecxx . . $ CODE#type. ==
3343 A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
3344 cond->codecxx . . $ CONDITION#code. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, cond->codecxx . . $ CONDITION#code.,
3345 A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
3346 if (par->typecxx . . $ PARAMETER#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`! && cond->codecxx . . $ CONDITION#code.->typecxx . . $ CODE#type. !=
3347 A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
3348 cond->codecxx . . $ CONDITION#code. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, cond->codecxx . . $ CONDITION#code.,
3349 A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
3350 }
3351 else if (mpl->tokencxx . . $ MPL#token. == T_INcxx . . $ `external/glpk/glpmpl.h:140:9`! || mpl->tokencxx . . $ MPL#token. == T_WITHINcxx . . $ `external/glpk/glpmpl.h:151:9`!)
3352 { /* restricting superset */
3353 WITHINcxx . . $ WITHIN# *in, *temp;
3354 if (mpl->tokencxx . . $ MPL#token. == T_WITHINcxx . . $ `external/glpk/glpmpl.h:151:9`! && !mpl->as_incxx . . $ MPL#as_in.)
3355 { warningcxx . . $ `external/glpk/glpmpl.h:2485:9`!(mpl, "keyword within understood as in");
3356 mpl->as_incxx . . $ MPL#as_in. = 1;
3357 }
3358 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* in */);
3359 /* create new restricting superset list entry and append it
3360 to the in-list */
3361 in = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(WITHIN);
3362 in->codecxx . . $ WITHIN#code. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3363 in->nextcxx . . $ WITHIN#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3364 if (par->incxx . . $ PARAMETER#in. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
3365 par->incxx . . $ PARAMETER#in. = in;
3366 else
3367 { for (temp = par->incxx . . $ PARAMETER#in.; temp->nextcxx . . $ WITHIN#next. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; temp =
3368 temp->nextcxx . . $ WITHIN#next.);
3369 temp->nextcxx . . $ WITHIN#next. = in;
3370 }
3371 /* parse an expression that follows 'in' */
3372 in->codecxx . . $ WITHIN#code. = expression_9cxx . . $ `external/glpk/glpmpl.h:526:9`!(mpl);
3373 if (in->codecxx . . $ WITHIN#code.->typecxx . . $ CODE#type. != A_ELEMSETcxx . . $ `external/glpk/glpmpl.h:84:9`!)
3374 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following in has invalid type");
3375 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(in->code->dim > 0);
3376 if (in->codecxx . . $ WITHIN#code.->dimcxx . . $ CODE#dim. != 1)
3377 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "set expression following in must have dimens"
3378 "ion 1 rather than %d", in->codecxx . . $ WITHIN#code.->dimcxx . . $ CODE#dim.);
3379 }
3380 else if (mpl->tokencxx . . $ MPL#token. == T_ASSIGNcxx . . $ `external/glpk/glpmpl.h:169:9`!)
3381 { /* assignment expression */
3382 if (!(par->assigncxx . . $ PARAMETER#assign. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && par->optioncxx . . $ PARAMETER#option. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!))
3383 err: mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "at most one := or default allowed");
3384 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* := */);
3385 /* parse an expression that follows ':=' */
3386 par->assigncxx . . $ PARAMETER#assign. = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
3387 /* the expression must be of numeric/symbolic type */
3388 if (!(par->assigncxx . . $ PARAMETER#assign.->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! ||
3389 par->assigncxx . . $ PARAMETER#assign.->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!))
3390 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following := has invalid type");
3391 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(par->assign->dim == 0);
3392 /* convert to the parameter type, if necessary */
3393 if (par->typecxx . . $ PARAMETER#type. != A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`! && par->assigncxx . . $ PARAMETER#assign.->typecxx . . $ CODE#type. ==
3394 A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
3395 par->assigncxx . . $ PARAMETER#assign. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, par->assigncxx . . $ PARAMETER#assign.,
3396 A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
3397 if (par->typecxx . . $ PARAMETER#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`! && par->assigncxx . . $ PARAMETER#assign.->typecxx . . $ CODE#type. !=
3398 A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
3399 par->assigncxx . . $ PARAMETER#assign. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, par->assigncxx . . $ PARAMETER#assign.,
3400 A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
3401 }
3402 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "default"))
3403 { /* expression for default value */
3404 if (!(par->assigncxx . . $ PARAMETER#assign. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && par->optioncxx . . $ PARAMETER#option. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)) goto err;
3405 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* default */);
3406 /* parse an expression that follows 'default' */
3407 par->optioncxx . . $ PARAMETER#option. = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
3408 if (!(par->optioncxx . . $ PARAMETER#option.->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! ||
3409 par->optioncxx . . $ PARAMETER#option.->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!))
3410 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following default has invalid typ"
3411 "e");
3412 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(par->option->dim == 0);
3413 /* convert to the parameter type, if necessary */
3414 if (par->typecxx . . $ PARAMETER#type. != A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`! && par->optioncxx . . $ PARAMETER#option.->typecxx . . $ CODE#type. ==
3415 A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
3416 par->optioncxx . . $ PARAMETER#option. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, par->optioncxx . . $ PARAMETER#option.,
3417 A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
3418 if (par->typecxx . . $ PARAMETER#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`! && par->optioncxx . . $ PARAMETER#option.->typecxx . . $ CODE#type. !=
3419 A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
3420 par->optioncxx . . $ PARAMETER#option. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, par->optioncxx . . $ PARAMETER#option.,
3421 A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
3422 }
3423 else
3424 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in parameter statement");
3425 }
3426 /* close the domain scope */
3427 if (par->domaincxx . . $ PARAMETER#domain. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) close_scopecxx . . $ `external/glpk/glpmpl.h:454:9`!(mpl, par->domaincxx . . $ PARAMETER#domain.);
3428 /* the parameter statement has been completely parsed */
3429 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!);
3430 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ; */);
3431 return par;
3432 }
3433
3434 /*----------------------------------------------------------------------
3435 -- variable_statement - parse variable statement.
3436 --
3437 -- This routine parses variable statement using the syntax:
3438 --
3439 -- <variable statement> ::= var <symbolic name> <alias> <domain>
3440 -- <attributes> ;
3441 -- <alias> ::= <empty>
3442 -- <alias> ::= <string literal>
3443 -- <domain> ::= <empty>
3444 -- <domain> ::= <indexing expression>
3445 -- <attributes> ::= <empty>
3446 -- <attributes> ::= <attributes> , integer
3447 -- <attributes> ::= <attributes> , binary
3448 -- <attributes> ::= <attributes> , <rho> <expression 5>
3449 -- <rho> ::= >= | <= | = | ==
3450 --
3451 -- Commae in <attributes> are optional and may be omitted anywhere. */
3452
3453 VARIABLEcxx . . $ VARIABLE# *variable_statementcxx . . $ `external/glpk/glpmpl.h:554:9`!(MPLcxx . . $ MPL# *mpl)
3454 { VARIABLEcxx . . $ VARIABLE# *var;
3455 int integer_used = 0, binary_used = 0;
3456 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "var"));
3457 if (mpl->flag_scxx . . $ MPL#flag_s.)
3458 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "variable statement must precede solve statement");
3459 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* var */);
3460 /* symbolic name must follow the keyword 'var' */
3461 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
3462 ;
3463 else if (is_reservedcxx . . $ `external/glpk/glpmpl.h:361:9`!(mpl))
3464 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid use of reserved keyword %s", mpl->imagecxx . . $ MPL#image.);
3465 else
3466 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "symbolic name missing where expected");
3467 /* there must be no other object with the same name */
3468 if (avl_find_nodecxx . . $ `external/glpk/glpavl.h:101:9`!(mpl->treecxx . . $ MPL#tree., mpl->imagecxx . . $ MPL#image.) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
3469 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s multiply declared", mpl->imagecxx . . $ MPL#image.);
3470 /* create model variable */
3471 var = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(VARIABLE);
3472 var->namecxx . . $ VARIABLE#name. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
3473 strcpycxx . . $ strcpy(b7b3a83273496486).(var->namecxx . . $ VARIABLE#name., mpl->imagecxx . . $ MPL#image.);
3474 var->aliascxx . . $ VARIABLE#alias. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3475 var->dimcxx . . $ VARIABLE#dim. = 0;
3476 var->domaincxx . . $ VARIABLE#domain. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3477 var->typecxx . . $ VARIABLE#type. = A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!;
3478 var->lbndcxx . . $ VARIABLE#lbnd. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3479 var->ubndcxx . . $ VARIABLE#ubnd. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3480 var->arraycxx . . $ VARIABLE#array. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3481 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
3482 /* parse optional alias */
3483 if (mpl->tokencxx . . $ MPL#token. == T_STRINGcxx . . $ `external/glpk/glpmpl.h:132:9`!)
3484 { var->aliascxx . . $ VARIABLE#alias. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
3485 strcpycxx . . $ strcpy(b7b3a83273496486).(var->aliascxx . . $ VARIABLE#alias., mpl->imagecxx . . $ MPL#image.);
3486 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <string literal> */);
3487 }
3488 /* parse optional indexing expression */
3489 if (mpl->tokencxx . . $ MPL#token. == T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!)
3490 { var->domaincxx . . $ VARIABLE#domain. = indexing_expressioncxx . . $ `external/glpk/glpmpl.h:450:9`!(mpl);
3491 var->dimcxx . . $ VARIABLE#dim. = domain_aritycxx . . $ `external/glpk/glpmpl.h:462:9`!(mpl, var->domaincxx . . $ VARIABLE#domain.);
3492 }
3493 /* include the variable name in the symbolic names table */
3494 { AVLNODEcxx . . $ AVLNODE# *node;
3495 node = avl_insert_nodecxx . . $ `external/glpk/glpavl.h:89:9`!(mpl->treecxx . . $ MPL#tree., var->namecxx . . $ VARIABLE#name.);
3496 avl_set_node_typecxx . . $ `external/glpk/glpavl.h:93:9`!(node, A_VARIABLEcxx . . $ `external/glpk/glpmpl.h:105:9`!);
3497 avl_set_node_linkcxx . . $ `external/glpk/glpavl.h:97:9`!(node, (void *)var);
3498 }
3499 /* parse the list of optional attributes */
3500 for (;;)
3501 { if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
3502 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
3503 else if (mpl->tokencxx . . $ MPL#token. == T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!)
3504 break;
3505 if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "integer"))
3506 { if (integer_used)
3507 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "at most one integer allowed");
3508 if (var->typecxx . . $ VARIABLE#type. != A_BINARYcxx . . $ `external/glpk/glpmpl.h:79:9`!) var->typecxx . . $ VARIABLE#type. = A_INTEGERcxx . . $ `external/glpk/glpmpl.h:91:9`!;
3509 integer_used = 1;
3510 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* integer */);
3511 }
3512 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "binary"))
3513 bin: { if (binary_used)
3514 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "at most one binary allowed");
3515 var->typecxx . . $ VARIABLE#type. = A_BINARYcxx . . $ `external/glpk/glpmpl.h:79:9`!;
3516 binary_used = 1;
3517 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* binary */);
3518 }
3519 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "logical"))
3520 { if (!mpl->as_binarycxx . . $ MPL#as_binary.)
3521 { warningcxx . . $ `external/glpk/glpmpl.h:2485:9`!(mpl, "keyword logical understood as binary");
3522 mpl->as_binarycxx . . $ MPL#as_binary. = 1;
3523 }
3524 goto bin;
3525 }
3526 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "symbolic"))
3527 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "variable cannot be symbolic");
3528 else if (mpl->tokencxx . . $ MPL#token. == T_GEcxx . . $ `external/glpk/glpmpl.h:160:9`!)
3529 { /* lower bound */
3530 if (var->lbndcxx . . $ VARIABLE#lbnd. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
3531 { if (var->lbndcxx . . $ VARIABLE#lbnd. == var->ubndcxx . . $ VARIABLE#ubnd.)
3532 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "both fixed value and lower bound not allo"
3533 "wed");
3534 else
3535 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "at most one lower bound allowed");
3536 }
3537 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* >= */);
3538 /* parse an expression that specifies the lower bound */
3539 var->lbndcxx . . $ VARIABLE#lbnd. = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
3540 if (var->lbndcxx . . $ VARIABLE#lbnd.->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
3541 var->lbndcxx . . $ VARIABLE#lbnd. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, var->lbndcxx . . $ VARIABLE#lbnd.,
3542 A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
3543 if (var->lbndcxx . . $ VARIABLE#lbnd.->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
3544 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following >= has invalid type");
3545 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(var->lbnd->dim == 0);
3546 }
3547 else if (mpl->tokencxx . . $ MPL#token. == T_LEcxx . . $ `external/glpk/glpmpl.h:158:9`!)
3548 { /* upper bound */
3549 if (var->ubndcxx . . $ VARIABLE#ubnd. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
3550 { if (var->ubndcxx . . $ VARIABLE#ubnd. == var->lbndcxx . . $ VARIABLE#lbnd.)
3551 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "both fixed value and upper bound not allo"
3552 "wed");
3553 else
3554 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "at most one upper bound allowed");
3555 }
3556 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <= */);
3557 /* parse an expression that specifies the upper bound */
3558 var->ubndcxx . . $ VARIABLE#ubnd. = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
3559 if (var->ubndcxx . . $ VARIABLE#ubnd.->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
3560 var->ubndcxx . . $ VARIABLE#ubnd. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, var->ubndcxx . . $ VARIABLE#ubnd.,
3561 A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
3562 if (var->ubndcxx . . $ VARIABLE#ubnd.->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
3563 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following <= has invalid type");
3564 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(var->ubnd->dim == 0);
3565 }
3566 else if (mpl->tokencxx . . $ MPL#token. == T_EQcxx . . $ `external/glpk/glpmpl.h:159:9`!)
3567 { /* fixed value */
3568 char opstr[8];
3569 if (!(var->lbndcxx . . $ VARIABLE#lbnd. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && var->ubndcxx . . $ VARIABLE#ubnd. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!))
3570 { if (var->lbndcxx . . $ VARIABLE#lbnd. == var->ubndcxx . . $ VARIABLE#ubnd.)
3571 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "at most one fixed value allowed");
3572 else if (var->lbndcxx . . $ VARIABLE#lbnd. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
3573 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "both lower bound and fixed value not allo"
3574 "wed");
3575 else
3576 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "both upper bound and fixed value not allo"
3577 "wed");
3578 }
3579 strcpycxx . . $ strcpy(b7b3a83273496486).(opstr, mpl->imagecxx . . $ MPL#image.);
3580 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(strlen(opstr) < sizeof(opstr));
3581 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* = | == */);
3582 /* parse an expression that specifies the fixed value */
3583 var->lbndcxx . . $ VARIABLE#lbnd. = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
3584 if (var->lbndcxx . . $ VARIABLE#lbnd.->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
3585 var->lbndcxx . . $ VARIABLE#lbnd. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, var->lbndcxx . . $ VARIABLE#lbnd.,
3586 A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
3587 if (var->lbndcxx . . $ VARIABLE#lbnd.->typecxx . . $ CODE#type. != A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
3588 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following %s has invalid type",
3589 opstr);
3590 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(var->lbnd->dim == 0);
3591 /* indicate that the variable is fixed, not bounded */
3592 var->ubndcxx . . $ VARIABLE#ubnd. = var->lbndcxx . . $ VARIABLE#lbnd.;
3593 }
3594 else if (mpl->tokencxx . . $ MPL#token. == T_LTcxx . . $ `external/glpk/glpmpl.h:157:9`! || mpl->tokencxx . . $ MPL#token. == T_GTcxx . . $ `external/glpk/glpmpl.h:161:9`! ||
3595 mpl->tokencxx . . $ MPL#token. == T_NEcxx . . $ `external/glpk/glpmpl.h:162:9`!)
3596 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "strict bound not allowed");
3597 else
3598 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in variable statement");
3599 }
3600 /* close the domain scope */
3601 if (var->domaincxx . . $ VARIABLE#domain. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) close_scopecxx . . $ `external/glpk/glpmpl.h:454:9`!(mpl, var->domaincxx . . $ VARIABLE#domain.);
3602 /* the variable statement has been completely parsed */
3603 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->token == T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!);
3604 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ; */);
3605 return var;
3606 }
3607
3608 /*----------------------------------------------------------------------
3609 -- constraint_statement - parse constraint statement.
3610 --
3611 -- This routine parses constraint statement using the syntax:
3612 --
3613 -- <constraint statement> ::= <subject to> <symbolic name> <alias>
3614 -- <domain> : <constraint> ;
3615 -- <subject to> ::= <empty>
3616 -- <subject to> ::= subject to
3617 -- <subject to> ::= subj to
3618 -- <subject to> ::= s.t.
3619 -- <alias> ::= <empty>
3620 -- <alias> ::= <string literal>
3621 -- <domain> ::= <empty>
3622 -- <domain> ::= <indexing expression>
3623 -- <constraint> ::= <formula> , >= <formula>
3624 -- <constraint> ::= <formula> , <= <formula>
3625 -- <constraint> ::= <formula> , = <formula>
3626 -- <constraint> ::= <formula> , <= <formula> , <= <formula>
3627 -- <constraint> ::= <formula> , >= <formula> , >= <formula>
3628 -- <formula> ::= <expression 5>
3629 --
3630 -- Commae in <constraint> are optional and may be omitted anywhere. */
3631
3632 CONSTRAINTcxx . . $ CONSTRAINT# *constraint_statementcxx . . $ `external/glpk/glpmpl.h:558:9`!(MPLcxx . . $ MPL# *mpl)
3633 { CONSTRAINTcxx . . $ CONSTRAINT# *con;
3634 CODEcxx . . $ CODE# *first, *second, *third;
3635 int rho;
3636 char opstr[8];
3637 if (mpl->flag_scxx . . $ MPL#flag_s.)
3638 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "constraint statement must precede solve statement")
3639 ;
3640 if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "subject"))
3641 { get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* subject */);
3642 if (!is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "to"))
3643 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "keyword subject to incomplete");
3644 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* to */);
3645 }
3646 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "subj"))
3647 { get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* subj */);
3648 if (!is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "to"))
3649 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "keyword subj to incomplete");
3650 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* to */);
3651 }
3652 else if (mpl->tokencxx . . $ MPL#token. == T_SPTPcxx . . $ `external/glpk/glpmpl.h:147:9`!)
3653 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* s.t. */);
3654 /* the current token must be symbolic name of constraint */
3655 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
3656 ;
3657 else if (is_reservedcxx . . $ `external/glpk/glpmpl.h:361:9`!(mpl))
3658 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid use of reserved keyword %s", mpl->imagecxx . . $ MPL#image.);
3659 else
3660 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "symbolic name missing where expected");
3661 /* there must be no other object with the same name */
3662 if (avl_find_nodecxx . . $ `external/glpk/glpavl.h:101:9`!(mpl->treecxx . . $ MPL#tree., mpl->imagecxx . . $ MPL#image.) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
3663 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s multiply declared", mpl->imagecxx . . $ MPL#image.);
3664 /* create model constraint */
3665 con = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(CONSTRAINT);
3666 con->namecxx . . $ CONSTRAINT#name. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
3667 strcpycxx . . $ strcpy(b7b3a83273496486).(con->namecxx . . $ CONSTRAINT#name., mpl->imagecxx . . $ MPL#image.);
3668 con->aliascxx . . $ CONSTRAINT#alias. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3669 con->dimcxx . . $ CONSTRAINT#dim. = 0;
3670 con->domaincxx . . $ CONSTRAINT#domain. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3671 con->typecxx . . $ CONSTRAINT#type. = A_CONSTRAINTcxx . . $ `external/glpk/glpmpl.h:81:9`!;
3672 con->codecxx . . $ CONSTRAINT#code. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3673 con->lbndcxx . . $ CONSTRAINT#lbnd. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3674 con->ubndcxx . . $ CONSTRAINT#ubnd. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3675 con->arraycxx . . $ CONSTRAINT#array. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3676 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
3677 /* parse optional alias */
3678 if (mpl->tokencxx . . $ MPL#token. == T_STRINGcxx . . $ `external/glpk/glpmpl.h:132:9`!)
3679 { con->aliascxx . . $ CONSTRAINT#alias. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
3680 strcpycxx . . $ strcpy(b7b3a83273496486).(con->aliascxx . . $ CONSTRAINT#alias., mpl->imagecxx . . $ MPL#image.);
3681 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <string literal> */);
3682 }
3683 /* parse optional indexing expression */
3684 if (mpl->tokencxx . . $ MPL#token. == T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!)
3685 { con->domaincxx . . $ CONSTRAINT#domain. = indexing_expressioncxx . . $ `external/glpk/glpmpl.h:450:9`!(mpl);
3686 con->dimcxx . . $ CONSTRAINT#dim. = domain_aritycxx . . $ `external/glpk/glpmpl.h:462:9`!(mpl, con->domaincxx . . $ CONSTRAINT#domain.);
3687 }
3688 /* include the constraint name in the symbolic names table */
3689 { AVLNODEcxx . . $ AVLNODE# *node;
3690 node = avl_insert_nodecxx . . $ `external/glpk/glpavl.h:89:9`!(mpl->treecxx . . $ MPL#tree., con->namecxx . . $ CONSTRAINT#name.);
3691 avl_set_node_typecxx . . $ `external/glpk/glpavl.h:93:9`!(node, A_CONSTRAINTcxx . . $ `external/glpk/glpmpl.h:81:9`!);
3692 avl_set_node_linkcxx . . $ `external/glpk/glpavl.h:97:9`!(node, (void *)con);
3693 }
3694 /* the colon must precede the first expression */
3695 if (mpl->tokencxx . . $ MPL#token. != T_COLONcxx . . $ `external/glpk/glpmpl.h:167:9`!)
3696 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "colon missing where expected");
3697 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* : */);
3698 /* parse the first expression */
3699 first = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
3700 if (first->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
3701 first = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, first, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
3702 if (!(first->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || first->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!))
3703 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following colon has invalid type");
3704 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(first->dim == 0);
3705 /* relational operator must follow the first expression */
3706 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!) get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
3707 switch (mpl->tokencxx . . $ MPL#token.)
3708 { case T_LEcxx . . $ `external/glpk/glpmpl.h:158:9`!:
3709 case T_GEcxx . . $ `external/glpk/glpmpl.h:160:9`!:
3710 case T_EQcxx . . $ `external/glpk/glpmpl.h:159:9`!:
3711 break;
3712 case T_LTcxx . . $ `external/glpk/glpmpl.h:157:9`!:
3713 case T_GTcxx . . $ `external/glpk/glpmpl.h:161:9`!:
3714 case T_NEcxx . . $ `external/glpk/glpmpl.h:162:9`!:
3715 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "strict inequality not allowed");
3716 case T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!:
3717 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "constraint must be equality or inequality");
3718 default:
3719 goto err;
3720 }
3721 rho = mpl->tokencxx . . $ MPL#token.;
3722 strcpycxx . . $ strcpy(b7b3a83273496486).(opstr, mpl->imagecxx . . $ MPL#image.);
3723 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(strlen(opstr) < sizeof(opstr));
3724 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* rho */);
3725 /* parse the second expression */
3726 second = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
3727 if (second->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
3728 second = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, second, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
3729 if (!(second->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || second->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!))
3730 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following %s has invalid type", opstr);
3731 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(second->dim == 0);
3732 /* check a token that follow the second expression */
3733 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
3734 { get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
3735 if (mpl->tokencxx . . $ MPL#token. == T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!) goto err;
3736 }
3737 if (mpl->tokencxx . . $ MPL#token. == T_LTcxx . . $ `external/glpk/glpmpl.h:157:9`! || mpl->tokencxx . . $ MPL#token. == T_LEcxx . . $ `external/glpk/glpmpl.h:158:9`! ||
3738 mpl->tokencxx . . $ MPL#token. == T_EQcxx . . $ `external/glpk/glpmpl.h:159:9`! || mpl->tokencxx . . $ MPL#token. == T_GEcxx . . $ `external/glpk/glpmpl.h:160:9`! ||
3739 mpl->tokencxx . . $ MPL#token. == T_GTcxx . . $ `external/glpk/glpmpl.h:161:9`! || mpl->tokencxx . . $ MPL#token. == T_NEcxx . . $ `external/glpk/glpmpl.h:162:9`!)
3740 { /* it is another relational operator, therefore the constraint
3741 is double inequality */
3742 if (rho == T_EQcxx . . $ `external/glpk/glpmpl.h:159:9`! || mpl->tokencxx . . $ MPL#token. != rho)
3743 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "double inequality must be ... <= ... <= ... or "
3744 "... >= ... >= ...");
3745 /* the first expression cannot be linear form */
3746 if (first->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!)
3747 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "leftmost expression in double inequality cannot"
3748 " be linear form");
3749 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* rho */);
3750 /* parse the third expression */
3751 third = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
3752 if (third->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
3753 third = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, second, A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
3754 if (!(third->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! || third->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!))
3755 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "rightmost expression in double inequality const"
3756 "raint has invalid type");
3757 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(third->dim == 0);
3758 /* the third expression also cannot be linear form */
3759 if (third->typecxx . . $ CODE#type. == A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!)
3760 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "rightmost expression in double inequality canno"
3761 "t be linear form");
3762 }
3763 else
3764 { /* the constraint is equality or single inequality */
3765 third = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3766 }
3767 /* close the domain scope */
3768 if (con->domaincxx . . $ CONSTRAINT#domain. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) close_scopecxx . . $ `external/glpk/glpmpl.h:454:9`!(mpl, con->domaincxx . . $ CONSTRAINT#domain.);
3769 /* convert all expressions to linear form, if necessary */
3770 if (first->typecxx . . $ CODE#type. != A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!)
3771 first = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLFMcxx . . $ `external/glpk/glpmpl.h:2096:9`!, first, A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!, 0);
3772 if (second->typecxx . . $ CODE#type. != A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!)
3773 second = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLFMcxx . . $ `external/glpk/glpmpl.h:2096:9`!, second, A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!, 0);
3774 if (third != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
3775 third = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLFMcxx . . $ `external/glpk/glpmpl.h:2096:9`!, third, A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!, 0);
3776 /* arrange expressions in the constraint */
3777 if (third == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
3778 { /* the constraint is equality or single inequality */
3779 switch (rho)
3780 { case T_LEcxx . . $ `external/glpk/glpmpl.h:158:9`!:
3781 /* first <= second */
3782 con->codecxx . . $ CONSTRAINT#code. = first;
3783 con->lbndcxx . . $ CONSTRAINT#lbnd. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3784 con->ubndcxx . . $ CONSTRAINT#ubnd. = second;
3785 break;
3786 case T_GEcxx . . $ `external/glpk/glpmpl.h:160:9`!:
3787 /* first >= second */
3788 con->codecxx . . $ CONSTRAINT#code. = first;
3789 con->lbndcxx . . $ CONSTRAINT#lbnd. = second;
3790 con->ubndcxx . . $ CONSTRAINT#ubnd. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3791 break;
3792 case T_EQcxx . . $ `external/glpk/glpmpl.h:159:9`!:
3793 /* first = second */
3794 con->codecxx . . $ CONSTRAINT#code. = first;
3795 con->lbndcxx . . $ CONSTRAINT#lbnd. = second;
3796 con->ubndcxx . . $ CONSTRAINT#ubnd. = second;
3797 break;
3798 default:
3799 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(rho != rho);
3800 }
3801 }
3802 else
3803 { /* the constraint is double inequality */
3804 switch (rho)
3805 { case T_LEcxx . . $ `external/glpk/glpmpl.h:158:9`!:
3806 /* first <= second <= third */
3807 con->codecxx . . $ CONSTRAINT#code. = second;
3808 con->lbndcxx . . $ CONSTRAINT#lbnd. = first;
3809 con->ubndcxx . . $ CONSTRAINT#ubnd. = third;
3810 break;
3811 case T_GEcxx . . $ `external/glpk/glpmpl.h:160:9`!:
3812 /* first >= second >= third */
3813 con->codecxx . . $ CONSTRAINT#code. = second;
3814 con->lbndcxx . . $ CONSTRAINT#lbnd. = third;
3815 con->ubndcxx . . $ CONSTRAINT#ubnd. = first;
3816 break;
3817 default:
3818 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(rho != rho);
3819 }
3820 }
3821 /* the constraint statement has been completely parsed */
3822 if (mpl->tokencxx . . $ MPL#token. != T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!)
3823 err: mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in constraint statement");
3824 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ; */);
3825 return con;
3826 }
3827
3828 /*----------------------------------------------------------------------
3829 -- objective_statement - parse objective statement.
3830 --
3831 -- This routine parses objective statement using the syntax:
3832 --
3833 -- <objective statement> ::= <verb> <symbolic name> <alias> <domain> :
3834 -- <formula> ;
3835 -- <verb> ::= minimize
3836 -- <verb> ::= maximize
3837 -- <alias> ::= <empty>
3838 -- <alias> ::= <string literal>
3839 -- <domain> ::= <empty>
3840 -- <domain> ::= <indexing expression>
3841 -- <formula> ::= <expression 5> */
3842
3843 CONSTRAINTcxx . . $ CONSTRAINT# *objective_statementcxx . . $ `external/glpk/glpmpl.h:562:9`!(MPLcxx . . $ MPL# *mpl)
3844 { CONSTRAINTcxx . . $ CONSTRAINT# *obj;
3845 int type;
3846 if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "minimize"))
3847 type = A_MINIMIZEcxx . . $ `external/glpk/glpmpl.h:94:9`!;
3848 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "maximize"))
3849 type = A_MAXIMIZEcxx . . $ `external/glpk/glpmpl.h:93:9`!;
3850 else
3851 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl != mpl);
3852 if (mpl->flag_scxx . . $ MPL#flag_s.)
3853 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "objective statement must precede solve statement");
3854 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* minimize | maximize */);
3855 /* symbolic name must follow the verb 'minimize' or 'maximize' */
3856 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
3857 ;
3858 else if (is_reservedcxx . . $ `external/glpk/glpmpl.h:361:9`!(mpl))
3859 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid use of reserved keyword %s", mpl->imagecxx . . $ MPL#image.);
3860 else
3861 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "symbolic name missing where expected");
3862 /* there must be no other object with the same name */
3863 if (avl_find_nodecxx . . $ `external/glpk/glpavl.h:101:9`!(mpl->treecxx . . $ MPL#tree., mpl->imagecxx . . $ MPL#image.) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
3864 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s multiply declared", mpl->imagecxx . . $ MPL#image.);
3865 /* create model objective */
3866 obj = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(CONSTRAINT);
3867 obj->namecxx . . $ CONSTRAINT#name. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
3868 strcpycxx . . $ strcpy(b7b3a83273496486).(obj->namecxx . . $ CONSTRAINT#name., mpl->imagecxx . . $ MPL#image.);
3869 obj->aliascxx . . $ CONSTRAINT#alias. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3870 obj->dimcxx . . $ CONSTRAINT#dim. = 0;
3871 obj->domaincxx . . $ CONSTRAINT#domain. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3872 obj->typecxx . . $ CONSTRAINT#type. = type;
3873 obj->codecxx . . $ CONSTRAINT#code. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3874 obj->lbndcxx . . $ CONSTRAINT#lbnd. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3875 obj->ubndcxx . . $ CONSTRAINT#ubnd. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3876 obj->arraycxx . . $ CONSTRAINT#array. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3877 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
3878 /* parse optional alias */
3879 if (mpl->tokencxx . . $ MPL#token. == T_STRINGcxx . . $ `external/glpk/glpmpl.h:132:9`!)
3880 { obj->aliascxx . . $ CONSTRAINT#alias. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
3881 strcpycxx . . $ strcpy(b7b3a83273496486).(obj->aliascxx . . $ CONSTRAINT#alias., mpl->imagecxx . . $ MPL#image.);
3882 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <string literal> */);
3883 }
3884 /* parse optional indexing expression */
3885 if (mpl->tokencxx . . $ MPL#token. == T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!)
3886 { obj->domaincxx . . $ CONSTRAINT#domain. = indexing_expressioncxx . . $ `external/glpk/glpmpl.h:450:9`!(mpl);
3887 obj->dimcxx . . $ CONSTRAINT#dim. = domain_aritycxx . . $ `external/glpk/glpmpl.h:462:9`!(mpl, obj->domaincxx . . $ CONSTRAINT#domain.);
3888 }
3889 /* include the constraint name in the symbolic names table */
3890 { AVLNODEcxx . . $ AVLNODE# *node;
3891 node = avl_insert_nodecxx . . $ `external/glpk/glpavl.h:89:9`!(mpl->treecxx . . $ MPL#tree., obj->namecxx . . $ CONSTRAINT#name.);
3892 avl_set_node_typecxx . . $ `external/glpk/glpavl.h:93:9`!(node, A_CONSTRAINTcxx . . $ `external/glpk/glpmpl.h:81:9`!);
3893 avl_set_node_linkcxx . . $ `external/glpk/glpavl.h:97:9`!(node, (void *)obj);
3894 }
3895 /* the colon must precede the objective expression */
3896 if (mpl->tokencxx . . $ MPL#token. != T_COLONcxx . . $ `external/glpk/glpmpl.h:167:9`!)
3897 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "colon missing where expected");
3898 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* : */);
3899 /* parse the objective expression */
3900 obj->codecxx . . $ CONSTRAINT#code. = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
3901 if (obj->codecxx . . $ CONSTRAINT#code.->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
3902 obj->codecxx . . $ CONSTRAINT#code. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTNUMcxx . . $ `external/glpk/glpmpl.h:2092:9`!, obj->codecxx . . $ CONSTRAINT#code., A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!, 0);
3903 if (obj->codecxx . . $ CONSTRAINT#code.->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
3904 obj->codecxx . . $ CONSTRAINT#code. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTLFMcxx . . $ `external/glpk/glpmpl.h:2096:9`!, obj->codecxx . . $ CONSTRAINT#code., A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!, 0);
3905 if (obj->codecxx . . $ CONSTRAINT#code.->typecxx . . $ CODE#type. != A_FORMULAcxx . . $ `external/glpk/glpmpl.h:88:9`!)
3906 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression following colon has invalid type");
3907 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(obj->code->dim == 0);
3908 /* close the domain scope */
3909 if (obj->domaincxx . . $ CONSTRAINT#domain. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) close_scopecxx . . $ `external/glpk/glpmpl.h:454:9`!(mpl, obj->domaincxx . . $ CONSTRAINT#domain.);
3910 /* the objective statement has been completely parsed */
3911 if (mpl->tokencxx . . $ MPL#token. != T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!)
3912 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in objective statement");
3913 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ; */);
3914 return obj;
3915 }
3916
3917 #if 1 /* 11/II-2008 */
3918 /***********************************************************************
3919 * table_statement - parse table statement
3920 *
3921 * This routine parses table statement using the syntax:
3922 *
3923 * <table statement> ::= <input table statement>
3924 * <table statement> ::= <output table statement>
3925 *
3926 * <input table statement> ::=
3927 * table <table name> <alias> IN <argument list> :
3928 * <input set> [ <field list> ] , <input list> ;
3929 * <alias> ::= <empty>
3930 * <alias> ::= <string literal>
3931 * <argument list> ::= <expression 5>
3932 * <argument list> ::= <argument list> <expression 5>
3933 * <argument list> ::= <argument list> , <expression 5>
3934 * <input set> ::= <empty>
3935 * <input set> ::= <set name> <-
3936 * <field list> ::= <field name>
3937 * <field list> ::= <field list> , <field name>
3938 * <input list> ::= <input item>
3939 * <input list> ::= <input list> , <input item>
3940 * <input item> ::= <parameter name>
3941 * <input item> ::= <parameter name> ~ <field name>
3942 *
3943 * <output table statement> ::=
3944 * table <table name> <alias> <domain> OUT <argument list> :
3945 * <output list> ;
3946 * <domain> ::= <indexing expression>
3947 * <output list> ::= <output item>
3948 * <output list> ::= <output list> , <output item>
3949 * <output item> ::= <expression 5>
3950 * <output item> ::= <expression 5> ~ <field name> */
3951
3952 TABLEcxx . . $ TABLE# *table_statementcxx . . $ `external/glpk/glpmpl.h:566:9`!(MPLcxx . . $ MPL# *mpl)
3953 { TABLEcxx . . $ TABLE# *tab;
3954 TABARGcxx . . $ TABARG# *last_arg, *arg;
3955 TABFLDcxx . . $ TABFLD# *last_fld, *fld;
3956 TABINcxx . . $ TABIN# *last_in, *in;
3957 TABOUTcxx . . $ TABOUT# *last_out, *out;
3958 AVLNODEcxx . . $ AVLNODE# *node;
3959 int nflds;
3960 char name[MAX_LENGTHcxx . . $ `external/glpk/glpmpl.h:107:9`!+1];
3961 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "table"));
3962 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* solve */);
3963 /* symbolic name must follow the keyword table */
3964 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
3965 ;
3966 else if (is_reservedcxx . . $ `external/glpk/glpmpl.h:361:9`!(mpl))
3967 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid use of reserved keyword %s", mpl->imagecxx . . $ MPL#image.);
3968 else
3969 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "symbolic name missing where expected");
3970 /* there must be no other object with the same name */
3971 if (avl_find_nodecxx . . $ `external/glpk/glpavl.h:101:9`!(mpl->treecxx . . $ MPL#tree., mpl->imagecxx . . $ MPL#image.) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
3972 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s multiply declared", mpl->imagecxx . . $ MPL#image.);
3973 /* create data table */
3974 tab = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(TABLE);
3975 tab->namecxx . . $ TABLE#name. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
3976 strcpycxx . . $ strcpy(b7b3a83273496486).(tab->namecxx . . $ TABLE#name., mpl->imagecxx . . $ MPL#image.);
3977 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
3978 /* parse optional alias */
3979 if (mpl->tokencxx . . $ MPL#token. == T_STRINGcxx . . $ `external/glpk/glpmpl.h:132:9`!)
3980 { tab->aliascxx . . $ TABLE#alias. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
3981 strcpycxx . . $ strcpy(b7b3a83273496486).(tab->aliascxx . . $ TABLE#alias., mpl->imagecxx . . $ MPL#image.);
3982 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <string literal> */);
3983 }
3984 else
3985 tab->aliascxx . . $ TABLE#alias. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
3986 /* parse optional indexing expression */
3987 if (mpl->tokencxx . . $ MPL#token. == T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!)
3988 { /* this is output table */
3989 tab->typecxx . . $ TABLE#type. = A_OUTPUTcxx . . $ `external/glpk/glpmpl.h:97:9`!;
3990 tab->ucxx . . $ TABLE#u..outcxx . . $ TABLE#$anonymous_type_0#out..domaincxx . . $ TABLE#$anonymous_type_0#$anonymous_type_2#domain. = indexing_expressioncxx . . $ `external/glpk/glpmpl.h:450:9`!(mpl);
3991 if (!is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "OUT"))
3992 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "keyword OUT missing where expected");
3993 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* OUT */);
3994 }
3995 else
3996 { /* this is input table */
3997 tab->typecxx . . $ TABLE#type. = A_INPUTcxx . . $ `external/glpk/glpmpl.h:90:9`!;
3998 if (!is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "IN"))
3999 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "keyword IN missing where expected");
4000 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* IN */);
4001 }
4002 /* parse argument list */
4003 tab->argcxx . . $ TABLE#arg. = last_arg = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4004 for (;;)
4005 { /* create argument list entry */
4006 arg = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(TABARG);
4007 /* parse argument expression */
4008 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`! || mpl->tokencxx . . $ MPL#token. == T_COLONcxx . . $ `external/glpk/glpmpl.h:167:9`! ||
4009 mpl->tokencxx . . $ MPL#token. == T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!)
4010 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "argument expression missing where expected");
4011 arg->codecxx . . $ TABARG#code. = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
4012 /* convert the result to symbolic type, if necessary */
4013 if (arg->codecxx . . $ TABARG#code.->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
4014 arg->codecxx . . $ TABARG#code. =
4015 make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, arg->codecxx . . $ TABARG#code., A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
4016 /* check that now the result is of symbolic type */
4017 if (arg->codecxx . . $ TABARG#code.->typecxx . . $ CODE#type. != A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
4018 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "argument expression has invalid type");
4019 /* add the entry to the end of the list */
4020 arg->nextcxx . . $ TABARG#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4021 if (last_arg == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
4022 tab->argcxx . . $ TABLE#arg. = arg;
4023 else
4024 last_arg->nextcxx . . $ TABARG#next. = arg;
4025 last_arg = arg;
4026 /* argument expression has been parsed */
4027 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
4028 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
4029 else if (mpl->tokencxx . . $ MPL#token. == T_COLONcxx . . $ `external/glpk/glpmpl.h:167:9`! || mpl->tokencxx . . $ MPL#token. == T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!)
4030 break;
4031 }
4032 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(tab->arg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
4033 /* argument list must end with colon */
4034 if (mpl->tokencxx . . $ MPL#token. == T_COLONcxx . . $ `external/glpk/glpmpl.h:167:9`!)
4035 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* : */);
4036 else
4037 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "colon missing where expected");
4038 /* parse specific part of the table statement */
4039 switch (tab->typecxx . . $ TABLE#type.)
4040 { case A_INPUTcxx . . $ `external/glpk/glpmpl.h:90:9`!: goto input_table;
4041 case A_OUTPUTcxx . . $ `external/glpk/glpmpl.h:97:9`!: goto output_table;
4042 default: xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(tab != tab);
4043 }
4044 input_table:
4045 /* parse optional set name */
4046 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
4047 { node = avl_find_nodecxx . . $ `external/glpk/glpavl.h:101:9`!(mpl->treecxx . . $ MPL#tree., mpl->imagecxx . . $ MPL#image.);
4048 if (node == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
4049 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s not defined", mpl->imagecxx . . $ MPL#image.);
4050 if (avl_get_node_typecxx . . $ `external/glpk/glpavl.h:105:9`!(node) != A_SETcxx . . $ `external/glpk/glpmpl.h:100:9`!)
4051 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s not a set", mpl->imagecxx . . $ MPL#image.);
4052 tab->ucxx . . $ TABLE#u..incxx . . $ TABLE#$anonymous_type_0#in..setcxx . . $ TABLE#$anonymous_type_0#$anonymous_type_1#set. = (SETcxx . . $ SET# *)avl_get_node_linkcxx . . $ `external/glpk/glpavl.h:109:9`!(node);
4053 if (tab->ucxx . . $ TABLE#u..incxx . . $ TABLE#$anonymous_type_0#in..setcxx . . $ TABLE#$anonymous_type_0#$anonymous_type_1#set.->assigncxx . . $ SET#assign. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
4054 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s needs no data", mpl->imagecxx . . $ MPL#image.);
4055 if (tab->ucxx . . $ TABLE#u..incxx . . $ TABLE#$anonymous_type_0#in..setcxx . . $ TABLE#$anonymous_type_0#$anonymous_type_1#set.->dimcxx . . $ SET#dim. != 0)
4056 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s must be a simple set", mpl->imagecxx . . $ MPL#image.);
4057 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
4058 if (mpl->tokencxx . . $ MPL#token. == T_INPUTcxx . . $ `external/glpk/glpmpl.h:179:9`!)
4059 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <- */);
4060 else
4061 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "delimiter <- missing where expected");
4062 }
4063 else if (is_reservedcxx . . $ `external/glpk/glpmpl.h:361:9`!(mpl))
4064 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid use of reserved keyword %s", mpl->imagecxx . . $ MPL#image.);
4065 else
4066 tab->ucxx . . $ TABLE#u..incxx . . $ TABLE#$anonymous_type_0#in..setcxx . . $ TABLE#$anonymous_type_0#$anonymous_type_1#set. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4067 /* parse field list */
4068 tab->ucxx . . $ TABLE#u..incxx . . $ TABLE#$anonymous_type_0#in..fldcxx . . $ TABLE#$anonymous_type_0#$anonymous_type_1#fld. = last_fld = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4069 nflds = 0;
4070 if (mpl->tokencxx . . $ MPL#token. == T_LBRACKETcxx . . $ `external/glpk/glpmpl.h:173:9`!)
4071 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* [ */);
4072 else
4073 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "field list missing where expected");
4074 for (;;)
4075 { /* create field list entry */
4076 fld = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(TABFLD);
4077 /* parse field name */
4078 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
4079 ;
4080 else if (is_reservedcxx . . $ `external/glpk/glpmpl.h:361:9`!(mpl))
4081 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl,
4082 "invalid use of reserved keyword %s", mpl->imagecxx . . $ MPL#image.);
4083 else
4084 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "field name missing where expected");
4085 fld->namecxx . . $ TABFLD#name. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(mpl->imagecxx . . $ MPL#image.)+1);
4086 strcpycxx . . $ strcpy(b7b3a83273496486).(fld->namecxx . . $ TABFLD#name., mpl->imagecxx . . $ MPL#image.);
4087 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
4088 /* add the entry to the end of the list */
4089 fld->nextcxx . . $ TABFLD#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4090 if (last_fld == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
4091 tab->ucxx . . $ TABLE#u..incxx . . $ TABLE#$anonymous_type_0#in..fldcxx . . $ TABLE#$anonymous_type_0#$anonymous_type_1#fld. = fld;
4092 else
4093 last_fld->nextcxx . . $ TABFLD#next. = fld;
4094 last_fld = fld;
4095 nflds++;
4096 /* field name has been parsed */
4097 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
4098 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
4099 else if (mpl->tokencxx . . $ MPL#token. == T_RBRACKETcxx . . $ `external/glpk/glpmpl.h:174:9`!)
4100 break;
4101 else
4102 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in field list");
4103 }
4104 /* check that the set dimen is equal to the number of fields */
4105 if (tab->ucxx . . $ TABLE#u..incxx . . $ TABLE#$anonymous_type_0#in..setcxx . . $ TABLE#$anonymous_type_0#$anonymous_type_1#set. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && tab->ucxx . . $ TABLE#u..incxx . . $ TABLE#$anonymous_type_0#in..setcxx . . $ TABLE#$anonymous_type_0#$anonymous_type_1#set.->dimencxx . . $ SET#dimen. != nflds)
4106 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "there must be %d field%s rather than %d",
4107 tab->ucxx . . $ TABLE#u..incxx . . $ TABLE#$anonymous_type_0#in..setcxx . . $ TABLE#$anonymous_type_0#$anonymous_type_1#set.->dimencxx . . $ SET#dimen., tab->ucxx . . $ TABLE#u..incxx . . $ TABLE#$anonymous_type_0#in..setcxx . . $ TABLE#$anonymous_type_0#$anonymous_type_1#set.->dimencxx . . $ SET#dimen. == 1 ? "" : "s",
4108 nflds);
4109 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ] */);
4110 /* parse optional input list */
4111 tab->ucxx . . $ TABLE#u..incxx . . $ TABLE#$anonymous_type_0#in..listcxx . . $ TABLE#$anonymous_type_0#$anonymous_type_1#list. = last_in = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4112 while (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
4113 { get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
4114 /* create input list entry */
4115 in = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(TABIN);
4116 /* parse parameter name */
4117 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
4118 ;
4119 else if (is_reservedcxx . . $ `external/glpk/glpmpl.h:361:9`!(mpl))
4120 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl,
4121 "invalid use of reserved keyword %s", mpl->imagecxx . . $ MPL#image.);
4122 else
4123 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "parameter name missing where expected");
4124 node = avl_find_nodecxx . . $ `external/glpk/glpavl.h:101:9`!(mpl->treecxx . . $ MPL#tree., mpl->imagecxx . . $ MPL#image.);
4125 if (node == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
4126 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s not defined", mpl->imagecxx . . $ MPL#image.);
4127 if (avl_get_node_typecxx . . $ `external/glpk/glpavl.h:105:9`!(node) != A_PARAMETERcxx . . $ `external/glpk/glpmpl.h:98:9`!)
4128 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s not a parameter", mpl->imagecxx . . $ MPL#image.);
4129 in->parcxx . . $ TABIN#par. = (PARAMETERcxx . . $ PARAMETER# *)avl_get_node_linkcxx . . $ `external/glpk/glpavl.h:109:9`!(node);
4130 if (in->parcxx . . $ TABIN#par.->dimcxx . . $ PARAMETER#dim. != nflds)
4131 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s must have %d subscript%s rather than %d",
4132 mpl->imagecxx . . $ MPL#image., nflds, nflds == 1 ? "" : "s", in->parcxx . . $ TABIN#par.->dimcxx . . $ PARAMETER#dim.);
4133 if (in->parcxx . . $ TABIN#par.->assigncxx . . $ PARAMETER#assign. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
4134 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s needs no data", mpl->imagecxx . . $ MPL#image.);
4135 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
4136 /* parse optional field name */
4137 if (mpl->tokencxx . . $ MPL#token. == T_TILDEcxx . . $ `external/glpk/glpmpl.h:178:9`!)
4138 { get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ~ */);
4139 /* parse field name */
4140 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
4141 ;
4142 else if (is_reservedcxx . . $ `external/glpk/glpmpl.h:361:9`!(mpl))
4143 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl,
4144 "invalid use of reserved keyword %s", mpl->imagecxx . . $ MPL#image.);
4145 else
4146 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "field name missing where expected");
4147 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(strlen(mpl->image) < sizeof(name));
4148 strcpycxx . . $ strcpy(b7b3a83273496486).(name, mpl->imagecxx . . $ MPL#image.);
4149 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
4150 }
4151 else
4152 { /* field name is the same as the parameter name */
4153 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(strlen(in->par->name) < sizeof(name));
4154 strcpycxx . . $ strcpy(b7b3a83273496486).(name, in->parcxx . . $ TABIN#par.->namecxx . . $ PARAMETER#name.);
4155 }
4156 /* assign field name */
4157 in->namecxx . . $ TABIN#name. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(name)+1);
4158 strcpycxx . . $ strcpy(b7b3a83273496486).(in->namecxx . . $ TABIN#name., name);
4159 /* add the entry to the end of the list */
4160 in->nextcxx . . $ TABIN#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4161 if (last_in == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
4162 tab->ucxx . . $ TABLE#u..incxx . . $ TABLE#$anonymous_type_0#in..listcxx . . $ TABLE#$anonymous_type_0#$anonymous_type_1#list. = in;
4163 else
4164 last_in->nextcxx . . $ TABIN#next. = in;
4165 last_in = in;
4166 }
4167 goto end_of_table;
4168 output_table:
4169 /* parse output list */
4170 tab->ucxx . . $ TABLE#u..outcxx . . $ TABLE#$anonymous_type_0#out..listcxx . . $ TABLE#$anonymous_type_0#$anonymous_type_2#list. = last_out = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4171 for (;;)
4172 { /* create output list entry */
4173 out = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(TABOUT);
4174 /* parse expression */
4175 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`! || mpl->tokencxx . . $ MPL#token. == T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!)
4176 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression missing where expected");
4177 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
4178 { xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(strlen(mpl->image) < sizeof(name));
4179 strcpycxx . . $ strcpy(b7b3a83273496486).(name, mpl->imagecxx . . $ MPL#image.);
4180 }
4181 else
4182 name[0] = '\0';
4183 out->codecxx . . $ TABOUT#code. = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
4184 /* parse optional field name */
4185 if (mpl->tokencxx . . $ MPL#token. == T_TILDEcxx . . $ `external/glpk/glpmpl.h:178:9`!)
4186 { get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ~ */);
4187 /* parse field name */
4188 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
4189 ;
4190 else if (is_reservedcxx . . $ `external/glpk/glpmpl.h:361:9`!(mpl))
4191 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl,
4192 "invalid use of reserved keyword %s", mpl->imagecxx . . $ MPL#image.);
4193 else
4194 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "field name missing where expected");
4195 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(strlen(mpl->image) < sizeof(name));
4196 strcpycxx . . $ strcpy(b7b3a83273496486).(name, mpl->imagecxx . . $ MPL#image.);
4197 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
4198 }
4199 /* assign field name */
4200 if (name[0] == '\0')
4201 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "field name required");
4202 out->namecxx . . $ TABOUT#name. = dmp_get_atomvcxx . . $ `external/glpk/glpmpl01.c:27:9`!(mpl->poolcxx . . $ MPL#pool., strlencxx . . $ strlen(751346f8406fd082).(name)+1);
4203 strcpycxx . . $ strcpy(b7b3a83273496486).(out->namecxx . . $ TABOUT#name., name);
4204 /* add the entry to the end of the list */
4205 out->nextcxx . . $ TABOUT#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4206 if (last_out == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
4207 tab->ucxx . . $ TABLE#u..outcxx . . $ TABLE#$anonymous_type_0#out..listcxx . . $ TABLE#$anonymous_type_0#$anonymous_type_2#list. = out;
4208 else
4209 last_out->nextcxx . . $ TABOUT#next. = out;
4210 last_out = out;
4211 /* output item has been parsed */
4212 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
4213 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
4214 else if (mpl->tokencxx . . $ MPL#token. == T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!)
4215 break;
4216 else
4217 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in output list");
4218 }
4219 /* close the domain scope */
4220 close_scopecxx . . $ `external/glpk/glpmpl.h:454:9`!(mpl,tab->ucxx . . $ TABLE#u..outcxx . . $ TABLE#$anonymous_type_0#out..domaincxx . . $ TABLE#$anonymous_type_0#$anonymous_type_2#domain.);
4221 end_of_table:
4222 /* the table statement must end with semicolon */
4223 if (mpl->tokencxx . . $ MPL#token. != T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!)
4224 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in table statement");
4225 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ; */);
4226 return tab;
4227 }
4228 #endif
4229
4230 /*----------------------------------------------------------------------
4231 -- solve_statement - parse solve statement.
4232 --
4233 -- This routine parses solve statement using the syntax:
4234 --
4235 -- <solve statement> ::= solve ;
4236 --
4237 -- The solve statement can be used at most once. */
4238
4239 void *solve_statementcxx . . $ `external/glpk/glpmpl.h:570:9`!(MPLcxx . . $ MPL# *mpl)
4240 { xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "solve"));
4241 if (mpl->flag_scxx . . $ MPL#flag_s.)
4242 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "at most one solve statement allowed");
4243 mpl->flag_scxx . . $ MPL#flag_s. = 1;
4244 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* solve */);
4245 /* semicolon must follow solve statement */
4246 if (mpl->tokencxx . . $ MPL#token. != T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!)
4247 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in solve statement");
4248 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ; */);
4249 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4250 }
4251
4252 /*----------------------------------------------------------------------
4253 -- check_statement - parse check statement.
4254 --
4255 -- This routine parses check statement using the syntax:
4256 --
4257 -- <check statement> ::= check <domain> : <expression 13> ;
4258 -- <domain> ::= <empty>
4259 -- <domain> ::= <indexing expression>
4260 --
4261 -- If <domain> is omitted, colon following it may also be omitted. */
4262
4263 CHECKcxx . . $ CHECK# *check_statementcxx . . $ `external/glpk/glpmpl.h:574:9`!(MPLcxx . . $ MPL# *mpl)
4264 { CHECKcxx . . $ CHECK# *chk;
4265 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "check"));
4266 /* create check descriptor */
4267 chk = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(CHECK);
4268 chk->domaincxx . . $ CHECK#domain. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4269 chk->codecxx . . $ CHECK#code. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4270 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* check */);
4271 /* parse optional indexing expression */
4272 if (mpl->tokencxx . . $ MPL#token. == T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!)
4273 { chk->domaincxx . . $ CHECK#domain. = indexing_expressioncxx . . $ `external/glpk/glpmpl.h:450:9`!(mpl);
4274 #if 0
4275 if (mpl->token != T_COLON)
4276 mpl_error(mpl, "colon missing where expected");
4277 #endif
4278 }
4279 /* skip optional colon */
4280 if (mpl->tokencxx . . $ MPL#token. == T_COLONcxx . . $ `external/glpk/glpmpl.h:167:9`!) get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* : */);
4281 /* parse logical expression */
4282 chk->codecxx . . $ CHECK#code. = expression_13cxx . . $ `external/glpk/glpmpl.h:542:9`!(mpl);
4283 if (chk->codecxx . . $ CHECK#code.->typecxx . . $ CODE#type. != A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!)
4284 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "expression has invalid type");
4285 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(chk->code->dim == 0);
4286 /* close the domain scope */
4287 if (chk->domaincxx . . $ CHECK#domain. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) close_scopecxx . . $ `external/glpk/glpmpl.h:454:9`!(mpl, chk->domaincxx . . $ CHECK#domain.);
4288 /* the check statement has been completely parsed */
4289 if (mpl->tokencxx . . $ MPL#token. != T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!)
4290 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in check statement");
4291 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ; */);
4292 return chk;
4293 }
4294
4295 #if 1 /* 15/V-2010 */
4296 /*----------------------------------------------------------------------
4297 -- display_statement - parse display statement.
4298 --
4299 -- This routine parses display statement using the syntax:
4300 --
4301 -- <display statement> ::= display <domain> : <display list> ;
4302 -- <display statement> ::= display <domain> <display list> ;
4303 -- <domain> ::= <empty>
4304 -- <domain> ::= <indexing expression>
4305 -- <display list> ::= <display entry>
4306 -- <display list> ::= <display list> , <display entry>
4307 -- <display entry> ::= <dummy index>
4308 -- <display entry> ::= <set name>
4309 -- <display entry> ::= <set name> [ <subscript list> ]
4310 -- <display entry> ::= <parameter name>
4311 -- <display entry> ::= <parameter name> [ <subscript list> ]
4312 -- <display entry> ::= <variable name>
4313 -- <display entry> ::= <variable name> [ <subscript list> ]
4314 -- <display entry> ::= <constraint name>
4315 -- <display entry> ::= <constraint name> [ <subscript list> ]
4316 -- <display entry> ::= <expression 13> */
4317
4318 DISPLAYcxx . . $ DISPLAY# *display_statementcxx . . $ `external/glpk/glpmpl.h:578:9`!(MPLcxx . . $ MPL# *mpl)
4319 { DISPLAYcxx . . $ DISPLAY# *dpy;
4320 DISPLAY1cxx . . $ DISPLAY1# *entry, *last_entry;
4321 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "display"));
4322 /* create display descriptor */
4323 dpy = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(DISPLAY);
4324 dpy->domaincxx . . $ DISPLAY#domain. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4325 dpy->listcxx . . $ DISPLAY#list. = last_entry = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4326 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* display */);
4327 /* parse optional indexing expression */
4328 if (mpl->tokencxx . . $ MPL#token. == T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!)
4329 dpy->domaincxx . . $ DISPLAY#domain. = indexing_expressioncxx . . $ `external/glpk/glpmpl.h:450:9`!(mpl);
4330 /* skip optional colon */
4331 if (mpl->tokencxx . . $ MPL#token. == T_COLONcxx . . $ `external/glpk/glpmpl.h:167:9`!) get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* : */);
4332 /* parse display list */
4333 for (;;)
4334 { /* create new display entry */
4335 entry = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(DISPLAY1);
4336 entry->typecxx . . $ DISPLAY1#type. = 0;
4337 entry->nextcxx . . $ DISPLAY1#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4338 /* and append it to the display list */
4339 if (dpy->listcxx . . $ DISPLAY#list. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
4340 dpy->listcxx . . $ DISPLAY#list. = entry;
4341 else
4342 last_entry->nextcxx . . $ DISPLAY1#next. = entry;
4343 last_entry = entry;
4344 /* parse display entry */
4345 if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
4346 { AVLNODEcxx . . $ AVLNODE# *node;
4347 int next_token;
4348 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
4349 next_token = mpl->tokencxx . . $ MPL#token.;
4350 unget_tokencxx . . $ `external/glpk/glpmpl.h:353:9`!(mpl);
4351 if (!(next_token == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`! || next_token == T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!))
4352 { /* symbolic name begins expression */
4353 goto expr;
4354 }
4355 /* display entry is dummy index or model object */
4356 node = avl_find_nodecxx . . $ `external/glpk/glpavl.h:101:9`!(mpl->treecxx . . $ MPL#tree., mpl->imagecxx . . $ MPL#image.);
4357 if (node == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
4358 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "%s not defined", mpl->imagecxx . . $ MPL#image.);
4359 entry->typecxx . . $ DISPLAY1#type. = avl_get_node_typecxx . . $ `external/glpk/glpavl.h:105:9`!(node);
4360 switch (avl_get_node_typecxx . . $ `external/glpk/glpavl.h:105:9`!(node))
4361 { case A_INDEXcxx . . $ `external/glpk/glpmpl.h:89:9`!:
4362 entry->ucxx . . $ DISPLAY1#u..slotcxx . . $ DISPLAY1#$anonymous_type_10#slot. =
4363 (DOMAIN_SLOTcxx . . $ DOMAIN_SLOT# *)avl_get_node_linkcxx . . $ `external/glpk/glpavl.h:109:9`!(node);
4364 break;
4365 case A_SETcxx . . $ `external/glpk/glpmpl.h:100:9`!:
4366 entry->ucxx . . $ DISPLAY1#u..setcxx . . $ DISPLAY1#$anonymous_type_10#set. = (SETcxx . . $ SET# *)avl_get_node_linkcxx . . $ `external/glpk/glpavl.h:109:9`!(node);
4367 break;
4368 case A_PARAMETERcxx . . $ `external/glpk/glpmpl.h:98:9`!:
4369 entry->ucxx . . $ DISPLAY1#u..parcxx . . $ DISPLAY1#$anonymous_type_10#par. = (PARAMETERcxx . . $ PARAMETER# *)avl_get_node_linkcxx . . $ `external/glpk/glpavl.h:109:9`!(node);
4370 break;
4371 case A_VARIABLEcxx . . $ `external/glpk/glpmpl.h:105:9`!:
4372 entry->ucxx . . $ DISPLAY1#u..varcxx . . $ DISPLAY1#$anonymous_type_10#var. = (VARIABLEcxx . . $ VARIABLE# *)avl_get_node_linkcxx . . $ `external/glpk/glpavl.h:109:9`!(node);
4373 if (!mpl->flag_scxx . . $ MPL#flag_s.)
4374 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid reference to variable %s above"
4375 " solve statement", entry->ucxx . . $ DISPLAY1#u..varcxx . . $ DISPLAY1#$anonymous_type_10#var.->namecxx . . $ VARIABLE#name.);
4376 break;
4377 case A_CONSTRAINTcxx . . $ `external/glpk/glpmpl.h:81:9`!:
4378 entry->ucxx . . $ DISPLAY1#u..concxx . . $ DISPLAY1#$anonymous_type_10#con. = (CONSTRAINTcxx . . $ CONSTRAINT# *)avl_get_node_linkcxx . . $ `external/glpk/glpavl.h:109:9`!(node);
4379 if (!mpl->flag_scxx . . $ MPL#flag_s.)
4380 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid reference to %s %s above solve"
4381 " statement",
4382 entry->ucxx . . $ DISPLAY1#u..concxx . . $ DISPLAY1#$anonymous_type_10#con.->typecxx . . $ CONSTRAINT#type. == A_CONSTRAINTcxx . . $ `external/glpk/glpmpl.h:81:9`! ?
4383 "constraint" : "objective", entry->ucxx . . $ DISPLAY1#u..concxx . . $ DISPLAY1#$anonymous_type_10#con.->namecxx . . $ CONSTRAINT#name.);
4384 break;
4385 default:
4386 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(node != node);
4387 }
4388 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* <symbolic name> */);
4389 }
4390 else
4391 expr: { /* display entry is expression */
4392 entry->typecxx . . $ DISPLAY1#type. = A_EXPRESSIONcxx . . $ `external/glpk/glpmpl.h:86:9`!;
4393 entry->ucxx . . $ DISPLAY1#u..codecxx . . $ DISPLAY1#$anonymous_type_10#code. = expression_13cxx . . $ `external/glpk/glpmpl.h:542:9`!(mpl);
4394 }
4395 /* check a token that follows the entry parsed */
4396 if (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
4397 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
4398 else
4399 break;
4400 }
4401 /* close the domain scope */
4402 if (dpy->domaincxx . . $ DISPLAY#domain. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) close_scopecxx . . $ `external/glpk/glpmpl.h:454:9`!(mpl, dpy->domaincxx . . $ DISPLAY#domain.);
4403 /* the display statement has been completely parsed */
4404 if (mpl->tokencxx . . $ MPL#token. != T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!)
4405 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in display statement");
4406 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ; */);
4407 return dpy;
4408 }
4409 #endif
4410
4411 /*----------------------------------------------------------------------
4412 -- printf_statement - parse printf statement.
4413 --
4414 -- This routine parses print statement using the syntax:
4415 --
4416 -- <printf statement> ::= <printf clause> ;
4417 -- <printf statement> ::= <printf clause> > <file name> ;
4418 -- <printf statement> ::= <printf clause> >> <file name> ;
4419 -- <printf clause> ::= printf <domain> : <format> <printf list>
4420 -- <printf clause> ::= printf <domain> <format> <printf list>
4421 -- <domain> ::= <empty>
4422 -- <domain> ::= <indexing expression>
4423 -- <format> ::= <expression 5>
4424 -- <printf list> ::= <empty>
4425 -- <printf list> ::= <printf list> , <printf entry>
4426 -- <printf entry> ::= <expression 9>
4427 -- <file name> ::= <expression 5> */
4428
4429 PRINTFcxx . . $ PRINTF# *printf_statementcxx . . $ `external/glpk/glpmpl.h:582:9`!(MPLcxx . . $ MPL# *mpl)
4430 { PRINTFcxx . . $ PRINTF# *prt;
4431 PRINTF1cxx . . $ PRINTF1# *entry, *last_entry;
4432 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "printf"));
4433 /* create printf descriptor */
4434 prt = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(PRINTF);
4435 prt->domaincxx . . $ PRINTF#domain. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4436 prt->fmtcxx . . $ PRINTF#fmt. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4437 prt->listcxx . . $ PRINTF#list. = last_entry = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4438 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* printf */);
4439 /* parse optional indexing expression */
4440 if (mpl->tokencxx . . $ MPL#token. == T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!)
4441 { prt->domaincxx . . $ PRINTF#domain. = indexing_expressioncxx . . $ `external/glpk/glpmpl.h:450:9`!(mpl);
4442 #if 0
4443 if (mpl->token != T_COLON)
4444 mpl_error(mpl, "colon missing where expected");
4445 #endif
4446 }
4447 /* skip optional colon */
4448 if (mpl->tokencxx . . $ MPL#token. == T_COLONcxx . . $ `external/glpk/glpmpl.h:167:9`!) get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* : */);
4449 /* parse expression for format string */
4450 prt->fmtcxx . . $ PRINTF#fmt. = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
4451 /* convert it to symbolic type, if necessary */
4452 if (prt->fmtcxx . . $ PRINTF#fmt.->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
4453 prt->fmtcxx . . $ PRINTF#fmt. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, prt->fmtcxx . . $ PRINTF#fmt., A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
4454 /* check that now the expression is of symbolic type */
4455 if (prt->fmtcxx . . $ PRINTF#fmt.->typecxx . . $ CODE#type. != A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
4456 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "format expression has invalid type");
4457 /* parse printf list */
4458 while (mpl->tokencxx . . $ MPL#token. == T_COMMAcxx . . $ `external/glpk/glpmpl.h:166:9`!)
4459 { get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* , */);
4460 /* create new printf entry */
4461 entry = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(PRINTF1);
4462 entry->codecxx . . $ PRINTF1#code. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4463 entry->nextcxx . . $ PRINTF1#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4464 /* and append it to the printf list */
4465 if (prt->listcxx . . $ PRINTF#list. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
4466 prt->listcxx . . $ PRINTF#list. = entry;
4467 else
4468 last_entry->nextcxx . . $ PRINTF1#next. = entry;
4469 last_entry = entry;
4470 /* parse printf entry */
4471 entry->codecxx . . $ PRINTF1#code. = expression_9cxx . . $ `external/glpk/glpmpl.h:526:9`!(mpl);
4472 if (!(entry->codecxx . . $ PRINTF1#code.->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`! ||
4473 entry->codecxx . . $ PRINTF1#code.->typecxx . . $ CODE#type. == A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`! ||
4474 entry->codecxx . . $ PRINTF1#code.->typecxx . . $ CODE#type. == A_LOGICALcxx . . $ `external/glpk/glpmpl.h:92:9`!))
4475 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "only numeric, symbolic, or logical expression a"
4476 "llowed");
4477 }
4478 /* close the domain scope */
4479 if (prt->domaincxx . . $ PRINTF#domain. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) close_scopecxx . . $ `external/glpk/glpmpl.h:454:9`!(mpl, prt->domaincxx . . $ PRINTF#domain.);
4480 #if 1 /* 14/VII-2006 */
4481 /* parse optional redirection */
4482 prt->fnamecxx . . $ PRINTF#fname. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, prt->appcxx . . $ PRINTF#app. = 0;
4483 if (mpl->tokencxx . . $ MPL#token. == T_GTcxx . . $ `external/glpk/glpmpl.h:161:9`! || mpl->tokencxx . . $ MPL#token. == T_APPENDcxx . . $ `external/glpk/glpmpl.h:177:9`!)
4484 { prt->appcxx . . $ PRINTF#app. = (mpl->tokencxx . . $ MPL#token. == T_APPENDcxx . . $ `external/glpk/glpmpl.h:177:9`!);
4485 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* > or >> */);
4486 /* parse expression for file name string */
4487 prt->fnamecxx . . $ PRINTF#fname. = expression_5cxx . . $ `external/glpk/glpmpl.h:510:9`!(mpl);
4488 /* convert it to symbolic type, if necessary */
4489 if (prt->fnamecxx . . $ PRINTF#fname.->typecxx . . $ CODE#type. == A_NUMERICcxx . . $ `external/glpk/glpmpl.h:96:9`!)
4490 prt->fnamecxx . . $ PRINTF#fname. = make_unarycxx . . $ `external/glpk/glpmpl.h:369:9`!(mpl, O_CVTSYMcxx . . $ `external/glpk/glpmpl.h:2093:9`!, prt->fnamecxx . . $ PRINTF#fname.,
4491 A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!, 0);
4492 /* check that now the expression is of symbolic type */
4493 if (prt->fnamecxx . . $ PRINTF#fname.->typecxx . . $ CODE#type. != A_SYMBOLICcxx . . $ `external/glpk/glpmpl.h:102:9`!)
4494 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "file name expression has invalid type");
4495 }
4496 #endif
4497 /* the printf statement has been completely parsed */
4498 if (mpl->tokencxx . . $ MPL#token. != T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!)
4499 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in printf statement");
4500 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ; */);
4501 return prt;
4502 }
4503
4504 /*----------------------------------------------------------------------
4505 -- for_statement - parse for statement.
4506 --
4507 -- This routine parses for statement using the syntax:
4508 --
4509 -- <for statement> ::= for <domain> <statement>
4510 -- <for statement> ::= for <domain> { <statement list> }
4511 -- <domain> ::= <indexing expression>
4512 -- <statement list> ::= <empty>
4513 -- <statement list> ::= <statement list> <statement>
4514 -- <statement> ::= <check statement>
4515 -- <statement> ::= <display statement>
4516 -- <statement> ::= <printf statement>
4517 -- <statement> ::= <for statement> */
4518
4519 FORcxx . . $ FOR# *for_statementcxx . . $ `external/glpk/glpmpl.h:586:9`!(MPLcxx . . $ MPL# *mpl)
4520 { FORcxx . . $ FOR# *fur;
4521 STATEMENTcxx . . $ STATEMENT# *stmt, *last_stmt;
4522 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "for"));
4523 /* create for descriptor */
4524 fur = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(FOR);
4525 fur->domaincxx . . $ FOR#domain. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4526 fur->listcxx . . $ FOR#list. = last_stmt = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4527 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* for */);
4528 /* parse indexing expression */
4529 if (mpl->tokencxx . . $ MPL#token. != T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!)
4530 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "indexing expression missing where expected");
4531 fur->domaincxx . . $ FOR#domain. = indexing_expressioncxx . . $ `external/glpk/glpmpl.h:450:9`!(mpl);
4532 /* skip optional colon */
4533 if (mpl->tokencxx . . $ MPL#token. == T_COLONcxx . . $ `external/glpk/glpmpl.h:167:9`!) get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* : */);
4534 /* parse for statement body */
4535 if (mpl->tokencxx . . $ MPL#token. != T_LBRACEcxx . . $ `external/glpk/glpmpl.h:175:9`!)
4536 { /* parse simple statement */
4537 fur->listcxx . . $ FOR#list. = simple_statementcxx . . $ `external/glpk/glpmpl.h:594:9`!(mpl, 1);
4538 }
4539 else
4540 { /* parse compound statement */
4541 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* { */);
4542 while (mpl->tokencxx . . $ MPL#token. != T_RBRACEcxx . . $ `external/glpk/glpmpl.h:176:9`!)
4543 { /* parse statement */
4544 stmt = simple_statementcxx . . $ `external/glpk/glpmpl.h:594:9`!(mpl, 1);
4545 /* and append it to the end of the statement list */
4546 if (last_stmt == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
4547 fur->listcxx . . $ FOR#list. = stmt;
4548 else
4549 last_stmt->nextcxx . . $ STATEMENT#next. = stmt;
4550 last_stmt = stmt;
4551 }
4552 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* } */);
4553 }
4554 /* close the domain scope */
4555 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(fur->domain != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
4556 close_scopecxx . . $ `external/glpk/glpmpl.h:454:9`!(mpl, fur->domaincxx . . $ FOR#domain.);
4557 /* the for statement has been completely parsed */
4558 return fur;
4559 }
4560
4561 /*----------------------------------------------------------------------
4562 -- end_statement - parse end statement.
4563 --
4564 -- This routine parses end statement using the syntax:
4565 --
4566 -- <end statement> ::= end ; <eof> */
4567
4568 void end_statementcxx . . $ `external/glpk/glpmpl.h:590:9`!(MPLcxx . . $ MPL# *mpl)
4569 { if (!mpl->flag_dcxx . . $ MPL#flag_d. && is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "end") ||
4570 mpl->flag_dcxx . . $ MPL#flag_d. && is_literalcxx . . $ `external/glpk/glpmpl.h:664:9`!(mpl, "end"))
4571 { get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* end */);
4572 if (mpl->tokencxx . . $ MPL#token. == T_SEMICOLONcxx . . $ `external/glpk/glpmpl.h:168:9`!)
4573 get_tokencxx . . $ `external/glpk/glpmpl.h:349:9`!(mpl /* ; */);
4574 else
4575 warningcxx . . $ `external/glpk/glpmpl.h:2485:9`!(mpl, "no semicolon following end statement; missing"
4576 " semicolon inserted");
4577 }
4578 else
4579 warningcxx . . $ `external/glpk/glpmpl.h:2485:9`!(mpl, "unexpected end of file; missing end statement in"
4580 "serted");
4581 if (mpl->tokencxx . . $ MPL#token. != T_EOFcxx . . $ `external/glpk/glpmpl.h:128:9`!)
4582 warningcxx . . $ `external/glpk/glpmpl.h:2485:9`!(mpl, "some text detected beyond end statement; text ig"
4583 "nored");
4584 return;
4585 }
4586
4587 /*----------------------------------------------------------------------
4588 -- simple_statement - parse simple statement.
4589 --
4590 -- This routine parses simple statement using the syntax:
4591 --
4592 -- <statement> ::= <set statement>
4593 -- <statement> ::= <parameter statement>
4594 -- <statement> ::= <variable statement>
4595 -- <statement> ::= <constraint statement>
4596 -- <statement> ::= <objective statement>
4597 -- <statement> ::= <solve statement>
4598 -- <statement> ::= <check statement>
4599 -- <statement> ::= <display statement>
4600 -- <statement> ::= <printf statement>
4601 -- <statement> ::= <for statement>
4602 --
4603 -- If the flag spec is set, some statements cannot be used. */
4604
4605 STATEMENTcxx . . $ STATEMENT# *simple_statementcxx . . $ `external/glpk/glpmpl.h:594:9`!(MPLcxx . . $ MPL# *mpl, int spec)
4606 { STATEMENTcxx . . $ STATEMENT# *stmt;
4607 stmt = alloccxx . . $ `external/glpk/glpmpl.h:330:9`!(STATEMENT);
4608 stmt->linecxx . . $ STATEMENT#line. = mpl->linecxx . . $ MPL#line.;
4609 stmt->nextcxx . . $ STATEMENT#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4610 if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "set"))
4611 { if (spec)
4612 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "set statement not allowed here");
4613 stmt->typecxx . . $ STATEMENT#type. = A_SETcxx . . $ `external/glpk/glpmpl.h:100:9`!;
4614 stmt->ucxx . . $ STATEMENT#u..setcxx . . $ STATEMENT#$anonymous_type_11#set. = set_statementcxx . . $ `external/glpk/glpmpl.h:546:9`!(mpl);
4615 }
4616 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "param"))
4617 { if (spec)
4618 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "parameter statement not allowed here");
4619 stmt->typecxx . . $ STATEMENT#type. = A_PARAMETERcxx . . $ `external/glpk/glpmpl.h:98:9`!;
4620 stmt->ucxx . . $ STATEMENT#u..parcxx . . $ STATEMENT#$anonymous_type_11#par. = parameter_statementcxx . . $ `external/glpk/glpmpl.h:550:9`!(mpl);
4621 }
4622 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "var"))
4623 { if (spec)
4624 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "variable statement not allowed here");
4625 stmt->typecxx . . $ STATEMENT#type. = A_VARIABLEcxx . . $ `external/glpk/glpmpl.h:105:9`!;
4626 stmt->ucxx . . $ STATEMENT#u..varcxx . . $ STATEMENT#$anonymous_type_11#var. = variable_statementcxx . . $ `external/glpk/glpmpl.h:554:9`!(mpl);
4627 }
4628 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "subject") ||
4629 is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "subj") ||
4630 mpl->tokencxx . . $ MPL#token. == T_SPTPcxx . . $ `external/glpk/glpmpl.h:147:9`!)
4631 { if (spec)
4632 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "constraint statement not allowed here");
4633 stmt->typecxx . . $ STATEMENT#type. = A_CONSTRAINTcxx . . $ `external/glpk/glpmpl.h:81:9`!;
4634 stmt->ucxx . . $ STATEMENT#u..concxx . . $ STATEMENT#$anonymous_type_11#con. = constraint_statementcxx . . $ `external/glpk/glpmpl.h:558:9`!(mpl);
4635 }
4636 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "minimize") ||
4637 is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "maximize"))
4638 { if (spec)
4639 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "objective statement not allowed here");
4640 stmt->typecxx . . $ STATEMENT#type. = A_CONSTRAINTcxx . . $ `external/glpk/glpmpl.h:81:9`!;
4641 stmt->ucxx . . $ STATEMENT#u..concxx . . $ STATEMENT#$anonymous_type_11#con. = objective_statementcxx . . $ `external/glpk/glpmpl.h:562:9`!(mpl);
4642 }
4643 #if 1 /* 11/II-2008 */
4644 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "table"))
4645 { if (spec)
4646 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "table statement not allowed here");
4647 stmt->typecxx . . $ STATEMENT#type. = A_TABLEcxx . . $ `external/glpk/glpmpl.h:103:9`!;
4648 stmt->ucxx . . $ STATEMENT#u..tabcxx . . $ STATEMENT#$anonymous_type_11#tab. = table_statementcxx . . $ `external/glpk/glpmpl.h:566:9`!(mpl);
4649 }
4650 #endif
4651 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "solve"))
4652 { if (spec)
4653 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "solve statement not allowed here");
4654 stmt->typecxx . . $ STATEMENT#type. = A_SOLVEcxx . . $ `external/glpk/glpmpl.h:101:9`!;
4655 stmt->ucxx . . $ STATEMENT#u..slvcxx . . $ STATEMENT#$anonymous_type_11#slv. = solve_statementcxx . . $ `external/glpk/glpmpl.h:570:9`!(mpl);
4656 }
4657 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "check"))
4658 { stmt->typecxx . . $ STATEMENT#type. = A_CHECKcxx . . $ `external/glpk/glpmpl.h:80:9`!;
4659 stmt->ucxx . . $ STATEMENT#u..chkcxx . . $ STATEMENT#$anonymous_type_11#chk. = check_statementcxx . . $ `external/glpk/glpmpl.h:574:9`!(mpl);
4660 }
4661 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "display"))
4662 { stmt->typecxx . . $ STATEMENT#type. = A_DISPLAYcxx . . $ `external/glpk/glpmpl.h:82:9`!;
4663 stmt->ucxx . . $ STATEMENT#u..dpycxx . . $ STATEMENT#$anonymous_type_11#dpy. = display_statementcxx . . $ `external/glpk/glpmpl.h:578:9`!(mpl);
4664 }
4665 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "printf"))
4666 { stmt->typecxx . . $ STATEMENT#type. = A_PRINTFcxx . . $ `external/glpk/glpmpl.h:99:9`!;
4667 stmt->ucxx . . $ STATEMENT#u..prtcxx . . $ STATEMENT#$anonymous_type_11#prt. = printf_statementcxx . . $ `external/glpk/glpmpl.h:582:9`!(mpl);
4668 }
4669 else if (is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "for"))
4670 { stmt->typecxx . . $ STATEMENT#type. = A_FORcxx . . $ `external/glpk/glpmpl.h:87:9`!;
4671 stmt->ucxx . . $ STATEMENT#u..furcxx . . $ STATEMENT#$anonymous_type_11#fur. = for_statementcxx . . $ `external/glpk/glpmpl.h:586:9`!(mpl);
4672 }
4673 else if (mpl->tokencxx . . $ MPL#token. == T_NAMEcxx . . $ `external/glpk/glpmpl.h:129:9`!)
4674 { if (spec)
4675 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "constraint statement not allowed here");
4676 stmt->typecxx . . $ STATEMENT#type. = A_CONSTRAINTcxx . . $ `external/glpk/glpmpl.h:81:9`!;
4677 stmt->ucxx . . $ STATEMENT#u..concxx . . $ STATEMENT#$anonymous_type_11#con. = constraint_statementcxx . . $ `external/glpk/glpmpl.h:558:9`!(mpl);
4678 }
4679 else if (is_reservedcxx . . $ `external/glpk/glpmpl.h:361:9`!(mpl))
4680 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "invalid use of reserved keyword %s", mpl->imagecxx . . $ MPL#image.);
4681 else
4682 mpl_errorcxx . . $ `external/glpk/glpmpl.h:2481:9`!(mpl, "syntax error in model section");
4683 return stmt;
4684 }
4685
4686 /*----------------------------------------------------------------------
4687 -- model_section - parse model section.
4688 --
4689 -- This routine parses model section using the syntax:
4690 --
4691 -- <model section> ::= <empty>
4692 -- <model section> ::= <model section> <statement>
4693 --
4694 -- Parsing model section is terminated by either the keyword 'data', or
4695 -- the keyword 'end', or the end of file. */
4696
4697 void model_sectioncxx . . $ `external/glpk/glpmpl.h:598:9`!(MPLcxx . . $ MPL# *mpl)
4698 { STATEMENTcxx . . $ STATEMENT# *stmt, *last_stmt;
4699 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(mpl->model == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
4700 last_stmt = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
4701 while (!(mpl->tokencxx . . $ MPL#token. == T_EOFcxx . . $ `external/glpk/glpmpl.h:128:9`! || is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "data") ||
4702 is_keywordcxx . . $ `external/glpk/glpmpl.h:357:9`!(mpl, "end")))
4703 { /* parse statement */
4704 stmt = simple_statementcxx . . $ `external/glpk/glpmpl.h:594:9`!(mpl, 0);
4705 /* and append it to the end of the statement list */
4706 if (last_stmt == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
4707 mpl->modelcxx . . $ MPL#model. = stmt;
4708 else
4709 last_stmt->nextcxx . . $ STATEMENT#next. = stmt;
4710 last_stmt = stmt;
4711 }
4712 return;
4713 }
4714
4715 /* eof */