source: trunk/orbital/generated/mesh-parser.cpp @ 1419

Last change on this file since 1419 was 1419, checked in by sam, 11 years ago

orbital: a lot of scanner and parser refactoring to simplify the source
files and allow to build on MSVC soon.

  • Property svn:keywords set to Id
File size: 42.3 KB
Line 
1/* A Bison parser, made by GNU Bison 2.5.  */
2
3/* Skeleton implementation for Bison LALR(1) parsers in C++
4   
5      Copyright (C) 2002-2011 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   orbitallex
35
36/* First part of user declarations.  */
37
38/* Line 293 of lalr1.cc  */
39#line 1 "mesh.yy"
40
41//
42// Orbital
43//
44// Copyright: (c) 2012 Various People
45//
46
47#if defined HAVE_CONFIG_H
48#   include "config.h"
49#endif
50
51#include "core.h"
52#include "loldebug.h"
53
54using namespace lol;
55
56#include "mesh.h"
57
58#include <stdio.h>
59#include <string>
60#include <vector>
61
62
63/* Line 293 of lalr1.cc  */
64#line 65 "generated/mesh-parser.cpp"
65
66
67#include "mesh-parser.h"
68
69/* User implementation prologue.  */
70
71/* Line 299 of lalr1.cc  */
72#line 61 "mesh.yy"
73
74#include "mesh-driver.h"
75#include "mesh-scanner.h"
76
77#undef yylex
78#define yylex driver.m_lexer->lex
79
80
81/* Line 299 of lalr1.cc  */
82#line 83 "generated/mesh-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/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
97   If N is 0, then set CURRENT to the empty location which ends
98   the previous symbol: RHS[0] (always defined).  */
99
100#define YYRHSLOC(Rhs, K) ((Rhs)[K])
101#ifndef YYLLOC_DEFAULT
102# define YYLLOC_DEFAULT(Current, Rhs, N)                               \
103 do                                                                    \
104   if (N)                                                              \
105     {                                                                 \
106       (Current).begin = YYRHSLOC (Rhs, 1).begin;                      \
107       (Current).end   = YYRHSLOC (Rhs, N).end;                        \
108     }                                                                 \
109   else                                                                \
110     {                                                                 \
111       (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end;        \
112     }                                                                 \
113 while (false)
114#endif
115
116/* Suppress unused-variable warnings by "using" E.  */
117#define YYUSE(e) ((void) (e))
118
119/* Enable debugging if requested.  */
120#if YYDEBUG
121
122/* A pseudo ostream that takes yydebug_ into account.  */
123# define YYCDEBUG if (yydebug_) (*yycdebug_)
124
125# define YY_SYMBOL_PRINT(Title, Type, Value, Location)  \
126do {                                                    \
127  if (yydebug_)                                         \
128    {                                                   \
129      *yycdebug_ << Title << ' ';                       \
130      yy_symbol_print_ ((Type), (Value), (Location));   \
131      *yycdebug_ << std::endl;                          \
132    }                                                   \
133} while (false)
134
135# define YY_REDUCE_PRINT(Rule)          \
136do {                                    \
137  if (yydebug_)                         \
138    yy_reduce_print_ (Rule);            \
139} while (false)
140
141# define YY_STACK_PRINT()               \
142do {                                    \
143  if (yydebug_)                         \
144    yystack_print_ ();                  \
145} while (false)
146
147#else /* !YYDEBUG */
148
149# define YYCDEBUG if (false) std::cerr
150# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
151# define YY_REDUCE_PRINT(Rule)
152# define YY_STACK_PRINT()
153
154#endif /* !YYDEBUG */
155
156#define yyerrok         (yyerrstatus_ = 0)
157#define yyclearin       (yychar = yyempty_)
158
159#define YYACCEPT        goto yyacceptlab
160#define YYABORT         goto yyabortlab
161#define YYERROR         goto yyerrorlab
162#define YYRECOVERING()  (!!yyerrstatus_)
163
164
165namespace orbital {
166
167/* Line 382 of lalr1.cc  */
168#line 169 "generated/mesh-parser.cpp"
169
170  /* Return YYSTR after stripping away unnecessary quotes and
171     backslashes, so that it's suitable for yyerror.  The heuristic is
172     that double-quoting is unnecessary unless the string contains an
173     apostrophe, a comma, or backslash (other than backslash-backslash).
174     YYSTR is taken from yytname.  */
175  std::string
176  MeshParser::yytnamerr_ (const char *yystr)
177  {
178    if (*yystr == '"')
179      {
180        std::string yyr = "";
181        char const *yyp = yystr;
182
183        for (;;)
184          switch (*++yyp)
185            {
186            case '\'':
187            case ',':
188              goto do_not_strip_quotes;
189
190            case '\\':
191              if (*++yyp != '\\')
192                goto do_not_strip_quotes;
193              /* Fall through.  */
194            default:
195              yyr += *yyp;
196              break;
197
198            case '"':
199              return yyr;
200            }
201      do_not_strip_quotes: ;
202      }
203
204    return yystr;
205  }
206
207
208  /// Build a parser object.
209  MeshParser::MeshParser (class Driver& driver_yyarg)
210    :
211#if YYDEBUG
212      yydebug_ (false),
213      yycdebug_ (&std::cerr),
214#endif
215      driver (driver_yyarg)
216  {
217  }
218
219  MeshParser::~MeshParser ()
220  {
221  }
222
223#if YYDEBUG
224  /*--------------------------------.
225  | Print this symbol on YYOUTPUT.  |
226  `--------------------------------*/
227
228  inline void
229  MeshParser::yy_symbol_value_print_ (int yytype,
230                           const semantic_type* yyvaluep, const location_type* yylocationp)
231  {
232    YYUSE (yylocationp);
233    YYUSE (yyvaluep);
234    switch (yytype)
235      {
236         default:
237          break;
238      }
239  }
240
241
242  void
243  MeshParser::yy_symbol_print_ (int yytype,
244                           const semantic_type* yyvaluep, const location_type* yylocationp)
245  {
246    *yycdebug_ << (yytype < yyntokens_ ? "token" : "nterm")
247               << ' ' << yytname_[yytype] << " ("
248               << *yylocationp << ": ";
249    yy_symbol_value_print_ (yytype, yyvaluep, yylocationp);
250    *yycdebug_ << ')';
251  }
252#endif
253
254  void
255  MeshParser::yydestruct_ (const char* yymsg,
256                           int yytype, semantic_type* yyvaluep, location_type* yylocationp)
257  {
258    YYUSE (yylocationp);
259    YYUSE (yymsg);
260    YYUSE (yyvaluep);
261
262    YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
263
264    switch (yytype)
265      {
266 
267        default:
268          break;
269      }
270  }
271
272  void
273  MeshParser::yypop_ (unsigned int n)
274  {
275    yystate_stack_.pop (n);
276    yysemantic_stack_.pop (n);
277    yylocation_stack_.pop (n);
278  }
279
280#if YYDEBUG
281  std::ostream&
282  MeshParser::debug_stream () const
283  {
284    return *yycdebug_;
285  }
286
287  void
288  MeshParser::set_debug_stream (std::ostream& o)
289  {
290    yycdebug_ = &o;
291  }
292
293
294  MeshParser::debug_level_type
295  MeshParser::debug_level () const
296  {
297    return yydebug_;
298  }
299
300  void
301  MeshParser::set_debug_level (debug_level_type l)
302  {
303    yydebug_ = l;
304  }
305#endif
306
307  inline bool
308  MeshParser::yy_pact_value_is_default_ (int yyvalue)
309  {
310    return yyvalue == yypact_ninf_;
311  }
312
313  inline bool
314  MeshParser::yy_table_value_is_error_ (int yyvalue)
315  {
316    return yyvalue == yytable_ninf_;
317  }
318
319  int
320  MeshParser::parse ()
321  {
322    /// Lookahead and lookahead in internal form.
323    int yychar = yyempty_;
324    int yytoken = 0;
325
326    /* State.  */
327    int yyn;
328    int yylen = 0;
329    int yystate = 0;
330
331    /* Error handling.  */
332    int yynerrs_ = 0;
333    int yyerrstatus_ = 0;
334
335    /// Semantic value of the lookahead.
336    semantic_type yylval;
337    /// Location of the lookahead.
338    location_type yylloc;
339    /// The locations where the error started and ended.
340    location_type yyerror_range[3];
341
342    /// $$.
343    semantic_type yyval;
344    /// @$.
345    location_type yyloc;
346
347    int yyresult;
348
349    YYCDEBUG << "Starting parse" << std::endl;
350
351
352    /* Initialize the stacks.  The initial state will be pushed in
353       yynewstate, since the latter expects the semantical and the
354       location values to have been already stored, initialize these
355       stacks with a primary value.  */
356    yystate_stack_ = state_stack_type (0);
357    yysemantic_stack_ = semantic_stack_type (0);
358    yylocation_stack_ = location_stack_type (0);
359    yysemantic_stack_.push (yylval);
360    yylocation_stack_.push (yylloc);
361
362    /* New state.  */
363  yynewstate:
364    yystate_stack_.push (yystate);
365    YYCDEBUG << "Entering state " << yystate << std::endl;
366
367    /* Accept?  */
368    if (yystate == yyfinal_)
369      goto yyacceptlab;
370
371    goto yybackup;
372
373    /* Backup.  */
374  yybackup:
375
376    /* Try to take a decision without lookahead.  */
377    yyn = yypact_[yystate];
378    if (yy_pact_value_is_default_ (yyn))
379      goto yydefault;
380
381    /* Read a lookahead token.  */
382    if (yychar == yyempty_)
383      {
384        YYCDEBUG << "Reading a token: ";
385        yychar = yylex (&yylval, &yylloc);
386      }
387
388
389    /* Convert token to internal form.  */
390    if (yychar <= yyeof_)
391      {
392        yychar = yytoken = yyeof_;
393        YYCDEBUG << "Now at end of input." << std::endl;
394      }
395    else
396      {
397        yytoken = yytranslate_ (yychar);
398        YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
399      }
400
401    /* If the proper action on seeing token YYTOKEN is to reduce or to
402       detect an error, take that action.  */
403    yyn += yytoken;
404    if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)
405      goto yydefault;
406
407    /* Reduce or error.  */
408    yyn = yytable_[yyn];
409    if (yyn <= 0)
410      {
411        if (yy_table_value_is_error_ (yyn))
412          goto yyerrlab;
413        yyn = -yyn;
414        goto yyreduce;
415      }
416
417    /* Shift the lookahead token.  */
418    YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
419
420    /* Discard the token being shifted.  */
421    yychar = yyempty_;
422
423    yysemantic_stack_.push (yylval);
424    yylocation_stack_.push (yylloc);
425
426    /* Count tokens shifted since error; after three, turn off error
427       status.  */
428    if (yyerrstatus_)
429      --yyerrstatus_;
430
431    yystate = yyn;
432    goto yynewstate;
433
434  /*-----------------------------------------------------------.
435  | yydefault -- do the default action for the current state.  |
436  `-----------------------------------------------------------*/
437  yydefault:
438    yyn = yydefact_[yystate];
439    if (yyn == 0)
440      goto yyerrlab;
441    goto yyreduce;
442
443  /*-----------------------------.
444  | yyreduce -- Do a reduction.  |
445  `-----------------------------*/
446  yyreduce:
447    yylen = yyr2_[yyn];
448    /* If YYLEN is nonzero, implement the default value of the action:
449       `$$ = $1'.  Otherwise, use the top of the stack.
450
451       Otherwise, the following line sets YYVAL to garbage.
452       This behavior is undocumented and Bison
453       users should not rely upon it.  */
454    if (yylen)
455      yyval = yysemantic_stack_[yylen - 1];
456    else
457      yyval = yysemantic_stack_[0];
458
459    {
460      slice<location_type, location_stack_type> slice (yylocation_stack_, yylen);
461      YYLLOC_DEFAULT (yyloc, slice, yylen);
462    }
463    YY_REDUCE_PRINT (yyn);
464    switch (yyn)
465      {
466          case 9:
467
468/* Line 690 of lalr1.cc  */
469#line 88 "mesh.yy"
470    { driver.m_mesh.Flush(); }
471    break;
472
473  case 10:
474
475/* Line 690 of lalr1.cc  */
476#line 89 "mesh.yy"
477    { driver.m_mesh.MeshConvert(); }
478    break;
479
480  case 11:
481
482/* Line 690 of lalr1.cc  */
483#line 90 "mesh.yy"
484    { /* TODO */ }
485    break;
486
487  case 12:
488
489/* Line 690 of lalr1.cc  */
490#line 94 "mesh.yy"
491    { driver.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)); }
492    break;
493
494  case 13:
495
496/* Line 690 of lalr1.cc  */
497#line 95 "mesh.yy"
498    { driver.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)); }
499    break;
500
501  case 14:
502
503/* Line 690 of lalr1.cc  */
504#line 99 "mesh.yy"
505    { driver.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); }
506    break;
507
508  case 15:
509
510/* Line 690 of lalr1.cc  */
511#line 100 "mesh.yy"
512    { driver.m_mesh.Translate(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); }
513    break;
514
515  case 16:
516
517/* Line 690 of lalr1.cc  */
518#line 101 "mesh.yy"
519    { driver.m_mesh.Translate(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); }
520    break;
521
522  case 17:
523
524/* Line 690 of lalr1.cc  */
525#line 102 "mesh.yy"
526    { driver.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); }
527    break;
528
529  case 18:
530
531/* Line 690 of lalr1.cc  */
532#line 103 "mesh.yy"
533    { driver.m_mesh.RotateX((yysemantic_stack_[(2) - (2)].args).f0); }
534    break;
535
536  case 19:
537
538/* Line 690 of lalr1.cc  */
539#line 104 "mesh.yy"
540    { driver.m_mesh.RotateY((yysemantic_stack_[(2) - (2)].args).f0); }
541    break;
542
543  case 20:
544
545/* Line 690 of lalr1.cc  */
546#line 105 "mesh.yy"
547    { driver.m_mesh.RotateZ((yysemantic_stack_[(2) - (2)].args).f0); }
548    break;
549
550  case 21:
551
552/* Line 690 of lalr1.cc  */
553#line 106 "mesh.yy"
554    { driver.m_mesh.TaperX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
555    break;
556
557  case 22:
558
559/* Line 690 of lalr1.cc  */
560#line 107 "mesh.yy"
561    { driver.m_mesh.TaperY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
562    break;
563
564  case 23:
565
566/* Line 690 of lalr1.cc  */
567#line 108 "mesh.yy"
568    { driver.m_mesh.TaperZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
569    break;
570
571  case 24:
572
573/* Line 690 of lalr1.cc  */
574#line 109 "mesh.yy"
575    { driver.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); }
576    break;
577
578  case 25:
579
580/* Line 690 of lalr1.cc  */
581#line 110 "mesh.yy"
582    { driver.m_mesh.Scale(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); }
583    break;
584
585  case 26:
586
587/* Line 690 of lalr1.cc  */
588#line 111 "mesh.yy"
589    { driver.m_mesh.Scale(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); }
590    break;
591
592  case 27:
593
594/* Line 690 of lalr1.cc  */
595#line 112 "mesh.yy"
596    { driver.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); }
597    break;
598
599  case 28:
600
601/* Line 690 of lalr1.cc  */
602#line 113 "mesh.yy"
603    { driver.m_mesh.MirrorX(); }
604    break;
605
606  case 29:
607
608/* Line 690 of lalr1.cc  */
609#line 114 "mesh.yy"
610    { driver.m_mesh.MirrorY(); }
611    break;
612
613  case 30:
614
615/* Line 690 of lalr1.cc  */
616#line 115 "mesh.yy"
617    { driver.m_mesh.MirrorZ(); }
618    break;
619
620  case 31:
621
622/* Line 690 of lalr1.cc  */
623#line 119 "mesh.yy"
624    { driver.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
625                                                 (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3,
626                                                 (int)(yysemantic_stack_[(2) - (2)].args).f4, (int)(yysemantic_stack_[(2) - (2)].args).f5); }
627    break;
628
629  case 32:
630
631/* Line 690 of lalr1.cc  */
632#line 122 "mesh.yy"
633    { driver.m_mesh.AppendBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); }
634    break;
635
636  case 33:
637
638/* Line 690 of lalr1.cc  */
639#line 123 "mesh.yy"
640    { driver.m_mesh.AppendSmoothChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
641                                                            (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); }
642    break;
643
644  case 34:
645
646/* Line 690 of lalr1.cc  */
647#line 125 "mesh.yy"
648    { driver.m_mesh.AppendFlatChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
649                                                          (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); }
650    break;
651
652  case 35:
653
654/* Line 690 of lalr1.cc  */
655#line 127 "mesh.yy"
656    { driver.m_mesh.AppendSphere((yysemantic_stack_[(2) - (2)].args).f0,
657                                               vec3((yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3)); }
658    break;
659
660  case 36:
661
662/* Line 690 of lalr1.cc  */
663#line 129 "mesh.yy"
664    { driver.m_mesh.AppendStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2,
665                                             (int)(yysemantic_stack_[(2) - (2)].args).f3, (int)(yysemantic_stack_[(2) - (2)].args).f4); }
666    break;
667
668  case 37:
669
670/* Line 690 of lalr1.cc  */
671#line 131 "mesh.yy"
672    { driver.m_mesh.AppendExpandedStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
673                                                     (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); }
674    break;
675
676  case 38:
677
678/* Line 690 of lalr1.cc  */
679#line 133 "mesh.yy"
680    { driver.m_mesh.AppendDisc((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (int)(yysemantic_stack_[(2) - (2)].args).f2); }
681    break;
682
683  case 39:
684
685/* Line 690 of lalr1.cc  */
686#line 134 "mesh.yy"
687    { driver.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); }
688    break;
689
690  case 40:
691
692/* Line 690 of lalr1.cc  */
693#line 135 "mesh.yy"
694    { driver.m_mesh.AppendSimpleQuad((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); }
695    break;
696
697  case 41:
698
699/* Line 690 of lalr1.cc  */
700#line 136 "mesh.yy"
701    { driver.m_mesh.AppendCog((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3,
702                                            (yysemantic_stack_[(2) - (2)].args).f4, (yysemantic_stack_[(2) - (2)].args).f5, (yysemantic_stack_[(2) - (2)].args).f6, (int)(yysemantic_stack_[(2) - (2)].args).f7); }
703    break;
704
705  case 42:
706
707/* Line 690 of lalr1.cc  */
708#line 140 "mesh.yy"
709    { (yyval.args).f0 = (yysemantic_stack_[(1) - (1)].fval); }
710    break;
711
712  case 43:
713
714/* Line 690 of lalr1.cc  */
715#line 141 "mesh.yy"
716    { (yyval.args) = (yysemantic_stack_[(3) - (1)].args); (yyval.args).f1 = (yysemantic_stack_[(3) - (3)].fval); }
717    break;
718
719  case 44:
720
721/* Line 690 of lalr1.cc  */
722#line 142 "mesh.yy"
723    { (yyval.args) = (yysemantic_stack_[(3) - (1)].args); (yyval.args).f2 = (yysemantic_stack_[(3) - (3)].fval); }
724    break;
725
726  case 45:
727
728/* Line 690 of lalr1.cc  */
729#line 143 "mesh.yy"
730    { (yyval.args) = (yysemantic_stack_[(3) - (1)].args); (yyval.args).f3 = (yysemantic_stack_[(3) - (3)].fval); }
731    break;
732
733  case 46:
734
735/* Line 690 of lalr1.cc  */
736#line 144 "mesh.yy"
737    { (yyval.args) = (yysemantic_stack_[(3) - (1)].args); (yyval.args).f4 = (yysemantic_stack_[(3) - (3)].fval); }
738    break;
739
740  case 47:
741
742/* Line 690 of lalr1.cc  */
743#line 145 "mesh.yy"
744    { (yyval.args) = (yysemantic_stack_[(3) - (1)].args); (yyval.args).f5 = (yysemantic_stack_[(3) - (3)].fval); }
745    break;
746
747  case 48:
748
749/* Line 690 of lalr1.cc  */
750#line 146 "mesh.yy"
751    { (yyval.args) = (yysemantic_stack_[(3) - (1)].args); (yyval.args).f6 = (yysemantic_stack_[(3) - (3)].fval); }
752    break;
753
754  case 49:
755
756/* Line 690 of lalr1.cc  */
757#line 147 "mesh.yy"
758    { (yyval.args) = (yysemantic_stack_[(3) - (1)].args); (yyval.args).f7 = (yysemantic_stack_[(3) - (3)].fval); }
759    break;
760
761  case 50:
762
763/* Line 690 of lalr1.cc  */
764#line 150 "mesh.yy"
765    { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); }
766    break;
767
768  case 51:
769
770/* Line 690 of lalr1.cc  */
771#line 151 "mesh.yy"
772    { (yyval.fval) = -(yysemantic_stack_[(2) - (2)].fval); }
773    break;
774
775
776
777/* Line 690 of lalr1.cc  */
778#line 779 "generated/mesh-parser.cpp"
779        default:
780          break;
781      }
782    /* User semantic actions sometimes alter yychar, and that requires
783       that yytoken be updated with the new translation.  We take the
784       approach of translating immediately before every use of yytoken.
785       One alternative is translating here after every semantic action,
786       but that translation would be missed if the semantic action
787       invokes YYABORT, YYACCEPT, or YYERROR immediately after altering
788       yychar.  In the case of YYABORT or YYACCEPT, an incorrect
789       destructor might then be invoked immediately.  In the case of
790       YYERROR, subsequent parser actions might lead to an incorrect
791       destructor call or verbose syntax error message before the
792       lookahead is translated.  */
793    YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc);
794
795    yypop_ (yylen);
796    yylen = 0;
797    YY_STACK_PRINT ();
798
799    yysemantic_stack_.push (yyval);
800    yylocation_stack_.push (yyloc);
801
802    /* Shift the result of the reduction.  */
803    yyn = yyr1_[yyn];
804    yystate = yypgoto_[yyn - yyntokens_] + yystate_stack_[0];
805    if (0 <= yystate && yystate <= yylast_
806        && yycheck_[yystate] == yystate_stack_[0])
807      yystate = yytable_[yystate];
808    else
809      yystate = yydefgoto_[yyn - yyntokens_];
810    goto yynewstate;
811
812  /*------------------------------------.
813  | yyerrlab -- here on detecting error |
814  `------------------------------------*/
815  yyerrlab:
816    /* Make sure we have latest lookahead translation.  See comments at
817       user semantic actions for why this is necessary.  */
818    yytoken = yytranslate_ (yychar);
819
820    /* If not already recovering from an error, report this error.  */
821    if (!yyerrstatus_)
822      {
823        ++yynerrs_;
824        if (yychar == yyempty_)
825          yytoken = yyempty_;
826        error (yylloc, yysyntax_error_ (yystate, yytoken));
827      }
828
829    yyerror_range[1] = yylloc;
830    if (yyerrstatus_ == 3)
831      {
832        /* If just tried and failed to reuse lookahead token after an
833         error, discard it.  */
834
835        if (yychar <= yyeof_)
836          {
837          /* Return failure if at end of input.  */
838          if (yychar == yyeof_)
839            YYABORT;
840          }
841        else
842          {
843            yydestruct_ ("Error: discarding", yytoken, &yylval, &yylloc);
844            yychar = yyempty_;
845          }
846      }
847
848    /* Else will try to reuse lookahead token after shifting the error
849       token.  */
850    goto yyerrlab1;
851
852
853  /*---------------------------------------------------.
854  | yyerrorlab -- error raised explicitly by YYERROR.  |
855  `---------------------------------------------------*/
856  yyerrorlab:
857
858    /* Pacify compilers like GCC when the user code never invokes
859       YYERROR and the label yyerrorlab therefore never appears in user
860       code.  */
861    if (false)
862      goto yyerrorlab;
863
864    yyerror_range[1] = yylocation_stack_[yylen - 1];
865    /* Do not reclaim the symbols of the rule which action triggered
866       this YYERROR.  */
867    yypop_ (yylen);
868    yylen = 0;
869    yystate = yystate_stack_[0];
870    goto yyerrlab1;
871
872  /*-------------------------------------------------------------.
873  | yyerrlab1 -- common code for both syntax error and YYERROR.  |
874  `-------------------------------------------------------------*/
875  yyerrlab1:
876    yyerrstatus_ = 3;   /* Each real token shifted decrements this.  */
877
878    for (;;)
879      {
880        yyn = yypact_[yystate];
881        if (!yy_pact_value_is_default_ (yyn))
882        {
883          yyn += yyterror_;
884          if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
885            {
886              yyn = yytable_[yyn];
887              if (0 < yyn)
888                break;
889            }
890        }
891
892        /* Pop the current state because it cannot handle the error token.  */
893        if (yystate_stack_.height () == 1)
894        YYABORT;
895
896        yyerror_range[1] = yylocation_stack_[0];
897        yydestruct_ ("Error: popping",
898                     yystos_[yystate],
899                     &yysemantic_stack_[0], &yylocation_stack_[0]);
900        yypop_ ();
901        yystate = yystate_stack_[0];
902        YY_STACK_PRINT ();
903      }
904
905    yyerror_range[2] = yylloc;
906    // Using YYLLOC is tempting, but would change the location of
907    // the lookahead.  YYLOC is available though.
908    YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
909    yysemantic_stack_.push (yylval);
910    yylocation_stack_.push (yyloc);
911
912    /* Shift the error token.  */
913    YY_SYMBOL_PRINT ("Shifting", yystos_[yyn],
914                     &yysemantic_stack_[0], &yylocation_stack_[0]);
915
916    yystate = yyn;
917    goto yynewstate;
918
919    /* Accept.  */
920  yyacceptlab:
921    yyresult = 0;
922    goto yyreturn;
923
924    /* Abort.  */
925  yyabortlab:
926    yyresult = 1;
927    goto yyreturn;
928
929  yyreturn:
930    if (yychar != yyempty_)
931      {
932        /* Make sure we have latest lookahead translation.  See comments
933           at user semantic actions for why this is necessary.  */
934        yytoken = yytranslate_ (yychar);
935        yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval,
936                     &yylloc);
937      }
938
939    /* Do not reclaim the symbols of the rule which action triggered
940       this YYABORT or YYACCEPT.  */
941    yypop_ (yylen);
942    while (yystate_stack_.height () != 1)
943      {
944        yydestruct_ ("Cleanup: popping",
945                   yystos_[yystate_stack_[0]],
946                   &yysemantic_stack_[0],
947                   &yylocation_stack_[0]);
948        yypop_ ();
949      }
950
951    return yyresult;
952  }
953
954  // Generate an error message.
955  std::string
956  MeshParser::yysyntax_error_ (int yystate, int yytoken)
957  {
958    std::string yyres;
959    // Number of reported tokens (one for the "unexpected", one per
960    // "expected").
961    size_t yycount = 0;
962    // Its maximum.
963    enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
964    // Arguments of yyformat.
965    char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
966
967    /* There are many possibilities here to consider:
968       - If this state is a consistent state with a default action, then
969         the only way this function was invoked is if the default action
970         is an error action.  In that case, don't check for expected
971         tokens because there are none.
972       - The only way there can be no lookahead present (in yytoken) is
973         if this state is a consistent state with a default action.
974         Thus, detecting the absence of a lookahead is sufficient to
975         determine that there is no unexpected or expected token to
976         report.  In that case, just report a simple "syntax error".
977       - Don't assume there isn't a lookahead just because this state is
978         a consistent state with a default action.  There might have
979         been a previous inconsistent state, consistent state with a
980         non-default action, or user semantic action that manipulated
981         yychar.
982       - Of course, the expected token list depends on states to have
983         correct lookahead information, and it depends on the parser not
984         to perform extra reductions after fetching a lookahead from the
985         scanner and before detecting a syntax error.  Thus, state
986         merging (from LALR or IELR) and default reductions corrupt the
987         expected token list.  However, the list is correct for
988         canonical LR with one exception: it will still contain any
989         token that will not be accepted due to an error action in a
990         later state.
991    */
992    if (yytoken != yyempty_)
993      {
994        yyarg[yycount++] = yytname_[yytoken];
995        int yyn = yypact_[yystate];
996        if (!yy_pact_value_is_default_ (yyn))
997          {
998            /* Start YYX at -YYN if negative to avoid negative indexes in
999               YYCHECK.  In other words, skip the first -YYN actions for
1000               this state because they are default actions.  */
1001            int yyxbegin = yyn < 0 ? -yyn : 0;
1002            /* Stay within bounds of both yycheck and yytname.  */
1003            int yychecklim = yylast_ - yyn + 1;
1004            int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
1005            for (int yyx = yyxbegin; yyx < yyxend; ++yyx)
1006              if (yycheck_[yyx + yyn] == yyx && yyx != yyterror_
1007                  && !yy_table_value_is_error_ (yytable_[yyx + yyn]))
1008                {
1009                  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1010                    {
1011                      yycount = 1;
1012                      break;
1013                    }
1014                  else
1015                    yyarg[yycount++] = yytname_[yyx];
1016                }
1017          }
1018      }
1019
1020    char const* yyformat = 0;
1021    switch (yycount)
1022      {
1023#define YYCASE_(N, S)                         \
1024        case N:                               \
1025          yyformat = S;                       \
1026        break
1027        YYCASE_(0, YY_("syntax error"));
1028        YYCASE_(1, YY_("syntax error, unexpected %s"));
1029        YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1030        YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1031        YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1032        YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1033#undef YYCASE_
1034      }
1035
1036    // Argument number.
1037    size_t yyi = 0;
1038    for (char const* yyp = yyformat; *yyp; ++yyp)
1039      if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount)
1040        {
1041          yyres += yytnamerr_ (yyarg[yyi++]);
1042          ++yyp;
1043        }
1044      else
1045        yyres += *yyp;
1046    return yyres;
1047  }
1048
1049
1050  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1051     STATE-NUM.  */
1052  const signed char MeshParser::yypact_ninf_ = -43;
1053  const signed char
1054  MeshParser::yypact_[] =
1055  {
1056        -1,   -43,   -43,   -43,    12,    12,    12,    12,    12,    12,
1057     -43,    12,    12,    12,    12,   -43,    12,    12,    12,    12,
1058     -43,    12,    12,    12,    12,    12,    12,    12,    12,    12,
1059      12,    12,    12,    12,    37,     1,   -43,   -43,   -43,   -43,
1060     -43,   -43,    12,     2,    10,    16,   -43,   -43,   -43,   -43,
1061     -43,   -43,   -43,   -43,   -43,   -43,   -43,   -43,   -43,   -43,
1062     -43,   -43,   -43,    18,    24,   -43,   -43,   -43,   -43,   -43,
1063     -43,   -43,   -43,   -43,   -43,    27,    29,   -43,   -43,   -43,
1064      -1,   -43,    12,    12,    12,    12,    12,    12,    12,   -43,
1065     -43,   -43,   -43,   -43,   -43,   -43,   -43
1066  };
1067
1068  /* YYDEFACT[S] -- default reduction number in state S.  Performed when
1069     YYTABLE doesn't specify something else to do.  Zero means the
1070     default is an error.  */
1071  const unsigned char
1072  MeshParser::yydefact_[] =
1073  {
1074         0,     9,    10,    11,     0,     0,     0,     0,     0,     0,
1075      28,     0,     0,     0,     0,    29,     0,     0,     0,     0,
1076      30,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1077       0,     0,     0,     0,     0,     0,     3,     5,     6,     7,
1078       8,    50,     0,     0,     0,     0,    12,    42,    13,    14,
1079      18,    21,    24,    15,    19,    22,    25,    16,    20,    23,
1080      26,    17,    27,     0,     0,    31,    32,    33,    34,    35,
1081      36,    37,    38,    39,    40,     0,     0,    41,     1,     2,
1082       0,    51,     0,     0,     0,     0,     0,     0,     0,     4,
1083      43,    44,    45,    46,    47,    48,    49
1084  };
1085
1086  /* YYPGOTO[NTERM-NUM].  */
1087  const signed char
1088  MeshParser::yypgoto_[] =
1089  {
1090       -43,   -43,   -43,   -11,   -43,   -43,   -43,   -43,    61,    20,
1091      41,    31,    46,    43,   -43,   -43,   -42
1092  };
1093
1094  /* YYDEFGOTO[NTERM-NUM].  */
1095  const signed char
1096  MeshParser::yydefgoto_[] =
1097  {
1098        -1,    34,    35,    36,    37,    38,    39,    40,    43,    44,
1099      45,    63,    64,    65,    76,    77,    47
1100  };
1101
1102  /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
1103     positive, shift that token.  If negative, reduce the rule which
1104     number is the opposite.  If YYTABLE_NINF_, syntax error.  */
1105  const signed char MeshParser::yytable_ninf_ = -1;
1106  const unsigned char
1107  MeshParser::yytable_[] =
1108  {
1109        81,    79,     1,     2,     3,     4,     5,     6,     7,     8,
1110       9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
1111      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
1112      29,    30,    31,    32,    33,    46,    48,    78,    80,    82,
1113      90,    91,    92,    93,    94,    95,    96,    83,    41,    51,
1114      42,    73,    74,    84,    55,    85,    67,    68,    69,    59,
1115      71,    86,    61,    62,    87,    66,    88,    49,    50,    89,
1116      52,    72,    53,    54,    70,    56,    75,    57,    58,     0,
1117      60
1118  };
1119
1120  /* YYCHECK.  */
1121  const signed char
1122  MeshParser::yycheck_[] =
1123  {
1124        42,     0,     3,     4,     5,     6,     7,     8,     9,    10,
1125      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
1126      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
1127      31,    32,    33,    34,    35,     4,     5,     0,    37,    37,
1128      82,    83,    84,    85,    86,    87,    88,    37,    36,     8,
1129      38,    31,    32,    37,    13,    37,    25,    26,    27,    18,
1130      29,    37,    21,    22,    37,    24,    37,     6,     7,    80,
1131       9,    30,    11,    12,    28,    14,    33,    16,    17,    -1,
1132      19
1133  };
1134
1135  /* STOS_[STATE-NUM] -- The (internal number of the) accessing
1136     symbol of state STATE-NUM.  */
1137  const unsigned char
1138  MeshParser::yystos_[] =
1139  {
1140         0,     3,     4,     5,     6,     7,     8,     9,    10,    11,
1141      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
1142      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
1143      32,    33,    34,    35,    40,    41,    42,    43,    44,    45,
1144      46,    36,    38,    47,    48,    49,    50,    55,    50,    47,
1145      47,    49,    47,    47,    47,    49,    47,    47,    47,    49,
1146      47,    49,    49,    50,    51,    52,    49,    50,    50,    50,
1147      51,    50,    49,    48,    48,    52,    53,    54,     0,     0,
1148      37,    55,    37,    37,    37,    37,    37,    37,    37,    42,
1149      55,    55,    55,    55,    55,    55,    55
1150  };
1151
1152#if YYDEBUG
1153  /* TOKEN_NUMBER_[YYLEX-NUM] -- Internal symbol number corresponding
1154     to YYLEX-NUM.  */
1155  const unsigned short int
1156  MeshParser::yytoken_number_[] =
1157  {
1158         0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
1159     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
1160     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
1161     285,   286,   287,   288,   289,   290,   291,    44,    45
1162  };
1163#endif
1164
1165  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
1166  const unsigned char
1167  MeshParser::yyr1_[] =
1168  {
1169         0,    39,    40,    41,    41,    42,    42,    42,    42,    43,
1170      43,    43,    44,    44,    45,    45,    45,    45,    45,    45,
1171      45,    45,    45,    45,    45,    45,    45,    45,    45,    45,
1172      45,    46,    46,    46,    46,    46,    46,    46,    46,    46,
1173      46,    46,    47,    48,    49,    50,    51,    52,    53,    54,
1174      55,    55
1175  };
1176
1177  /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
1178  const unsigned char
1179  MeshParser::yyr2_[] =
1180  {
1181         0,     2,     2,     1,     3,     1,     1,     1,     1,     1,
1182       1,     1,     2,     2,     2,     2,     2,     2,     2,     2,
1183       2,     2,     2,     2,     2,     2,     2,     2,     1,     1,
1184       1,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1185       2,     2,     1,     3,     3,     3,     3,     3,     3,     3,
1186       1,     2
1187  };
1188
1189#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1190  /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1191     First, the terminals, then, starting at \a yyntokens_, nonterminals.  */
1192  const char*
1193  const MeshParser::yytname_[] =
1194  {
1195    "T_END", "error", "$undefined", "T_FLUSH", "T_INITRB", "T_FREERB",
1196  "T_COLOR", "T_BGCOLOR", "T_TRANSLATEX", "T_ROTATEX", "T_TAPERX",
1197  "T_SCALEX", "T_MIRRORX", "T_TRANSLATEY", "T_ROTATEY", "T_TAPERY",
1198  "T_SCALEY", "T_MIRRORY", "T_TRANSLATEZ", "T_ROTATEZ", "T_TAPERZ",
1199  "T_SCALEZ", "T_MIRRORZ", "T_TRANSLATE", "T_SCALE", "T_CYLINDER", "T_BOX",
1200  "T_SMOOTHCHAMFBOX", "T_FLATCHAMFBOX", "T_SPHERE", "T_STAR",
1201  "T_EXPANDEDSTAR", "T_DISC", "T_TRIANGLE", "T_QUAD", "T_COG", "NUMBER",
1202  "','", "'-'", "$accept", "mesh_description", "mesh_command_list",
1203  "mesh_command", "rb_command", "color_command", "transform_command",
1204  "primitive_command", "args1", "args2", "args3", "args4", "args5",
1205  "args6", "args7", "args8", "number", 0
1206  };
1207#endif
1208
1209#if YYDEBUG
1210  /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
1211  const MeshParser::rhs_number_type
1212  MeshParser::yyrhs_[] =
1213  {
1214        40,     0,    -1,    41,     0,    -1,    42,    -1,    41,    37,
1215      42,    -1,    43,    -1,    44,    -1,    45,    -1,    46,    -1,
1216       3,    -1,     4,    -1,     5,    -1,     6,    50,    -1,     7,
1217      50,    -1,     8,    47,    -1,    13,    47,    -1,    18,    47,
1218      -1,    23,    49,    -1,     9,    47,    -1,    14,    47,    -1,
1219      19,    47,    -1,    10,    49,    -1,    15,    49,    -1,    20,
1220      49,    -1,    11,    47,    -1,    16,    47,    -1,    21,    47,
1221      -1,    24,    49,    -1,    12,    -1,    17,    -1,    22,    -1,
1222      25,    52,    -1,    26,    49,    -1,    27,    50,    -1,    28,
1223      50,    -1,    29,    50,    -1,    30,    51,    -1,    31,    50,
1224      -1,    32,    49,    -1,    33,    48,    -1,    34,    48,    -1,
1225      35,    54,    -1,    55,    -1,    47,    37,    55,    -1,    48,
1226      37,    55,    -1,    49,    37,    55,    -1,    50,    37,    55,
1227      -1,    51,    37,    55,    -1,    52,    37,    55,    -1,    53,
1228      37,    55,    -1,    36,    -1,    38,    55,    -1
1229  };
1230
1231  /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1232     YYRHS.  */
1233  const unsigned char
1234  MeshParser::yyprhs_[] =
1235  {
1236         0,     0,     3,     6,     8,    12,    14,    16,    18,    20,
1237      22,    24,    26,    29,    32,    35,    38,    41,    44,    47,
1238      50,    53,    56,    59,    62,    65,    68,    71,    74,    76,
1239      78,    80,    83,    86,    89,    92,    95,    98,   101,   104,
1240     107,   110,   113,   115,   119,   123,   127,   131,   135,   139,
1241     143,   145
1242  };
1243
1244  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
1245  const unsigned char
1246  MeshParser::yyrline_[] =
1247  {
1248         0,    72,    72,    76,    77,    81,    82,    83,    84,    88,
1249      89,    90,    94,    95,    99,   100,   101,   102,   103,   104,
1250     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
1251     115,   119,   122,   123,   125,   127,   129,   131,   133,   134,
1252     135,   136,   140,   141,   142,   143,   144,   145,   146,   147,
1253     150,   151
1254  };
1255
1256  // Print the state stack on the debug stream.
1257  void
1258  MeshParser::yystack_print_ ()
1259  {
1260    *yycdebug_ << "Stack now";
1261    for (state_stack_type::const_iterator i = yystate_stack_.begin ();
1262         i != yystate_stack_.end (); ++i)
1263      *yycdebug_ << ' ' << *i;
1264    *yycdebug_ << std::endl;
1265  }
1266
1267  // Report on the debug stream that the rule \a yyrule is going to be reduced.
1268  void
1269  MeshParser::yy_reduce_print_ (int yyrule)
1270  {
1271    unsigned int yylno = yyrline_[yyrule];
1272    int yynrhs = yyr2_[yyrule];
1273    /* Print the symbols being reduced, and their result.  */
1274    *yycdebug_ << "Reducing stack by rule " << yyrule - 1
1275               << " (line " << yylno << "):" << std::endl;
1276    /* The symbols being reduced.  */
1277    for (int yyi = 0; yyi < yynrhs; yyi++)
1278      YY_SYMBOL_PRINT ("   $" << yyi + 1 << " =",
1279                       yyrhs_[yyprhs_[yyrule] + yyi],
1280                       &(yysemantic_stack_[(yynrhs) - (yyi + 1)]),
1281                       &(yylocation_stack_[(yynrhs) - (yyi + 1)]));
1282  }
1283#endif // YYDEBUG
1284
1285  /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
1286  MeshParser::token_number_type
1287  MeshParser::yytranslate_ (int t)
1288  {
1289    static
1290    const token_number_type
1291    translate_table[] =
1292    {
1293           0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1294       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1295       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1296       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1297       2,     2,     2,     2,    37,    38,     2,     2,     2,     2,
1298       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1299       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1300       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1301       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1302       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1303       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1304       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1305       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1306       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1307       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1308       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1309       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1310       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1311       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1312       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1313       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1314       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1315       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1316       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1317       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1318       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
1319       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
1320      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
1321      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
1322      35,    36
1323    };
1324    if ((unsigned int) t <= yyuser_token_number_max_)
1325      return translate_table[t];
1326    else
1327      return yyundef_token_;
1328  }
1329
1330  const int MeshParser::yyeof_ = 0;
1331  const int MeshParser::yylast_ = 80;
1332  const int MeshParser::yynnts_ = 17;
1333  const int MeshParser::yyempty_ = -2;
1334  const int MeshParser::yyfinal_ = 78;
1335  const int MeshParser::yyterror_ = 1;
1336  const int MeshParser::yyerrcode_ = 256;
1337  const int MeshParser::yyntokens_ = 39;
1338
1339  const unsigned int MeshParser::yyuser_token_number_max_ = 291;
1340  const MeshParser::token_number_type MeshParser::yyundef_token_ = 2;
1341
1342
1343} // orbital
1344
1345/* Line 1136 of lalr1.cc  */
1346#line 1347 "generated/mesh-parser.cpp"
1347
1348
1349/* Line 1138 of lalr1.cc  */
1350#line 154 "mesh.yy"
1351
1352
1353void orbital::MeshParser::error(const MeshParser::location_type& l,
1354                                const std::string& m)
1355{
1356    driver.Error(l, m);
1357}
1358
1359
Note: See TracBrowser for help on using the repository browser.