1 | /* A Bison parser, made by GNU Bison 2.4.2. */ |
---|
2 | |
---|
3 | /* Skeleton implementation for Bison LALR(1) parsers in C++ |
---|
4 | |
---|
5 | Copyright (C) 2002-2010 Free Software Foundation, Inc. |
---|
6 | |
---|
7 | This program is free software: you can redistribute it and/or modify |
---|
8 | it under the terms of the GNU General Public License as published by |
---|
9 | the Free Software Foundation, either version 3 of the License, or |
---|
10 | (at your option) any later version. |
---|
11 | |
---|
12 | This program is distributed in the hope that it will be useful, |
---|
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | GNU General Public License for more details. |
---|
16 | |
---|
17 | You should have received a copy of the GNU General Public License |
---|
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
---|
19 | |
---|
20 | /* As a special exception, you may create a larger work that contains |
---|
21 | part or all of the Bison parser skeleton and distribute that work |
---|
22 | under terms of your choice, so long as that work isn't itself a |
---|
23 | parser generator using the skeleton or a modified version thereof |
---|
24 | as a parser skeleton. Alternatively, if you modify or redistribute |
---|
25 | the parser skeleton itself, you may (at your option) remove this |
---|
26 | special exception, which will cause the skeleton and the resulting |
---|
27 | Bison output files to be licensed under the GNU General Public |
---|
28 | License without this special exception. |
---|
29 | |
---|
30 | This special exception was added by the Free Software Foundation in |
---|
31 | version 2.2 of Bison. */ |
---|
32 | |
---|
33 | // Take the name prefix into account. |
---|
34 | #define yylex lollex |
---|
35 | |
---|
36 | /* First part of user declarations. */ |
---|
37 | |
---|
38 | /* Line 310 of lalr1.cc */ |
---|
39 | #line 1 "easymesh/easymesh-parser.y" |
---|
40 | |
---|
41 | // |
---|
42 | // Lol Engine |
---|
43 | // |
---|
44 | // Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net> |
---|
45 | // (c) 2009-2013 Cédric Lecacheur <jordx@free.fr> |
---|
46 | // (c) 2009-2013 Benjamin "Touky" Huet <huet.benjamin@gmail.com> |
---|
47 | // This program is free software; you can redistribute it and/or |
---|
48 | // modify it under the terms of the Do What The Fuck You Want To |
---|
49 | // Public License, Version 2, as published by Sam Hocevar. See |
---|
50 | // http://www.wtfpl.net/ for more details. |
---|
51 | // |
---|
52 | |
---|
53 | #if defined HAVE_CONFIG_H |
---|
54 | # include "config.h" |
---|
55 | #endif |
---|
56 | |
---|
57 | #include "core.h" |
---|
58 | #include "easymesh/easymesh.h" |
---|
59 | |
---|
60 | #include <string> |
---|
61 | |
---|
62 | |
---|
63 | |
---|
64 | /* Line 310 of lalr1.cc */ |
---|
65 | #line 66 "generated/easymesh-parser.cpp" |
---|
66 | |
---|
67 | |
---|
68 | #include "easymesh-parser.h" |
---|
69 | |
---|
70 | /* User implementation prologue. */ |
---|
71 | |
---|
72 | /* Line 316 of lalr1.cc */ |
---|
73 | #line 66 "easymesh/easymesh-parser.y" |
---|
74 | |
---|
75 | #include "easymesh/easymesh-compiler.h" |
---|
76 | |
---|
77 | #undef yylex |
---|
78 | #define yylex mc.m_lexer->lex |
---|
79 | |
---|
80 | |
---|
81 | /* Line 316 of lalr1.cc */ |
---|
82 | #line 83 "generated/easymesh-parser.cpp" |
---|
83 | |
---|
84 | #ifndef YY_ |
---|
85 | # if defined YYENABLE_NLS && YYENABLE_NLS |
---|
86 | # if ENABLE_NLS |
---|
87 | # include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */ |
---|
88 | # define YY_(msgid) dgettext ("bison-runtime", msgid) |
---|
89 | # endif |
---|
90 | # endif |
---|
91 | # ifndef YY_ |
---|
92 | # define YY_(msgid) msgid |
---|
93 | # endif |
---|
94 | #endif |
---|
95 | |
---|
96 | /* Suppress unused-variable warnings by "using" E. */ |
---|
97 | #define YYUSE(e) ((void) (e)) |
---|
98 | |
---|
99 | /* Enable debugging if requested. */ |
---|
100 | #if YYDEBUG |
---|
101 | |
---|
102 | /* A pseudo ostream that takes yydebug_ into account. */ |
---|
103 | # define YYCDEBUG if (yydebug_) (*yycdebug_) |
---|
104 | |
---|
105 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
---|
106 | do { \ |
---|
107 | if (yydebug_) \ |
---|
108 | { \ |
---|
109 | *yycdebug_ << Title << ' '; \ |
---|
110 | yy_symbol_print_ ((Type), (Value), (Location)); \ |
---|
111 | *yycdebug_ << std::endl; \ |
---|
112 | } \ |
---|
113 | } while (false) |
---|
114 | |
---|
115 | # define YY_REDUCE_PRINT(Rule) \ |
---|
116 | do { \ |
---|
117 | if (yydebug_) \ |
---|
118 | yy_reduce_print_ (Rule); \ |
---|
119 | } while (false) |
---|
120 | |
---|
121 | # define YY_STACK_PRINT() \ |
---|
122 | do { \ |
---|
123 | if (yydebug_) \ |
---|
124 | yystack_print_ (); \ |
---|
125 | } while (false) |
---|
126 | |
---|
127 | #else /* !YYDEBUG */ |
---|
128 | |
---|
129 | # define YYCDEBUG if (false) std::cerr |
---|
130 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
---|
131 | # define YY_REDUCE_PRINT(Rule) |
---|
132 | # define YY_STACK_PRINT() |
---|
133 | |
---|
134 | #endif /* !YYDEBUG */ |
---|
135 | |
---|
136 | #define yyerrok (yyerrstatus_ = 0) |
---|
137 | #define yyclearin (yychar = yyempty_) |
---|
138 | |
---|
139 | #define YYACCEPT goto yyacceptlab |
---|
140 | #define YYABORT goto yyabortlab |
---|
141 | #define YYERROR goto yyerrorlab |
---|
142 | #define YYRECOVERING() (!!yyerrstatus_) |
---|
143 | |
---|
144 | |
---|
145 | namespace lol { |
---|
146 | |
---|
147 | /* Line 379 of lalr1.cc */ |
---|
148 | #line 149 "generated/easymesh-parser.cpp" |
---|
149 | #if YYERROR_VERBOSE |
---|
150 | |
---|
151 | /* Return YYSTR after stripping away unnecessary quotes and |
---|
152 | backslashes, so that it's suitable for yyerror. The heuristic is |
---|
153 | that double-quoting is unnecessary unless the string contains an |
---|
154 | apostrophe, a comma, or backslash (other than backslash-backslash). |
---|
155 | YYSTR is taken from yytname. */ |
---|
156 | std::string |
---|
157 | EasyMeshParser::yytnamerr_ (const char *yystr) |
---|
158 | { |
---|
159 | if (*yystr == '"') |
---|
160 | { |
---|
161 | std::string yyr = ""; |
---|
162 | char const *yyp = yystr; |
---|
163 | |
---|
164 | for (;;) |
---|
165 | switch (*++yyp) |
---|
166 | { |
---|
167 | case '\'': |
---|
168 | case ',': |
---|
169 | goto do_not_strip_quotes; |
---|
170 | |
---|
171 | case '\\': |
---|
172 | if (*++yyp != '\\') |
---|
173 | goto do_not_strip_quotes; |
---|
174 | /* Fall through. */ |
---|
175 | default: |
---|
176 | yyr += *yyp; |
---|
177 | break; |
---|
178 | |
---|
179 | case '"': |
---|
180 | return yyr; |
---|
181 | } |
---|
182 | do_not_strip_quotes: ; |
---|
183 | } |
---|
184 | |
---|
185 | return yystr; |
---|
186 | } |
---|
187 | |
---|
188 | #endif |
---|
189 | |
---|
190 | /// Build a parser object. |
---|
191 | EasyMeshParser::EasyMeshParser (class EasyMeshCompiler& mc_yyarg) |
---|
192 | : |
---|
193 | #if YYDEBUG |
---|
194 | yydebug_ (false), |
---|
195 | yycdebug_ (&std::cerr), |
---|
196 | #endif |
---|
197 | mc (mc_yyarg) |
---|
198 | { |
---|
199 | } |
---|
200 | |
---|
201 | EasyMeshParser::~EasyMeshParser () |
---|
202 | { |
---|
203 | } |
---|
204 | |
---|
205 | #if YYDEBUG |
---|
206 | /*--------------------------------. |
---|
207 | | Print this symbol on YYOUTPUT. | |
---|
208 | `--------------------------------*/ |
---|
209 | |
---|
210 | inline void |
---|
211 | EasyMeshParser::yy_symbol_value_print_ (int yytype, |
---|
212 | const semantic_type* yyvaluep, const location_type* yylocationp) |
---|
213 | { |
---|
214 | YYUSE (yylocationp); |
---|
215 | YYUSE (yyvaluep); |
---|
216 | switch (yytype) |
---|
217 | { |
---|
218 | default: |
---|
219 | break; |
---|
220 | } |
---|
221 | } |
---|
222 | |
---|
223 | |
---|
224 | void |
---|
225 | EasyMeshParser::yy_symbol_print_ (int yytype, |
---|
226 | const semantic_type* yyvaluep, const location_type* yylocationp) |
---|
227 | { |
---|
228 | *yycdebug_ << (yytype < yyntokens_ ? "token" : "nterm") |
---|
229 | << ' ' << yytname_[yytype] << " (" |
---|
230 | << *yylocationp << ": "; |
---|
231 | yy_symbol_value_print_ (yytype, yyvaluep, yylocationp); |
---|
232 | *yycdebug_ << ')'; |
---|
233 | } |
---|
234 | #endif |
---|
235 | |
---|
236 | void |
---|
237 | EasyMeshParser::yydestruct_ (const char* yymsg, |
---|
238 | int yytype, semantic_type* yyvaluep, location_type* yylocationp) |
---|
239 | { |
---|
240 | YYUSE (yylocationp); |
---|
241 | YYUSE (yymsg); |
---|
242 | YYUSE (yyvaluep); |
---|
243 | |
---|
244 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
---|
245 | |
---|
246 | switch (yytype) |
---|
247 | { |
---|
248 | |
---|
249 | default: |
---|
250 | break; |
---|
251 | } |
---|
252 | } |
---|
253 | |
---|
254 | void |
---|
255 | EasyMeshParser::yypop_ (unsigned int n) |
---|
256 | { |
---|
257 | yystate_stack_.pop (n); |
---|
258 | yysemantic_stack_.pop (n); |
---|
259 | yylocation_stack_.pop (n); |
---|
260 | } |
---|
261 | |
---|
262 | #if YYDEBUG |
---|
263 | std::ostream& |
---|
264 | EasyMeshParser::debug_stream () const |
---|
265 | { |
---|
266 | return *yycdebug_; |
---|
267 | } |
---|
268 | |
---|
269 | void |
---|
270 | EasyMeshParser::set_debug_stream (std::ostream& o) |
---|
271 | { |
---|
272 | yycdebug_ = &o; |
---|
273 | } |
---|
274 | |
---|
275 | |
---|
276 | EasyMeshParser::debug_level_type |
---|
277 | EasyMeshParser::debug_level () const |
---|
278 | { |
---|
279 | return yydebug_; |
---|
280 | } |
---|
281 | |
---|
282 | void |
---|
283 | EasyMeshParser::set_debug_level (debug_level_type l) |
---|
284 | { |
---|
285 | yydebug_ = l; |
---|
286 | } |
---|
287 | #endif |
---|
288 | |
---|
289 | int |
---|
290 | EasyMeshParser::parse () |
---|
291 | { |
---|
292 | /// Lookahead and lookahead in internal form. |
---|
293 | int yychar = yyempty_; |
---|
294 | int yytoken = 0; |
---|
295 | |
---|
296 | /* State. */ |
---|
297 | int yyn; |
---|
298 | int yylen = 0; |
---|
299 | int yystate = 0; |
---|
300 | |
---|
301 | /* Error handling. */ |
---|
302 | int yynerrs_ = 0; |
---|
303 | int yyerrstatus_ = 0; |
---|
304 | |
---|
305 | /// Semantic value of the lookahead. |
---|
306 | semantic_type yylval; |
---|
307 | /// Location of the lookahead. |
---|
308 | location_type yylloc; |
---|
309 | /// The locations where the error started and ended. |
---|
310 | location_type yyerror_range[2]; |
---|
311 | |
---|
312 | /// $$. |
---|
313 | semantic_type yyval; |
---|
314 | /// @$. |
---|
315 | location_type yyloc; |
---|
316 | |
---|
317 | int yyresult; |
---|
318 | |
---|
319 | YYCDEBUG << "Starting parse" << std::endl; |
---|
320 | |
---|
321 | |
---|
322 | /* Initialize the stacks. The initial state will be pushed in |
---|
323 | yynewstate, since the latter expects the semantical and the |
---|
324 | location values to have been already stored, initialize these |
---|
325 | stacks with a primary value. */ |
---|
326 | yystate_stack_ = state_stack_type (0); |
---|
327 | yysemantic_stack_ = semantic_stack_type (0); |
---|
328 | yylocation_stack_ = location_stack_type (0); |
---|
329 | yysemantic_stack_.push (yylval); |
---|
330 | yylocation_stack_.push (yylloc); |
---|
331 | |
---|
332 | /* New state. */ |
---|
333 | yynewstate: |
---|
334 | yystate_stack_.push (yystate); |
---|
335 | YYCDEBUG << "Entering state " << yystate << std::endl; |
---|
336 | |
---|
337 | /* Accept? */ |
---|
338 | if (yystate == yyfinal_) |
---|
339 | goto yyacceptlab; |
---|
340 | |
---|
341 | goto yybackup; |
---|
342 | |
---|
343 | /* Backup. */ |
---|
344 | yybackup: |
---|
345 | |
---|
346 | /* Try to take a decision without lookahead. */ |
---|
347 | yyn = yypact_[yystate]; |
---|
348 | if (yyn == yypact_ninf_) |
---|
349 | goto yydefault; |
---|
350 | |
---|
351 | /* Read a lookahead token. */ |
---|
352 | if (yychar == yyempty_) |
---|
353 | { |
---|
354 | YYCDEBUG << "Reading a token: "; |
---|
355 | yychar = yylex (&yylval, &yylloc); |
---|
356 | } |
---|
357 | |
---|
358 | |
---|
359 | /* Convert token to internal form. */ |
---|
360 | if (yychar <= yyeof_) |
---|
361 | { |
---|
362 | yychar = yytoken = yyeof_; |
---|
363 | YYCDEBUG << "Now at end of input." << std::endl; |
---|
364 | } |
---|
365 | else |
---|
366 | { |
---|
367 | yytoken = yytranslate_ (yychar); |
---|
368 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
---|
369 | } |
---|
370 | |
---|
371 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
---|
372 | detect an error, take that action. */ |
---|
373 | yyn += yytoken; |
---|
374 | if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken) |
---|
375 | goto yydefault; |
---|
376 | |
---|
377 | /* Reduce or error. */ |
---|
378 | yyn = yytable_[yyn]; |
---|
379 | if (yyn <= 0) |
---|
380 | { |
---|
381 | if (yyn == 0 || yyn == yytable_ninf_) |
---|
382 | goto yyerrlab; |
---|
383 | yyn = -yyn; |
---|
384 | goto yyreduce; |
---|
385 | } |
---|
386 | |
---|
387 | /* Shift the lookahead token. */ |
---|
388 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
---|
389 | |
---|
390 | /* Discard the token being shifted. */ |
---|
391 | yychar = yyempty_; |
---|
392 | |
---|
393 | yysemantic_stack_.push (yylval); |
---|
394 | yylocation_stack_.push (yylloc); |
---|
395 | |
---|
396 | /* Count tokens shifted since error; after three, turn off error |
---|
397 | status. */ |
---|
398 | if (yyerrstatus_) |
---|
399 | --yyerrstatus_; |
---|
400 | |
---|
401 | yystate = yyn; |
---|
402 | goto yynewstate; |
---|
403 | |
---|
404 | /*-----------------------------------------------------------. |
---|
405 | | yydefault -- do the default action for the current state. | |
---|
406 | `-----------------------------------------------------------*/ |
---|
407 | yydefault: |
---|
408 | yyn = yydefact_[yystate]; |
---|
409 | if (yyn == 0) |
---|
410 | goto yyerrlab; |
---|
411 | goto yyreduce; |
---|
412 | |
---|
413 | /*-----------------------------. |
---|
414 | | yyreduce -- Do a reduction. | |
---|
415 | `-----------------------------*/ |
---|
416 | yyreduce: |
---|
417 | yylen = yyr2_[yyn]; |
---|
418 | /* If YYLEN is nonzero, implement the default value of the action: |
---|
419 | `$$ = $1'. Otherwise, use the top of the stack. |
---|
420 | |
---|
421 | Otherwise, the following line sets YYVAL to garbage. |
---|
422 | This behavior is undocumented and Bison |
---|
423 | users should not rely upon it. */ |
---|
424 | if (yylen) |
---|
425 | yyval = yysemantic_stack_[yylen - 1]; |
---|
426 | else |
---|
427 | yyval = yysemantic_stack_[0]; |
---|
428 | |
---|
429 | { |
---|
430 | slice<location_type, location_stack_type> slice (yylocation_stack_, yylen); |
---|
431 | YYLLOC_DEFAULT (yyloc, slice, yylen); |
---|
432 | } |
---|
433 | YY_REDUCE_PRINT (yyn); |
---|
434 | switch (yyn) |
---|
435 | { |
---|
436 | case 7: |
---|
437 | |
---|
438 | /* Line 677 of lalr1.cc */ |
---|
439 | #line 90 "easymesh/easymesh-parser.y" |
---|
440 | { mc.m_mesh.OpenBrace(); } |
---|
441 | break; |
---|
442 | |
---|
443 | case 8: |
---|
444 | |
---|
445 | /* Line 677 of lalr1.cc */ |
---|
446 | #line 94 "easymesh/easymesh-parser.y" |
---|
447 | { mc.m_mesh.CloseBrace(); } |
---|
448 | break; |
---|
449 | |
---|
450 | case 14: |
---|
451 | |
---|
452 | /* Line 677 of lalr1.cc */ |
---|
453 | #line 109 "easymesh/easymesh-parser.y" |
---|
454 | { mc.m_mesh.SetCurColor(vec4((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3)); } |
---|
455 | break; |
---|
456 | |
---|
457 | case 15: |
---|
458 | |
---|
459 | /* Line 677 of lalr1.cc */ |
---|
460 | #line 110 "easymesh/easymesh-parser.y" |
---|
461 | { uint32_t x = (yysemantic_stack_[(2) - (2)].u32val); |
---|
462 | vec4 v(x >> 24, (x >> 16) & 0xff, (x >> 8) & 0xff, x & 0xff); |
---|
463 | mc.m_mesh.SetCurColor(vec4(v) * (1.f / 255)); } |
---|
464 | break; |
---|
465 | |
---|
466 | case 16: |
---|
467 | |
---|
468 | /* Line 677 of lalr1.cc */ |
---|
469 | #line 113 "easymesh/easymesh-parser.y" |
---|
470 | { mc.m_mesh.SetCurColor2(vec4((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3)); } |
---|
471 | break; |
---|
472 | |
---|
473 | case 17: |
---|
474 | |
---|
475 | /* Line 677 of lalr1.cc */ |
---|
476 | #line 114 "easymesh/easymesh-parser.y" |
---|
477 | { uint32_t x = (yysemantic_stack_[(2) - (2)].u32val); |
---|
478 | vec4 v(x >> 24, (x >> 16) & 0xff, (x >> 8) & 0xff, x & 0xff); |
---|
479 | mc.m_mesh.SetCurColor2(vec4(v) * (1.f / 255)); } |
---|
480 | break; |
---|
481 | |
---|
482 | case 18: |
---|
483 | |
---|
484 | /* Line 677 of lalr1.cc */ |
---|
485 | #line 120 "easymesh/easymesh-parser.y" |
---|
486 | { mc.m_mesh.Chamfer((yysemantic_stack_[(2) - (2)].args).f0); } |
---|
487 | break; |
---|
488 | |
---|
489 | case 19: |
---|
490 | |
---|
491 | /* Line 677 of lalr1.cc */ |
---|
492 | #line 121 "easymesh/easymesh-parser.y" |
---|
493 | { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); } |
---|
494 | break; |
---|
495 | |
---|
496 | case 20: |
---|
497 | |
---|
498 | /* Line 677 of lalr1.cc */ |
---|
499 | #line 122 "easymesh/easymesh-parser.y" |
---|
500 | { mc.m_mesh.Translate(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); } |
---|
501 | break; |
---|
502 | |
---|
503 | case 21: |
---|
504 | |
---|
505 | /* Line 677 of lalr1.cc */ |
---|
506 | #line 123 "easymesh/easymesh-parser.y" |
---|
507 | { mc.m_mesh.Translate(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); } |
---|
508 | break; |
---|
509 | |
---|
510 | case 22: |
---|
511 | |
---|
512 | /* Line 677 of lalr1.cc */ |
---|
513 | #line 124 "easymesh/easymesh-parser.y" |
---|
514 | { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } |
---|
515 | break; |
---|
516 | |
---|
517 | case 23: |
---|
518 | |
---|
519 | /* Line 677 of lalr1.cc */ |
---|
520 | #line 125 "easymesh/easymesh-parser.y" |
---|
521 | { mc.m_mesh.RotateX((yysemantic_stack_[(2) - (2)].args).f0); } |
---|
522 | break; |
---|
523 | |
---|
524 | case 24: |
---|
525 | |
---|
526 | /* Line 677 of lalr1.cc */ |
---|
527 | #line 126 "easymesh/easymesh-parser.y" |
---|
528 | { mc.m_mesh.RotateY((yysemantic_stack_[(2) - (2)].args).f0); } |
---|
529 | break; |
---|
530 | |
---|
531 | case 25: |
---|
532 | |
---|
533 | /* Line 677 of lalr1.cc */ |
---|
534 | #line 127 "easymesh/easymesh-parser.y" |
---|
535 | { mc.m_mesh.RotateZ((yysemantic_stack_[(2) - (2)].args).f0); } |
---|
536 | break; |
---|
537 | |
---|
538 | case 26: |
---|
539 | |
---|
540 | /* Line 677 of lalr1.cc */ |
---|
541 | #line 128 "easymesh/easymesh-parser.y" |
---|
542 | { mc.m_mesh.TaperX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } |
---|
543 | break; |
---|
544 | |
---|
545 | case 27: |
---|
546 | |
---|
547 | /* Line 677 of lalr1.cc */ |
---|
548 | #line 129 "easymesh/easymesh-parser.y" |
---|
549 | { mc.m_mesh.TaperX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); } |
---|
550 | break; |
---|
551 | |
---|
552 | case 28: |
---|
553 | |
---|
554 | /* Line 677 of lalr1.cc */ |
---|
555 | #line 130 "easymesh/easymesh-parser.y" |
---|
556 | { mc.m_mesh.TaperY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } |
---|
557 | break; |
---|
558 | |
---|
559 | case 29: |
---|
560 | |
---|
561 | /* Line 677 of lalr1.cc */ |
---|
562 | #line 131 "easymesh/easymesh-parser.y" |
---|
563 | { mc.m_mesh.TaperY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); } |
---|
564 | break; |
---|
565 | |
---|
566 | case 30: |
---|
567 | |
---|
568 | /* Line 677 of lalr1.cc */ |
---|
569 | #line 132 "easymesh/easymesh-parser.y" |
---|
570 | { mc.m_mesh.TaperZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } |
---|
571 | break; |
---|
572 | |
---|
573 | case 31: |
---|
574 | |
---|
575 | /* Line 677 of lalr1.cc */ |
---|
576 | #line 133 "easymesh/easymesh-parser.y" |
---|
577 | { mc.m_mesh.TaperZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); } |
---|
578 | break; |
---|
579 | |
---|
580 | case 32: |
---|
581 | |
---|
582 | /* Line 677 of lalr1.cc */ |
---|
583 | #line 134 "easymesh/easymesh-parser.y" |
---|
584 | { mc.m_mesh.TwistX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); } |
---|
585 | break; |
---|
586 | |
---|
587 | case 33: |
---|
588 | |
---|
589 | /* Line 677 of lalr1.cc */ |
---|
590 | #line 135 "easymesh/easymesh-parser.y" |
---|
591 | { mc.m_mesh.TwistY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); } |
---|
592 | break; |
---|
593 | |
---|
594 | case 34: |
---|
595 | |
---|
596 | /* Line 677 of lalr1.cc */ |
---|
597 | #line 136 "easymesh/easymesh-parser.y" |
---|
598 | { mc.m_mesh.TwistZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); } |
---|
599 | break; |
---|
600 | |
---|
601 | case 35: |
---|
602 | |
---|
603 | /* Line 677 of lalr1.cc */ |
---|
604 | #line 137 "easymesh/easymesh-parser.y" |
---|
605 | { mc.m_mesh.ShearX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } |
---|
606 | break; |
---|
607 | |
---|
608 | case 36: |
---|
609 | |
---|
610 | /* Line 677 of lalr1.cc */ |
---|
611 | #line 138 "easymesh/easymesh-parser.y" |
---|
612 | { mc.m_mesh.ShearX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); } |
---|
613 | break; |
---|
614 | |
---|
615 | case 37: |
---|
616 | |
---|
617 | /* Line 677 of lalr1.cc */ |
---|
618 | #line 139 "easymesh/easymesh-parser.y" |
---|
619 | { mc.m_mesh.ShearY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } |
---|
620 | break; |
---|
621 | |
---|
622 | case 38: |
---|
623 | |
---|
624 | /* Line 677 of lalr1.cc */ |
---|
625 | #line 140 "easymesh/easymesh-parser.y" |
---|
626 | { mc.m_mesh.ShearY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); } |
---|
627 | break; |
---|
628 | |
---|
629 | case 39: |
---|
630 | |
---|
631 | /* Line 677 of lalr1.cc */ |
---|
632 | #line 141 "easymesh/easymesh-parser.y" |
---|
633 | { mc.m_mesh.ShearZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } |
---|
634 | break; |
---|
635 | |
---|
636 | case 40: |
---|
637 | |
---|
638 | /* Line 677 of lalr1.cc */ |
---|
639 | #line 142 "easymesh/easymesh-parser.y" |
---|
640 | { mc.m_mesh.ShearZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); } |
---|
641 | break; |
---|
642 | |
---|
643 | case 41: |
---|
644 | |
---|
645 | /* Line 677 of lalr1.cc */ |
---|
646 | #line 143 "easymesh/easymesh-parser.y" |
---|
647 | { mc.m_mesh.StretchX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } |
---|
648 | break; |
---|
649 | |
---|
650 | case 42: |
---|
651 | |
---|
652 | /* Line 677 of lalr1.cc */ |
---|
653 | #line 144 "easymesh/easymesh-parser.y" |
---|
654 | { mc.m_mesh.StretchY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } |
---|
655 | break; |
---|
656 | |
---|
657 | case 43: |
---|
658 | |
---|
659 | /* Line 677 of lalr1.cc */ |
---|
660 | #line 145 "easymesh/easymesh-parser.y" |
---|
661 | { mc.m_mesh.StretchZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } |
---|
662 | break; |
---|
663 | |
---|
664 | case 44: |
---|
665 | |
---|
666 | /* Line 677 of lalr1.cc */ |
---|
667 | #line 146 "easymesh/easymesh-parser.y" |
---|
668 | { mc.m_mesh.BendXY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); } |
---|
669 | break; |
---|
670 | |
---|
671 | case 45: |
---|
672 | |
---|
673 | /* Line 677 of lalr1.cc */ |
---|
674 | #line 147 "easymesh/easymesh-parser.y" |
---|
675 | { mc.m_mesh.BendXZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); } |
---|
676 | break; |
---|
677 | |
---|
678 | case 46: |
---|
679 | |
---|
680 | /* Line 677 of lalr1.cc */ |
---|
681 | #line 148 "easymesh/easymesh-parser.y" |
---|
682 | { mc.m_mesh.BendYX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); } |
---|
683 | break; |
---|
684 | |
---|
685 | case 47: |
---|
686 | |
---|
687 | /* Line 677 of lalr1.cc */ |
---|
688 | #line 149 "easymesh/easymesh-parser.y" |
---|
689 | { mc.m_mesh.BendYZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); } |
---|
690 | break; |
---|
691 | |
---|
692 | case 48: |
---|
693 | |
---|
694 | /* Line 677 of lalr1.cc */ |
---|
695 | #line 150 "easymesh/easymesh-parser.y" |
---|
696 | { mc.m_mesh.BendZX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); } |
---|
697 | break; |
---|
698 | |
---|
699 | case 49: |
---|
700 | |
---|
701 | /* Line 677 of lalr1.cc */ |
---|
702 | #line 151 "easymesh/easymesh-parser.y" |
---|
703 | { mc.m_mesh.BendZY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); } |
---|
704 | break; |
---|
705 | |
---|
706 | case 50: |
---|
707 | |
---|
708 | /* Line 677 of lalr1.cc */ |
---|
709 | #line 152 "easymesh/easymesh-parser.y" |
---|
710 | { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, 1.0, 1.0)); } |
---|
711 | break; |
---|
712 | |
---|
713 | case 51: |
---|
714 | |
---|
715 | /* Line 677 of lalr1.cc */ |
---|
716 | #line 153 "easymesh/easymesh-parser.y" |
---|
717 | { mc.m_mesh.Scale(vec3(1.0, (yysemantic_stack_[(2) - (2)].args).f0, 1.0)); } |
---|
718 | break; |
---|
719 | |
---|
720 | case 52: |
---|
721 | |
---|
722 | /* Line 677 of lalr1.cc */ |
---|
723 | #line 154 "easymesh/easymesh-parser.y" |
---|
724 | { mc.m_mesh.Scale(vec3(1.0, 1.0, (yysemantic_stack_[(2) - (2)].args).f0)); } |
---|
725 | break; |
---|
726 | |
---|
727 | case 53: |
---|
728 | |
---|
729 | /* Line 677 of lalr1.cc */ |
---|
730 | #line 155 "easymesh/easymesh-parser.y" |
---|
731 | { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } |
---|
732 | break; |
---|
733 | |
---|
734 | case 54: |
---|
735 | |
---|
736 | /* Line 677 of lalr1.cc */ |
---|
737 | #line 156 "easymesh/easymesh-parser.y" |
---|
738 | { mc.m_mesh.MirrorX(); } |
---|
739 | break; |
---|
740 | |
---|
741 | case 55: |
---|
742 | |
---|
743 | /* Line 677 of lalr1.cc */ |
---|
744 | #line 157 "easymesh/easymesh-parser.y" |
---|
745 | { mc.m_mesh.MirrorY(); } |
---|
746 | break; |
---|
747 | |
---|
748 | case 56: |
---|
749 | |
---|
750 | /* Line 677 of lalr1.cc */ |
---|
751 | #line 158 "easymesh/easymesh-parser.y" |
---|
752 | { mc.m_mesh.MirrorZ(); } |
---|
753 | break; |
---|
754 | |
---|
755 | case 57: |
---|
756 | |
---|
757 | /* Line 677 of lalr1.cc */ |
---|
758 | #line 159 "easymesh/easymesh-parser.y" |
---|
759 | { mc.m_mesh.RadialJitter((yysemantic_stack_[(2) - (2)].args).f0); } |
---|
760 | break; |
---|
761 | |
---|
762 | case 58: |
---|
763 | |
---|
764 | /* Line 677 of lalr1.cc */ |
---|
765 | #line 160 "easymesh/easymesh-parser.y" |
---|
766 | { mc.m_mesh.SplitTriangles((yysemantic_stack_[(2) - (2)].args).f0); } |
---|
767 | break; |
---|
768 | |
---|
769 | case 59: |
---|
770 | |
---|
771 | /* Line 677 of lalr1.cc */ |
---|
772 | #line 161 "easymesh/easymesh-parser.y" |
---|
773 | { mc.m_mesh.SmoothMesh((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } |
---|
774 | break; |
---|
775 | |
---|
776 | case 60: |
---|
777 | |
---|
778 | /* Line 677 of lalr1.cc */ |
---|
779 | #line 162 "easymesh/easymesh-parser.y" |
---|
780 | { mc.m_mesh.ToggleScaleWinding(); } |
---|
781 | break; |
---|
782 | |
---|
783 | case 61: |
---|
784 | |
---|
785 | /* Line 677 of lalr1.cc */ |
---|
786 | #line 163 "easymesh/easymesh-parser.y" |
---|
787 | { mc.m_mesh.CsgUnion(); } |
---|
788 | break; |
---|
789 | |
---|
790 | case 62: |
---|
791 | |
---|
792 | /* Line 677 of lalr1.cc */ |
---|
793 | #line 164 "easymesh/easymesh-parser.y" |
---|
794 | { mc.m_mesh.CsgSubstract(); } |
---|
795 | break; |
---|
796 | |
---|
797 | case 63: |
---|
798 | |
---|
799 | /* Line 677 of lalr1.cc */ |
---|
800 | #line 165 "easymesh/easymesh-parser.y" |
---|
801 | { mc.m_mesh.CsgSubstractLoss(); } |
---|
802 | break; |
---|
803 | |
---|
804 | case 64: |
---|
805 | |
---|
806 | /* Line 677 of lalr1.cc */ |
---|
807 | #line 166 "easymesh/easymesh-parser.y" |
---|
808 | { mc.m_mesh.CsgAnd(); } |
---|
809 | break; |
---|
810 | |
---|
811 | case 65: |
---|
812 | |
---|
813 | /* Line 677 of lalr1.cc */ |
---|
814 | #line 167 "easymesh/easymesh-parser.y" |
---|
815 | { mc.m_mesh.CsgXor(); } |
---|
816 | break; |
---|
817 | |
---|
818 | case 66: |
---|
819 | |
---|
820 | /* Line 677 of lalr1.cc */ |
---|
821 | #line 171 "easymesh/easymesh-parser.y" |
---|
822 | { mc.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, |
---|
823 | (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3, |
---|
824 | (int)(yysemantic_stack_[(2) - (2)].args).f4, (int)(yysemantic_stack_[(2) - (2)].args).f5, 0); } |
---|
825 | break; |
---|
826 | |
---|
827 | case 67: |
---|
828 | |
---|
829 | /* Line 677 of lalr1.cc */ |
---|
830 | #line 174 "easymesh/easymesh-parser.y" |
---|
831 | { mc.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, |
---|
832 | (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3, |
---|
833 | (int)(yysemantic_stack_[(2) - (2)].args).f4, (int)(yysemantic_stack_[(2) - (2)].args).f5, (int)(yysemantic_stack_[(2) - (2)].args).f6); } |
---|
834 | break; |
---|
835 | |
---|
836 | case 68: |
---|
837 | |
---|
838 | /* Line 677 of lalr1.cc */ |
---|
839 | #line 177 "easymesh/easymesh-parser.y" |
---|
840 | { mc.m_mesh.AppendBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } |
---|
841 | break; |
---|
842 | |
---|
843 | case 69: |
---|
844 | |
---|
845 | /* Line 677 of lalr1.cc */ |
---|
846 | #line 178 "easymesh/easymesh-parser.y" |
---|
847 | { mc.m_mesh.AppendSmoothChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, |
---|
848 | (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); } |
---|
849 | break; |
---|
850 | |
---|
851 | case 70: |
---|
852 | |
---|
853 | /* Line 677 of lalr1.cc */ |
---|
854 | #line 180 "easymesh/easymesh-parser.y" |
---|
855 | { mc.m_mesh.AppendFlatChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, |
---|
856 | (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); } |
---|
857 | break; |
---|
858 | |
---|
859 | case 71: |
---|
860 | |
---|
861 | /* Line 677 of lalr1.cc */ |
---|
862 | #line 182 "easymesh/easymesh-parser.y" |
---|
863 | { mc.m_mesh.AppendSphere((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); } |
---|
864 | break; |
---|
865 | |
---|
866 | case 72: |
---|
867 | |
---|
868 | /* Line 677 of lalr1.cc */ |
---|
869 | #line 183 "easymesh/easymesh-parser.y" |
---|
870 | { mc.m_mesh.AppendCapsule((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } |
---|
871 | break; |
---|
872 | |
---|
873 | case 73: |
---|
874 | |
---|
875 | /* Line 677 of lalr1.cc */ |
---|
876 | #line 184 "easymesh/easymesh-parser.y" |
---|
877 | { mc.m_mesh.AppendTorus((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } |
---|
878 | break; |
---|
879 | |
---|
880 | case 74: |
---|
881 | |
---|
882 | /* Line 677 of lalr1.cc */ |
---|
883 | #line 185 "easymesh/easymesh-parser.y" |
---|
884 | { mc.m_mesh.AppendStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, |
---|
885 | (int)(yysemantic_stack_[(2) - (2)].args).f3, (int)(yysemantic_stack_[(2) - (2)].args).f4); } |
---|
886 | break; |
---|
887 | |
---|
888 | case 75: |
---|
889 | |
---|
890 | /* Line 677 of lalr1.cc */ |
---|
891 | #line 187 "easymesh/easymesh-parser.y" |
---|
892 | { mc.m_mesh.AppendExpandedStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, |
---|
893 | (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); } |
---|
894 | break; |
---|
895 | |
---|
896 | case 76: |
---|
897 | |
---|
898 | /* Line 677 of lalr1.cc */ |
---|
899 | #line 189 "easymesh/easymesh-parser.y" |
---|
900 | { mc.m_mesh.AppendDisc((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (int)(yysemantic_stack_[(2) - (2)].args).f2); } |
---|
901 | break; |
---|
902 | |
---|
903 | case 77: |
---|
904 | |
---|
905 | /* Line 677 of lalr1.cc */ |
---|
906 | #line 190 "easymesh/easymesh-parser.y" |
---|
907 | { mc.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } |
---|
908 | break; |
---|
909 | |
---|
910 | case 78: |
---|
911 | |
---|
912 | /* Line 677 of lalr1.cc */ |
---|
913 | #line 191 "easymesh/easymesh-parser.y" |
---|
914 | { mc.m_mesh.AppendSimpleQuad((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } |
---|
915 | break; |
---|
916 | |
---|
917 | case 79: |
---|
918 | |
---|
919 | /* Line 677 of lalr1.cc */ |
---|
920 | #line 192 "easymesh/easymesh-parser.y" |
---|
921 | { mc.m_mesh.AppendCog((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, |
---|
922 | (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3, (yysemantic_stack_[(2) - (2)].args).f4, (yysemantic_stack_[(2) - (2)].args).f5, (yysemantic_stack_[(2) - (2)].args).f6, |
---|
923 | (yysemantic_stack_[(2) - (2)].args).f7, (yysemantic_stack_[(2) - (2)].args).f8, (int)(yysemantic_stack_[(2) - (2)].args).f9); } |
---|
924 | break; |
---|
925 | |
---|
926 | case 80: |
---|
927 | |
---|
928 | /* Line 677 of lalr1.cc */ |
---|
929 | #line 197 "easymesh/easymesh-parser.y" |
---|
930 | { (yyval.args).f0 = (yysemantic_stack_[(1) - (1)].fval); } |
---|
931 | break; |
---|
932 | |
---|
933 | case 81: |
---|
934 | |
---|
935 | /* Line 677 of lalr1.cc */ |
---|
936 | #line 198 "easymesh/easymesh-parser.y" |
---|
937 | { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f1 = (yysemantic_stack_[(2) - (2)].fval); } |
---|
938 | break; |
---|
939 | |
---|
940 | case 82: |
---|
941 | |
---|
942 | /* Line 677 of lalr1.cc */ |
---|
943 | #line 199 "easymesh/easymesh-parser.y" |
---|
944 | { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f2 = (yysemantic_stack_[(2) - (2)].fval); } |
---|
945 | break; |
---|
946 | |
---|
947 | case 83: |
---|
948 | |
---|
949 | /* Line 677 of lalr1.cc */ |
---|
950 | #line 200 "easymesh/easymesh-parser.y" |
---|
951 | { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f3 = (yysemantic_stack_[(2) - (2)].fval); } |
---|
952 | break; |
---|
953 | |
---|
954 | case 84: |
---|
955 | |
---|
956 | /* Line 677 of lalr1.cc */ |
---|
957 | #line 201 "easymesh/easymesh-parser.y" |
---|
958 | { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f4 = (yysemantic_stack_[(2) - (2)].fval); } |
---|
959 | break; |
---|
960 | |
---|
961 | case 85: |
---|
962 | |
---|
963 | /* Line 677 of lalr1.cc */ |
---|
964 | #line 202 "easymesh/easymesh-parser.y" |
---|
965 | { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f5 = (yysemantic_stack_[(2) - (2)].fval); } |
---|
966 | break; |
---|
967 | |
---|
968 | case 86: |
---|
969 | |
---|
970 | /* Line 677 of lalr1.cc */ |
---|
971 | #line 203 "easymesh/easymesh-parser.y" |
---|
972 | { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f6 = (yysemantic_stack_[(2) - (2)].fval); } |
---|
973 | break; |
---|
974 | |
---|
975 | case 87: |
---|
976 | |
---|
977 | /* Line 677 of lalr1.cc */ |
---|
978 | #line 204 "easymesh/easymesh-parser.y" |
---|
979 | { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f7 = (yysemantic_stack_[(2) - (2)].fval); } |
---|
980 | break; |
---|
981 | |
---|
982 | case 88: |
---|
983 | |
---|
984 | /* Line 677 of lalr1.cc */ |
---|
985 | #line 205 "easymesh/easymesh-parser.y" |
---|
986 | { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f8 = (yysemantic_stack_[(2) - (2)].fval); } |
---|
987 | break; |
---|
988 | |
---|
989 | case 89: |
---|
990 | |
---|
991 | /* Line 677 of lalr1.cc */ |
---|
992 | #line 206 "easymesh/easymesh-parser.y" |
---|
993 | { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f9 = (yysemantic_stack_[(2) - (2)].fval); } |
---|
994 | break; |
---|
995 | |
---|
996 | case 90: |
---|
997 | |
---|
998 | /* Line 677 of lalr1.cc */ |
---|
999 | #line 209 "easymesh/easymesh-parser.y" |
---|
1000 | { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); } |
---|
1001 | break; |
---|
1002 | |
---|
1003 | case 91: |
---|
1004 | |
---|
1005 | /* Line 677 of lalr1.cc */ |
---|
1006 | #line 210 "easymesh/easymesh-parser.y" |
---|
1007 | { (yyval.fval) = -(yysemantic_stack_[(2) - (2)].fval); } |
---|
1008 | break; |
---|
1009 | |
---|
1010 | |
---|
1011 | |
---|
1012 | /* Line 677 of lalr1.cc */ |
---|
1013 | #line 1014 "generated/easymesh-parser.cpp" |
---|
1014 | default: |
---|
1015 | break; |
---|
1016 | } |
---|
1017 | YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc); |
---|
1018 | |
---|
1019 | yypop_ (yylen); |
---|
1020 | yylen = 0; |
---|
1021 | YY_STACK_PRINT (); |
---|
1022 | |
---|
1023 | yysemantic_stack_.push (yyval); |
---|
1024 | yylocation_stack_.push (yyloc); |
---|
1025 | |
---|
1026 | /* Shift the result of the reduction. */ |
---|
1027 | yyn = yyr1_[yyn]; |
---|
1028 | yystate = yypgoto_[yyn - yyntokens_] + yystate_stack_[0]; |
---|
1029 | if (0 <= yystate && yystate <= yylast_ |
---|
1030 | && yycheck_[yystate] == yystate_stack_[0]) |
---|
1031 | yystate = yytable_[yystate]; |
---|
1032 | else |
---|
1033 | yystate = yydefgoto_[yyn - yyntokens_]; |
---|
1034 | goto yynewstate; |
---|
1035 | |
---|
1036 | /*------------------------------------. |
---|
1037 | | yyerrlab -- here on detecting error | |
---|
1038 | `------------------------------------*/ |
---|
1039 | yyerrlab: |
---|
1040 | /* If not already recovering from an error, report this error. */ |
---|
1041 | if (!yyerrstatus_) |
---|
1042 | { |
---|
1043 | ++yynerrs_; |
---|
1044 | error (yylloc, yysyntax_error_ (yystate, yytoken)); |
---|
1045 | } |
---|
1046 | |
---|
1047 | yyerror_range[0] = yylloc; |
---|
1048 | if (yyerrstatus_ == 3) |
---|
1049 | { |
---|
1050 | /* If just tried and failed to reuse lookahead token after an |
---|
1051 | error, discard it. */ |
---|
1052 | |
---|
1053 | if (yychar <= yyeof_) |
---|
1054 | { |
---|
1055 | /* Return failure if at end of input. */ |
---|
1056 | if (yychar == yyeof_) |
---|
1057 | YYABORT; |
---|
1058 | } |
---|
1059 | else |
---|
1060 | { |
---|
1061 | yydestruct_ ("Error: discarding", yytoken, &yylval, &yylloc); |
---|
1062 | yychar = yyempty_; |
---|
1063 | } |
---|
1064 | } |
---|
1065 | |
---|
1066 | /* Else will try to reuse lookahead token after shifting the error |
---|
1067 | token. */ |
---|
1068 | goto yyerrlab1; |
---|
1069 | |
---|
1070 | |
---|
1071 | /*---------------------------------------------------. |
---|
1072 | | yyerrorlab -- error raised explicitly by YYERROR. | |
---|
1073 | `---------------------------------------------------*/ |
---|
1074 | yyerrorlab: |
---|
1075 | |
---|
1076 | /* Pacify compilers like GCC when the user code never invokes |
---|
1077 | YYERROR and the label yyerrorlab therefore never appears in user |
---|
1078 | code. */ |
---|
1079 | if (false) |
---|
1080 | goto yyerrorlab; |
---|
1081 | |
---|
1082 | yyerror_range[0] = yylocation_stack_[yylen - 1]; |
---|
1083 | /* Do not reclaim the symbols of the rule which action triggered |
---|
1084 | this YYERROR. */ |
---|
1085 | yypop_ (yylen); |
---|
1086 | yylen = 0; |
---|
1087 | yystate = yystate_stack_[0]; |
---|
1088 | goto yyerrlab1; |
---|
1089 | |
---|
1090 | /*-------------------------------------------------------------. |
---|
1091 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
---|
1092 | `-------------------------------------------------------------*/ |
---|
1093 | yyerrlab1: |
---|
1094 | yyerrstatus_ = 3; /* Each real token shifted decrements this. */ |
---|
1095 | |
---|
1096 | for (;;) |
---|
1097 | { |
---|
1098 | yyn = yypact_[yystate]; |
---|
1099 | if (yyn != yypact_ninf_) |
---|
1100 | { |
---|
1101 | yyn += yyterror_; |
---|
1102 | if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_) |
---|
1103 | { |
---|
1104 | yyn = yytable_[yyn]; |
---|
1105 | if (0 < yyn) |
---|
1106 | break; |
---|
1107 | } |
---|
1108 | } |
---|
1109 | |
---|
1110 | /* Pop the current state because it cannot handle the error token. */ |
---|
1111 | if (yystate_stack_.height () == 1) |
---|
1112 | YYABORT; |
---|
1113 | |
---|
1114 | yyerror_range[0] = yylocation_stack_[0]; |
---|
1115 | yydestruct_ ("Error: popping", |
---|
1116 | yystos_[yystate], |
---|
1117 | &yysemantic_stack_[0], &yylocation_stack_[0]); |
---|
1118 | yypop_ (); |
---|
1119 | yystate = yystate_stack_[0]; |
---|
1120 | YY_STACK_PRINT (); |
---|
1121 | } |
---|
1122 | |
---|
1123 | yyerror_range[1] = yylloc; |
---|
1124 | // Using YYLLOC is tempting, but would change the location of |
---|
1125 | // the lookahead. YYLOC is available though. |
---|
1126 | YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); |
---|
1127 | yysemantic_stack_.push (yylval); |
---|
1128 | yylocation_stack_.push (yyloc); |
---|
1129 | |
---|
1130 | /* Shift the error token. */ |
---|
1131 | YY_SYMBOL_PRINT ("Shifting", yystos_[yyn], |
---|
1132 | &yysemantic_stack_[0], &yylocation_stack_[0]); |
---|
1133 | |
---|
1134 | yystate = yyn; |
---|
1135 | goto yynewstate; |
---|
1136 | |
---|
1137 | /* Accept. */ |
---|
1138 | yyacceptlab: |
---|
1139 | yyresult = 0; |
---|
1140 | goto yyreturn; |
---|
1141 | |
---|
1142 | /* Abort. */ |
---|
1143 | yyabortlab: |
---|
1144 | yyresult = 1; |
---|
1145 | goto yyreturn; |
---|
1146 | |
---|
1147 | yyreturn: |
---|
1148 | if (yychar != yyempty_) |
---|
1149 | yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc); |
---|
1150 | |
---|
1151 | /* Do not reclaim the symbols of the rule which action triggered |
---|
1152 | this YYABORT or YYACCEPT. */ |
---|
1153 | yypop_ (yylen); |
---|
1154 | while (yystate_stack_.height () != 1) |
---|
1155 | { |
---|
1156 | yydestruct_ ("Cleanup: popping", |
---|
1157 | yystos_[yystate_stack_[0]], |
---|
1158 | &yysemantic_stack_[0], |
---|
1159 | &yylocation_stack_[0]); |
---|
1160 | yypop_ (); |
---|
1161 | } |
---|
1162 | |
---|
1163 | return yyresult; |
---|
1164 | } |
---|
1165 | |
---|
1166 | // Generate an error message. |
---|
1167 | std::string |
---|
1168 | EasyMeshParser::yysyntax_error_ (int yystate, int tok) |
---|
1169 | { |
---|
1170 | std::string res; |
---|
1171 | YYUSE (yystate); |
---|
1172 | #if YYERROR_VERBOSE |
---|
1173 | int yyn = yypact_[yystate]; |
---|
1174 | if (yypact_ninf_ < yyn && yyn <= yylast_) |
---|
1175 | { |
---|
1176 | /* Start YYX at -YYN if negative to avoid negative indexes in |
---|
1177 | YYCHECK. */ |
---|
1178 | int yyxbegin = yyn < 0 ? -yyn : 0; |
---|
1179 | |
---|
1180 | /* Stay within bounds of both yycheck and yytname. */ |
---|
1181 | int yychecklim = yylast_ - yyn + 1; |
---|
1182 | int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; |
---|
1183 | int count = 0; |
---|
1184 | for (int x = yyxbegin; x < yyxend; ++x) |
---|
1185 | if (yycheck_[x + yyn] == x && x != yyterror_) |
---|
1186 | ++count; |
---|
1187 | |
---|
1188 | // FIXME: This method of building the message is not compatible |
---|
1189 | // with internationalization. It should work like yacc.c does it. |
---|
1190 | // That is, first build a string that looks like this: |
---|
1191 | // "syntax error, unexpected %s or %s or %s" |
---|
1192 | // Then, invoke YY_ on this string. |
---|
1193 | // Finally, use the string as a format to output |
---|
1194 | // yytname_[tok], etc. |
---|
1195 | // Until this gets fixed, this message appears in English only. |
---|
1196 | res = "syntax error, unexpected "; |
---|
1197 | res += yytnamerr_ (yytname_[tok]); |
---|
1198 | if (count < 5) |
---|
1199 | { |
---|
1200 | count = 0; |
---|
1201 | for (int x = yyxbegin; x < yyxend; ++x) |
---|
1202 | if (yycheck_[x + yyn] == x && x != yyterror_) |
---|
1203 | { |
---|
1204 | res += (!count++) ? ", expecting " : " or "; |
---|
1205 | res += yytnamerr_ (yytname_[x]); |
---|
1206 | } |
---|
1207 | } |
---|
1208 | } |
---|
1209 | else |
---|
1210 | #endif |
---|
1211 | res = YY_("syntax error"); |
---|
1212 | return res; |
---|
1213 | } |
---|
1214 | |
---|
1215 | |
---|
1216 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
---|
1217 | STATE-NUM. */ |
---|
1218 | const signed char EasyMeshParser::yypact_ninf_ = -71; |
---|
1219 | const signed char |
---|
1220 | EasyMeshParser::yypact_[] = |
---|
1221 | { |
---|
1222 | 62, -42, -25, -49, -49, -49, -49, -49, -49, -49, |
---|
1223 | -49, -49, -71, -49, -49, -49, -49, -49, -49, -49, |
---|
1224 | -49, -49, -71, -49, -49, -49, -49, -49, -49, -49, |
---|
1225 | -49, -49, -71, -49, -49, -71, -49, -49, -49, -71, |
---|
1226 | -71, -71, -71, -71, -49, -49, -49, -49, -49, -49, |
---|
1227 | -49, -49, -49, -49, -49, -49, -49, -49, -71, 4, |
---|
1228 | 6, 62, 62, 123, -71, -71, -71, -71, -71, -71, |
---|
1229 | -49, -49, -49, -49, -71, -71, -71, -71, -71, -71, |
---|
1230 | -49, -71, -71, -49, -71, -71, -71, -71, -71, -71, |
---|
1231 | -71, -49, -71, -71, -49, -71, -71, -71, -71, -71, |
---|
1232 | -71, -71, -49, -71, -71, -49, -71, -71, -71, -71, |
---|
1233 | -71, -71, -71, -71, -71, -71, -71, -49, -49, -49, |
---|
1234 | -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, |
---|
1235 | -71, -49, -49, -49, -49, -71, -71, -71, -71, -71, |
---|
1236 | -55, -71, -71, -71, -71, -71, -71, -71, -71, -71, |
---|
1237 | -71, -71, -71, -71 |
---|
1238 | }; |
---|
1239 | |
---|
1240 | /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE |
---|
1241 | doesn't specify something else to do. Zero means the default is an |
---|
1242 | error. */ |
---|
1243 | const unsigned char |
---|
1244 | EasyMeshParser::yydefact_[] = |
---|
1245 | { |
---|
1246 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
---|
1247 | 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, |
---|
1248 | 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, |
---|
1249 | 0, 0, 56, 0, 0, 60, 0, 0, 0, 61, |
---|
1250 | 62, 63, 64, 65, 0, 0, 0, 0, 0, 0, |
---|
1251 | 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, |
---|
1252 | 0, 3, 0, 5, 9, 11, 12, 13, 90, 15, |
---|
1253 | 0, 0, 0, 0, 14, 80, 17, 16, 19, 23, |
---|
1254 | 26, 27, 32, 35, 36, 41, 44, 45, 50, 20, |
---|
1255 | 24, 28, 29, 33, 37, 38, 42, 46, 47, 51, |
---|
1256 | 21, 25, 30, 31, 34, 39, 40, 43, 48, 49, |
---|
1257 | 52, 22, 53, 57, 58, 59, 18, 0, 0, 66, |
---|
1258 | 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, |
---|
1259 | 78, 0, 0, 0, 0, 79, 73, 1, 2, 4, |
---|
1260 | 0, 10, 91, 81, 82, 83, 84, 85, 86, 87, |
---|
1261 | 88, 89, 8, 6 |
---|
1262 | }; |
---|
1263 | |
---|
1264 | /* YYPGOTO[NTERM-NUM]. */ |
---|
1265 | const short int |
---|
1266 | EasyMeshParser::yypgoto_[] = |
---|
1267 | { |
---|
1268 | -71, -71, -32, -71, -71, -71, -71, -52, -71, -71, |
---|
1269 | -71, 232, 184, 0, 182, -37, -34, -30, -71, -71, |
---|
1270 | -71, -70 |
---|
1271 | }; |
---|
1272 | |
---|
1273 | /* YYDEFGOTO[NTERM-NUM]. */ |
---|
1274 | const short int |
---|
1275 | EasyMeshParser::yydefgoto_[] = |
---|
1276 | { |
---|
1277 | -1, 59, 60, 61, 62, 153, 63, 64, 65, 66, |
---|
1278 | 67, 71, 72, 73, 117, 118, 119, 120, 133, 134, |
---|
1279 | 135, 75 |
---|
1280 | }; |
---|
1281 | |
---|
1282 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
---|
1283 | positive, shift that token. If negative, reduce the rule which |
---|
1284 | number is the opposite. If zero, do what YYDEFACT says. */ |
---|
1285 | const signed char EasyMeshParser::yytable_ninf_ = -1; |
---|
1286 | const unsigned char |
---|
1287 | EasyMeshParser::yytable_[] = |
---|
1288 | { |
---|
1289 | 142, 143, 144, 145, 137, 80, 138, 83, 85, 152, |
---|
1290 | 145, 141, 68, 145, 126, 91, 70, 94, 96, 68, |
---|
1291 | 69, 145, 131, 70, 145, 102, 132, 105, 107, 139, |
---|
1292 | 140, 0, 145, 111, 112, 145, 68, 76, 115, 0, |
---|
1293 | 70, 0, 0, 0, 0, 0, 121, 146, 147, 148, |
---|
1294 | 125, 0, 0, 128, 0, 0, 0, 136, 0, 0, |
---|
1295 | 0, 148, 149, 150, 151, 1, 2, 3, 4, 5, |
---|
1296 | 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
---|
1297 | 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, |
---|
1298 | 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, |
---|
1299 | 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, |
---|
1300 | 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, |
---|
1301 | 56, 57, 0, 0, 0, 58, 1, 2, 3, 4, |
---|
1302 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
---|
1303 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
---|
1304 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
---|
1305 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, |
---|
1306 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
---|
1307 | 55, 56, 57, 74, 77, 0, 0, 81, 0, 84, |
---|
1308 | 82, 0, 0, 86, 87, 0, 0, 92, 0, 95, |
---|
1309 | 93, 0, 0, 97, 98, 0, 0, 103, 0, 106, |
---|
1310 | 104, 0, 0, 108, 109, 0, 0, 0, 0, 0, |
---|
1311 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, |
---|
1312 | 123, 0, 0, 124, 127, 78, 79, 0, 129, 130, |
---|
1313 | 0, 0, 0, 88, 0, 89, 90, 0, 0, 0, |
---|
1314 | 0, 0, 0, 99, 0, 100, 101, 0, 0, 0, |
---|
1315 | 0, 0, 0, 110, 0, 0, 0, 0, 113, 114, |
---|
1316 | 0, 0, 0, 0, 0, 0, 116 |
---|
1317 | }; |
---|
1318 | |
---|
1319 | /* YYCHECK. */ |
---|
1320 | const short int |
---|
1321 | EasyMeshParser::yycheck_[] = |
---|
1322 | { |
---|
1323 | 70, 71, 72, 73, 0, 5, 0, 7, 8, 64, |
---|
1324 | 80, 63, 61, 83, 51, 15, 65, 17, 18, 61, |
---|
1325 | 62, 91, 56, 65, 94, 25, 56, 27, 28, 61, |
---|
1326 | 62, -1, 102, 33, 34, 105, 61, 62, 38, -1, |
---|
1327 | 65, -1, -1, -1, -1, -1, 46, 117, 118, 119, |
---|
1328 | 50, -1, -1, 53, -1, -1, -1, 57, -1, -1, |
---|
1329 | -1, 131, 132, 133, 134, 3, 4, 5, 6, 7, |
---|
1330 | 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, |
---|
1331 | 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, |
---|
1332 | 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, |
---|
1333 | 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, |
---|
1334 | 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, |
---|
1335 | 58, 59, -1, -1, -1, 63, 3, 4, 5, 6, |
---|
1336 | 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, |
---|
1337 | 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
---|
1338 | 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, |
---|
1339 | 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, |
---|
1340 | 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
---|
1341 | 57, 58, 59, 1, 2, -1, -1, 5, -1, 7, |
---|
1342 | 6, -1, -1, 9, 10, -1, -1, 15, -1, 17, |
---|
1343 | 16, -1, -1, 19, 20, -1, -1, 25, -1, 27, |
---|
1344 | 26, -1, -1, 29, 30, -1, -1, -1, -1, -1, |
---|
1345 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 47, |
---|
1346 | 48, -1, -1, 49, 52, 3, 4, -1, 54, 55, |
---|
1347 | -1, -1, -1, 11, -1, 13, 14, -1, -1, -1, |
---|
1348 | -1, -1, -1, 21, -1, 23, 24, -1, -1, -1, |
---|
1349 | -1, -1, -1, 31, -1, -1, -1, -1, 36, 37, |
---|
1350 | -1, -1, -1, -1, -1, -1, 44 |
---|
1351 | }; |
---|
1352 | |
---|
1353 | /* STOS_[STATE-NUM] -- The (internal number of the) accessing |
---|
1354 | symbol of state STATE-NUM. */ |
---|
1355 | const unsigned char |
---|
1356 | EasyMeshParser::yystos_[] = |
---|
1357 | { |
---|
1358 | 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
---|
1359 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, |
---|
1360 | 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, |
---|
1361 | 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, |
---|
1362 | 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, |
---|
1363 | 52, 53, 54, 55, 56, 57, 58, 59, 63, 67, |
---|
1364 | 68, 69, 70, 72, 73, 74, 75, 76, 61, 62, |
---|
1365 | 65, 77, 78, 79, 80, 87, 62, 80, 77, 77, |
---|
1366 | 79, 80, 78, 79, 80, 79, 78, 78, 77, 77, |
---|
1367 | 77, 79, 80, 78, 79, 80, 79, 78, 78, 77, |
---|
1368 | 77, 77, 79, 80, 78, 79, 80, 79, 78, 78, |
---|
1369 | 77, 79, 79, 77, 77, 79, 77, 80, 81, 82, |
---|
1370 | 83, 79, 80, 80, 78, 79, 81, 80, 79, 78, |
---|
1371 | 78, 82, 83, 84, 85, 86, 79, 0, 0, 68, |
---|
1372 | 68, 73, 87, 87, 87, 87, 87, 87, 87, 87, |
---|
1373 | 87, 87, 64, 71 |
---|
1374 | }; |
---|
1375 | |
---|
1376 | #if YYDEBUG |
---|
1377 | /* TOKEN_NUMBER_[YYLEX-NUM] -- Internal symbol number corresponding |
---|
1378 | to YYLEX-NUM. */ |
---|
1379 | const unsigned short int |
---|
1380 | EasyMeshParser::yytoken_number_[] = |
---|
1381 | { |
---|
1382 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
---|
1383 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
---|
1384 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
---|
1385 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
---|
1386 | 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, |
---|
1387 | 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, |
---|
1388 | 315, 316, 317, 91, 93, 45 |
---|
1389 | }; |
---|
1390 | #endif |
---|
1391 | |
---|
1392 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
---|
1393 | const unsigned char |
---|
1394 | EasyMeshParser::yyr1_[] = |
---|
1395 | { |
---|
1396 | 0, 66, 67, 68, 68, 69, 69, 70, 71, 72, |
---|
1397 | 72, 73, 73, 73, 74, 74, 74, 74, 75, 75, |
---|
1398 | 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, |
---|
1399 | 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, |
---|
1400 | 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, |
---|
1401 | 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, |
---|
1402 | 75, 75, 75, 75, 75, 75, 76, 76, 76, 76, |
---|
1403 | 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, |
---|
1404 | 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, |
---|
1405 | 87, 87 |
---|
1406 | }; |
---|
1407 | |
---|
1408 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
---|
1409 | const unsigned char |
---|
1410 | EasyMeshParser::yyr2_[] = |
---|
1411 | { |
---|
1412 | 0, 2, 2, 1, 2, 1, 3, 1, 1, 1, |
---|
1413 | 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, |
---|
1414 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1415 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1416 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1417 | 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, |
---|
1418 | 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, |
---|
1419 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1420 | 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1421 | 1, 2 |
---|
1422 | }; |
---|
1423 | |
---|
1424 | #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE |
---|
1425 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
---|
1426 | First, the terminals, then, starting at \a yyntokens_, nonterminals. */ |
---|
1427 | const char* |
---|
1428 | const EasyMeshParser::yytname_[] = |
---|
1429 | { |
---|
1430 | "T_END", "error", "$undefined", "T_COLOR", "T_BGCOLOR", "T_TRANSLATEX", |
---|
1431 | "T_ROTATEX", "T_TAPERX", "T_TWISTX", "T_SHEARX", "T_STRETCHX", |
---|
1432 | "T_BENDXY", "T_BENDXZ", "T_SCALEX", "T_MIRRORX", "T_TRANSLATEY", |
---|
1433 | "T_ROTATEY", "T_TAPERY", "T_TWISTY", "T_SHEARY", "T_STRETCHY", |
---|
1434 | "T_BENDYX", "T_BENDYZ", "T_SCALEY", "T_MIRRORY", "T_TRANSLATEZ", |
---|
1435 | "T_ROTATEZ", "T_TAPERZ", "T_TWISTZ", "T_SHEARZ", "T_STRETCHZ", |
---|
1436 | "T_BENDZX", "T_BENDZY", "T_SCALEZ", "T_MIRRORZ", "T_TRANSLATE", |
---|
1437 | "T_SCALE", "T_TOGGLESCALEWINDING", "T_RADIALJITTER", "T_SPLITTRIANGLE", |
---|
1438 | "T_SMOOTHMESH", "T_CSGUNION", "T_CSGSUBSTRACT", "T_CSGSUBSTRACTLOSS", |
---|
1439 | "T_CSGAND", "T_CSGXOR", "T_CHAMFER", "T_CYLINDER", "T_BOX", |
---|
1440 | "T_SMOOTHCHAMFBOX", "T_FLATCHAMFBOX", "T_SPHERE", "T_CAPSULE", "T_STAR", |
---|
1441 | "T_EXPANDEDSTAR", "T_DISC", "T_TRIANGLE", "T_QUAD", "T_COG", "T_TORUS", |
---|
1442 | "T_ERROR", "NUMBER", "COLOR", "'['", "']'", "'-'", "$accept", |
---|
1443 | "mesh_description", "mesh_expression_list", "mesh_expression", |
---|
1444 | "mesh_open", "mesh_close", "mesh_command_list", "mesh_command", |
---|
1445 | "color_command", "transform_command", "primitive_command", "args1", |
---|
1446 | "args2", "args3", "args4", "args5", "args6", "args7", "args8", "args9", |
---|
1447 | "args10", "number", 0 |
---|
1448 | }; |
---|
1449 | #endif |
---|
1450 | |
---|
1451 | #if YYDEBUG |
---|
1452 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
---|
1453 | const EasyMeshParser::rhs_number_type |
---|
1454 | EasyMeshParser::yyrhs_[] = |
---|
1455 | { |
---|
1456 | 67, 0, -1, 68, 0, -1, 69, -1, 69, 68, |
---|
1457 | -1, 72, -1, 70, 68, 71, -1, 63, -1, 64, |
---|
1458 | -1, 73, -1, 72, 73, -1, 74, -1, 75, -1, |
---|
1459 | 76, -1, 3, 80, -1, 3, 62, -1, 4, 80, |
---|
1460 | -1, 4, 62, -1, 46, 77, -1, 5, 77, -1, |
---|
1461 | 15, 77, -1, 25, 77, -1, 35, 79, -1, 6, |
---|
1462 | 77, -1, 16, 77, -1, 26, 77, -1, 7, 79, |
---|
1463 | -1, 7, 80, -1, 17, 79, -1, 17, 80, -1, |
---|
1464 | 27, 79, -1, 27, 80, -1, 8, 78, -1, 18, |
---|
1465 | 78, -1, 28, 78, -1, 9, 79, -1, 9, 80, |
---|
1466 | -1, 19, 79, -1, 19, 80, -1, 29, 79, -1, |
---|
1467 | 29, 80, -1, 10, 79, -1, 20, 79, -1, 30, |
---|
1468 | 79, -1, 11, 78, -1, 12, 78, -1, 21, 78, |
---|
1469 | -1, 22, 78, -1, 31, 78, -1, 32, 78, -1, |
---|
1470 | 13, 77, -1, 23, 77, -1, 33, 77, -1, 36, |
---|
1471 | 79, -1, 14, -1, 24, -1, 34, -1, 38, 77, |
---|
1472 | -1, 39, 77, -1, 40, 79, -1, 37, -1, 41, |
---|
1473 | -1, 42, -1, 43, -1, 44, -1, 45, -1, 47, |
---|
1474 | 82, -1, 47, 83, -1, 48, 79, -1, 49, 80, |
---|
1475 | -1, 50, 80, -1, 51, 78, -1, 52, 79, -1, |
---|
1476 | 59, 79, -1, 53, 81, -1, 54, 80, -1, 55, |
---|
1477 | 79, -1, 56, 78, -1, 57, 78, -1, 58, 86, |
---|
1478 | -1, 87, -1, 77, 87, -1, 78, 87, -1, 79, |
---|
1479 | 87, -1, 80, 87, -1, 81, 87, -1, 82, 87, |
---|
1480 | -1, 83, 87, -1, 84, 87, -1, 85, 87, -1, |
---|
1481 | 61, -1, 65, 87, -1 |
---|
1482 | }; |
---|
1483 | |
---|
1484 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
---|
1485 | YYRHS. */ |
---|
1486 | const unsigned char |
---|
1487 | EasyMeshParser::yyprhs_[] = |
---|
1488 | { |
---|
1489 | 0, 0, 3, 6, 8, 11, 13, 17, 19, 21, |
---|
1490 | 23, 26, 28, 30, 32, 35, 38, 41, 44, 47, |
---|
1491 | 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, |
---|
1492 | 80, 83, 86, 89, 92, 95, 98, 101, 104, 107, |
---|
1493 | 110, 113, 116, 119, 122, 125, 128, 131, 134, 137, |
---|
1494 | 140, 143, 146, 149, 152, 154, 156, 158, 161, 164, |
---|
1495 | 167, 169, 171, 173, 175, 177, 179, 182, 185, 188, |
---|
1496 | 191, 194, 197, 200, 203, 206, 209, 212, 215, 218, |
---|
1497 | 221, 223, 226, 229, 232, 235, 238, 241, 244, 247, |
---|
1498 | 250, 252 |
---|
1499 | }; |
---|
1500 | |
---|
1501 | /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ |
---|
1502 | const unsigned char |
---|
1503 | EasyMeshParser::yyrline_[] = |
---|
1504 | { |
---|
1505 | 0, 76, 76, 80, 81, 85, 86, 90, 94, 98, |
---|
1506 | 99, 103, 104, 105, 109, 110, 113, 114, 120, 121, |
---|
1507 | 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, |
---|
1508 | 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, |
---|
1509 | 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, |
---|
1510 | 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, |
---|
1511 | 162, 163, 164, 165, 166, 167, 171, 174, 177, 178, |
---|
1512 | 180, 182, 183, 184, 185, 187, 189, 190, 191, 192, |
---|
1513 | 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, |
---|
1514 | 209, 210 |
---|
1515 | }; |
---|
1516 | |
---|
1517 | // Print the state stack on the debug stream. |
---|
1518 | void |
---|
1519 | EasyMeshParser::yystack_print_ () |
---|
1520 | { |
---|
1521 | *yycdebug_ << "Stack now"; |
---|
1522 | for (state_stack_type::const_iterator i = yystate_stack_.begin (); |
---|
1523 | i != yystate_stack_.end (); ++i) |
---|
1524 | *yycdebug_ << ' ' << *i; |
---|
1525 | *yycdebug_ << std::endl; |
---|
1526 | } |
---|
1527 | |
---|
1528 | // Report on the debug stream that the rule \a yyrule is going to be reduced. |
---|
1529 | void |
---|
1530 | EasyMeshParser::yy_reduce_print_ (int yyrule) |
---|
1531 | { |
---|
1532 | unsigned int yylno = yyrline_[yyrule]; |
---|
1533 | int yynrhs = yyr2_[yyrule]; |
---|
1534 | /* Print the symbols being reduced, and their result. */ |
---|
1535 | *yycdebug_ << "Reducing stack by rule " << yyrule - 1 |
---|
1536 | << " (line " << yylno << "):" << std::endl; |
---|
1537 | /* The symbols being reduced. */ |
---|
1538 | for (int yyi = 0; yyi < yynrhs; yyi++) |
---|
1539 | YY_SYMBOL_PRINT (" $" << yyi + 1 << " =", |
---|
1540 | yyrhs_[yyprhs_[yyrule] + yyi], |
---|
1541 | &(yysemantic_stack_[(yynrhs) - (yyi + 1)]), |
---|
1542 | &(yylocation_stack_[(yynrhs) - (yyi + 1)])); |
---|
1543 | } |
---|
1544 | #endif // YYDEBUG |
---|
1545 | |
---|
1546 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
---|
1547 | EasyMeshParser::token_number_type |
---|
1548 | EasyMeshParser::yytranslate_ (int t) |
---|
1549 | { |
---|
1550 | static |
---|
1551 | const token_number_type |
---|
1552 | translate_table[] = |
---|
1553 | { |
---|
1554 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1555 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1556 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1557 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1558 | 2, 2, 2, 2, 2, 65, 2, 2, 2, 2, |
---|
1559 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1560 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1561 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1562 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1563 | 2, 63, 2, 64, 2, 2, 2, 2, 2, 2, |
---|
1564 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1565 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1566 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1567 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1568 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1569 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1570 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1571 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1572 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1573 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1574 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1575 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1576 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1577 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1578 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
1579 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
---|
1580 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
---|
1581 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
---|
1582 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
---|
1583 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, |
---|
1584 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
---|
1585 | 55, 56, 57, 58, 59, 60, 61, 62 |
---|
1586 | }; |
---|
1587 | if ((unsigned int) t <= yyuser_token_number_max_) |
---|
1588 | return translate_table[t]; |
---|
1589 | else |
---|
1590 | return yyundef_token_; |
---|
1591 | } |
---|
1592 | |
---|
1593 | const int EasyMeshParser::yyeof_ = 0; |
---|
1594 | const int EasyMeshParser::yylast_ = 276; |
---|
1595 | const int EasyMeshParser::yynnts_ = 22; |
---|
1596 | const int EasyMeshParser::yyempty_ = -2; |
---|
1597 | const int EasyMeshParser::yyfinal_ = 137; |
---|
1598 | const int EasyMeshParser::yyterror_ = 1; |
---|
1599 | const int EasyMeshParser::yyerrcode_ = 256; |
---|
1600 | const int EasyMeshParser::yyntokens_ = 66; |
---|
1601 | |
---|
1602 | const unsigned int EasyMeshParser::yyuser_token_number_max_ = 317; |
---|
1603 | const EasyMeshParser::token_number_type EasyMeshParser::yyundef_token_ = 2; |
---|
1604 | |
---|
1605 | |
---|
1606 | } // lol |
---|
1607 | |
---|
1608 | /* Line 1053 of lalr1.cc */ |
---|
1609 | #line 1610 "generated/easymesh-parser.cpp" |
---|
1610 | |
---|
1611 | |
---|
1612 | /* Line 1055 of lalr1.cc */ |
---|
1613 | #line 213 "easymesh/easymesh-parser.y" |
---|
1614 | |
---|
1615 | |
---|
1616 | void lol::EasyMeshParser::error(const EasyMeshParser::location_type& l, |
---|
1617 | const std::string& m) |
---|
1618 | { |
---|
1619 | mc.Error(l, m); |
---|
1620 | } |
---|
1621 | |
---|
1622 | |
---|