Ignore:
Timestamp:
Feb 26, 2013, 2:43:45 PM (7 years ago)
Author:
sam
Message:

base: start removing occurrences of NULL on our long journey to nullptr.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/generated/easymesh-parser.cpp

    r2410 r2506  
    1 /* A Bison parser, made by GNU Bison 2.4.2.  */
     1/* A Bison parser, made by GNU Bison 2.5.  */
    22
    33/* Skeleton implementation for Bison LALR(1) parsers in C++
    44   
    5       Copyright (C) 2002-2010 Free Software Foundation, Inc.
     5      Copyright (C) 2002-2011 Free Software Foundation, Inc.
    66   
    77   This program is free software: you can redistribute it and/or modify
     
    3636/* First part of user declarations.  */
    3737
    38 /* Line 310 of lalr1.cc  */
     38/* Line 293 of lalr1.cc  */
    3939#line 1 "easymesh/easymesh-parser.y"
    4040
     
    6262
    6363
    64 /* Line 310 of lalr1.cc  */
     64/* Line 293 of lalr1.cc  */
    6565#line 66 "generated/easymesh-parser.cpp"
    6666
     
    7070/* User implementation prologue.  */
    7171
    72 /* Line 316 of lalr1.cc  */
     72/* Line 299 of lalr1.cc  */
    7373#line 66 "easymesh/easymesh-parser.y"
    7474
     
    7979
    8080
    81 /* Line 316 of lalr1.cc  */
     81/* Line 299 of lalr1.cc  */
    8282#line 83 "generated/easymesh-parser.cpp"
    8383
     
    9494#endif
    9595
     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
    96116/* Suppress unused-variable warnings by "using" E.  */
    97117#define YYUSE(e) ((void) (e))
     
    145165namespace lol {
    146166
    147 /* Line 379 of lalr1.cc  */
    148 #line 149 "generated/easymesh-parser.cpp"
    149 #if YYERROR_VERBOSE
     167/* Line 382 of lalr1.cc  */
     168#line 169 "generated/easymesh-parser.cpp"
    150169
    151170  /* Return YYSTR after stripping away unnecessary quotes and
     
    186205  }
    187206
    188 #endif
    189207
    190208  /// Build a parser object.
     
    287305#endif
    288306
     307  inline bool
     308  EasyMeshParser::yy_pact_value_is_default_ (int yyvalue)
     309  {
     310    return yyvalue == yypact_ninf_;
     311  }
     312
     313  inline bool
     314  EasyMeshParser::yy_table_value_is_error_ (int yyvalue)
     315  {
     316    return yyvalue == yytable_ninf_;
     317  }
     318
    289319  int
    290320  EasyMeshParser::parse ()
     
    308338    location_type yylloc;
    309339    /// The locations where the error started and ended.
    310     location_type yyerror_range[2];
     340    location_type yyerror_range[3];
    311341
    312342    /// $$.
     
    346376    /* Try to take a decision without lookahead.  */
    347377    yyn = yypact_[yystate];
    348     if (yyn == yypact_ninf_)
     378    if (yy_pact_value_is_default_ (yyn))
    349379      goto yydefault;
    350380
     
    379409    if (yyn <= 0)
    380410      {
    381         if (yyn == 0 || yyn == yytable_ninf_)
    382         goto yyerrlab;
     411        if (yy_table_value_is_error_ (yyn))
     412          goto yyerrlab;
    383413        yyn = -yyn;
    384414        goto yyreduce;
     
    436466          case 7:
    437467
    438 /* Line 677 of lalr1.cc  */
     468/* Line 690 of lalr1.cc  */
    439469#line 90 "easymesh/easymesh-parser.y"
    440470    { mc.m_mesh.OpenBrace(); }
     
    443473  case 8:
    444474
    445 /* Line 677 of lalr1.cc  */
     475/* Line 690 of lalr1.cc  */
    446476#line 94 "easymesh/easymesh-parser.y"
    447477    { mc.m_mesh.CloseBrace(); }
     
    450480  case 14:
    451481
    452 /* Line 677 of lalr1.cc  */
     482/* Line 690 of lalr1.cc  */
    453483#line 109 "easymesh/easymesh-parser.y"
    454484    { 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)); }
     
    457487  case 15:
    458488
    459 /* Line 677 of lalr1.cc  */
     489/* Line 690 of lalr1.cc  */
    460490#line 110 "easymesh/easymesh-parser.y"
    461491    { uint32_t x = (yysemantic_stack_[(2) - (2)].u32val);
     
    466496  case 16:
    467497
    468 /* Line 677 of lalr1.cc  */
     498/* Line 690 of lalr1.cc  */
    469499#line 113 "easymesh/easymesh-parser.y"
    470500    { 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)); }
     
    473503  case 17:
    474504
    475 /* Line 677 of lalr1.cc  */
     505/* Line 690 of lalr1.cc  */
    476506#line 114 "easymesh/easymesh-parser.y"
    477507    { uint32_t x = (yysemantic_stack_[(2) - (2)].u32val);
     
    482512  case 18:
    483513
    484 /* Line 677 of lalr1.cc  */
     514/* Line 690 of lalr1.cc  */
    485515#line 120 "easymesh/easymesh-parser.y"
    486516    { mc.m_mesh.Chamfer((yysemantic_stack_[(2) - (2)].args).f0); }
     
    489519  case 19:
    490520
    491 /* Line 677 of lalr1.cc  */
     521/* Line 690 of lalr1.cc  */
    492522#line 121 "easymesh/easymesh-parser.y"
    493523    { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); }
     
    496526  case 20:
    497527
    498 /* Line 677 of lalr1.cc  */
     528/* Line 690 of lalr1.cc  */
    499529#line 122 "easymesh/easymesh-parser.y"
    500530    { mc.m_mesh.Translate(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); }
     
    503533  case 21:
    504534
    505 /* Line 677 of lalr1.cc  */
     535/* Line 690 of lalr1.cc  */
    506536#line 123 "easymesh/easymesh-parser.y"
    507537    { mc.m_mesh.Translate(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); }
     
    510540  case 22:
    511541
    512 /* Line 677 of lalr1.cc  */
     542/* Line 690 of lalr1.cc  */
    513543#line 124 "easymesh/easymesh-parser.y"
    514544    { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); }
     
    517547  case 23:
    518548
    519 /* Line 677 of lalr1.cc  */
     549/* Line 690 of lalr1.cc  */
    520550#line 125 "easymesh/easymesh-parser.y"
    521551    { mc.m_mesh.RotateX((yysemantic_stack_[(2) - (2)].args).f0); }
     
    524554  case 24:
    525555
    526 /* Line 677 of lalr1.cc  */
     556/* Line 690 of lalr1.cc  */
    527557#line 126 "easymesh/easymesh-parser.y"
    528558    { mc.m_mesh.RotateY((yysemantic_stack_[(2) - (2)].args).f0); }
     
    531561  case 25:
    532562
    533 /* Line 677 of lalr1.cc  */
     563/* Line 690 of lalr1.cc  */
    534564#line 127 "easymesh/easymesh-parser.y"
    535565    { mc.m_mesh.RotateZ((yysemantic_stack_[(2) - (2)].args).f0); }
     
    538568  case 26:
    539569
    540 /* Line 677 of lalr1.cc  */
     570/* Line 690 of lalr1.cc  */
    541571#line 128 "easymesh/easymesh-parser.y"
    542572    { mc.m_mesh.TaperX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
     
    545575  case 27:
    546576
    547 /* Line 677 of lalr1.cc  */
     577/* Line 690 of lalr1.cc  */
    548578#line 129 "easymesh/easymesh-parser.y"
    549579    { 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); }
     
    552582  case 28:
    553583
    554 /* Line 677 of lalr1.cc  */
     584/* Line 690 of lalr1.cc  */
    555585#line 130 "easymesh/easymesh-parser.y"
    556586    { mc.m_mesh.TaperY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
     
    559589  case 29:
    560590
    561 /* Line 677 of lalr1.cc  */
     591/* Line 690 of lalr1.cc  */
    562592#line 131 "easymesh/easymesh-parser.y"
    563593    { 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); }
     
    566596  case 30:
    567597
    568 /* Line 677 of lalr1.cc  */
     598/* Line 690 of lalr1.cc  */
    569599#line 132 "easymesh/easymesh-parser.y"
    570600    { mc.m_mesh.TaperZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
     
    573603  case 31:
    574604
    575 /* Line 677 of lalr1.cc  */
     605/* Line 690 of lalr1.cc  */
    576606#line 133 "easymesh/easymesh-parser.y"
    577607    { 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); }
     
    580610  case 32:
    581611
    582 /* Line 677 of lalr1.cc  */
     612/* Line 690 of lalr1.cc  */
    583613#line 134 "easymesh/easymesh-parser.y"
    584614    { mc.m_mesh.TwistX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
     
    587617  case 33:
    588618
    589 /* Line 677 of lalr1.cc  */
     619/* Line 690 of lalr1.cc  */
    590620#line 135 "easymesh/easymesh-parser.y"
    591621    { mc.m_mesh.TwistY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
     
    594624  case 34:
    595625
    596 /* Line 677 of lalr1.cc  */
     626/* Line 690 of lalr1.cc  */
    597627#line 136 "easymesh/easymesh-parser.y"
    598628    { mc.m_mesh.TwistZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
     
    601631  case 35:
    602632
    603 /* Line 677 of lalr1.cc  */
     633/* Line 690 of lalr1.cc  */
    604634#line 137 "easymesh/easymesh-parser.y"
    605635    { mc.m_mesh.ShearX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
     
    608638  case 36:
    609639
    610 /* Line 677 of lalr1.cc  */
     640/* Line 690 of lalr1.cc  */
    611641#line 138 "easymesh/easymesh-parser.y"
    612642    { 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); }
     
    615645  case 37:
    616646
    617 /* Line 677 of lalr1.cc  */
     647/* Line 690 of lalr1.cc  */
    618648#line 139 "easymesh/easymesh-parser.y"
    619649    { mc.m_mesh.ShearY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
     
    622652  case 38:
    623653
    624 /* Line 677 of lalr1.cc  */
     654/* Line 690 of lalr1.cc  */
    625655#line 140 "easymesh/easymesh-parser.y"
    626656    { 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); }
     
    629659  case 39:
    630660
    631 /* Line 677 of lalr1.cc  */
     661/* Line 690 of lalr1.cc  */
    632662#line 141 "easymesh/easymesh-parser.y"
    633663    { mc.m_mesh.ShearZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
     
    636666  case 40:
    637667
    638 /* Line 677 of lalr1.cc  */
     668/* Line 690 of lalr1.cc  */
    639669#line 142 "easymesh/easymesh-parser.y"
    640670    { 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); }
     
    643673  case 41:
    644674
    645 /* Line 677 of lalr1.cc  */
     675/* Line 690 of lalr1.cc  */
    646676#line 143 "easymesh/easymesh-parser.y"
    647677    { mc.m_mesh.StretchX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
     
    650680  case 42:
    651681
    652 /* Line 677 of lalr1.cc  */
     682/* Line 690 of lalr1.cc  */
    653683#line 144 "easymesh/easymesh-parser.y"
    654684    { mc.m_mesh.StretchY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
     
    657687  case 43:
    658688
    659 /* Line 677 of lalr1.cc  */
     689/* Line 690 of lalr1.cc  */
    660690#line 145 "easymesh/easymesh-parser.y"
    661691    { mc.m_mesh.StretchZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
     
    664694  case 44:
    665695
    666 /* Line 677 of lalr1.cc  */
     696/* Line 690 of lalr1.cc  */
    667697#line 146 "easymesh/easymesh-parser.y"
    668698    { mc.m_mesh.BendXY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
     
    671701  case 45:
    672702
    673 /* Line 677 of lalr1.cc  */
     703/* Line 690 of lalr1.cc  */
    674704#line 147 "easymesh/easymesh-parser.y"
    675705    { mc.m_mesh.BendXZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
     
    678708  case 46:
    679709
    680 /* Line 677 of lalr1.cc  */
     710/* Line 690 of lalr1.cc  */
    681711#line 148 "easymesh/easymesh-parser.y"
    682712    { mc.m_mesh.BendYX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
     
    685715  case 47:
    686716
    687 /* Line 677 of lalr1.cc  */
     717/* Line 690 of lalr1.cc  */
    688718#line 149 "easymesh/easymesh-parser.y"
    689719    { mc.m_mesh.BendYZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
     
    692722  case 48:
    693723
    694 /* Line 677 of lalr1.cc  */
     724/* Line 690 of lalr1.cc  */
    695725#line 150 "easymesh/easymesh-parser.y"
    696726    { mc.m_mesh.BendZX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
     
    699729  case 49:
    700730
    701 /* Line 677 of lalr1.cc  */
     731/* Line 690 of lalr1.cc  */
    702732#line 151 "easymesh/easymesh-parser.y"
    703733    { mc.m_mesh.BendZY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
     
    706736  case 50:
    707737
    708 /* Line 677 of lalr1.cc  */
     738/* Line 690 of lalr1.cc  */
    709739#line 152 "easymesh/easymesh-parser.y"
    710740    { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, 1.0, 1.0)); }
     
    713743  case 51:
    714744
    715 /* Line 677 of lalr1.cc  */
     745/* Line 690 of lalr1.cc  */
    716746#line 153 "easymesh/easymesh-parser.y"
    717747    { mc.m_mesh.Scale(vec3(1.0, (yysemantic_stack_[(2) - (2)].args).f0, 1.0)); }
     
    720750  case 52:
    721751
    722 /* Line 677 of lalr1.cc  */
     752/* Line 690 of lalr1.cc  */
    723753#line 154 "easymesh/easymesh-parser.y"
    724754    { mc.m_mesh.Scale(vec3(1.0, 1.0, (yysemantic_stack_[(2) - (2)].args).f0)); }
     
    727757  case 53:
    728758
    729 /* Line 677 of lalr1.cc  */
     759/* Line 690 of lalr1.cc  */
    730760#line 155 "easymesh/easymesh-parser.y"
    731761    { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); }
     
    734764  case 54:
    735765
    736 /* Line 677 of lalr1.cc  */
     766/* Line 690 of lalr1.cc  */
    737767#line 156 "easymesh/easymesh-parser.y"
    738768    { mc.m_mesh.MirrorX(); }
     
    741771  case 55:
    742772
    743 /* Line 677 of lalr1.cc  */
     773/* Line 690 of lalr1.cc  */
    744774#line 157 "easymesh/easymesh-parser.y"
    745775    { mc.m_mesh.MirrorY(); }
     
    748778  case 56:
    749779
    750 /* Line 677 of lalr1.cc  */
     780/* Line 690 of lalr1.cc  */
    751781#line 158 "easymesh/easymesh-parser.y"
    752782    { mc.m_mesh.MirrorZ(); }
     
    755785  case 57:
    756786
    757 /* Line 677 of lalr1.cc  */
     787/* Line 690 of lalr1.cc  */
    758788#line 159 "easymesh/easymesh-parser.y"
    759789    { mc.m_mesh.RadialJitter((yysemantic_stack_[(2) - (2)].args).f0); }
     
    762792  case 58:
    763793
    764 /* Line 677 of lalr1.cc  */
     794/* Line 690 of lalr1.cc  */
    765795#line 160 "easymesh/easymesh-parser.y"
    766796    { mc.m_mesh.SplitTriangles((yysemantic_stack_[(2) - (2)].args).f0); }
     
    769799  case 59:
    770800
    771 /* Line 677 of lalr1.cc  */
     801/* Line 690 of lalr1.cc  */
    772802#line 161 "easymesh/easymesh-parser.y"
    773803    { mc.m_mesh.SmoothMesh((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
     
    776806  case 60:
    777807
    778 /* Line 677 of lalr1.cc  */
     808/* Line 690 of lalr1.cc  */
    779809#line 162 "easymesh/easymesh-parser.y"
    780810    { mc.m_mesh.ToggleScaleWinding(); }
     
    783813  case 61:
    784814
    785 /* Line 677 of lalr1.cc  */
     815/* Line 690 of lalr1.cc  */
    786816#line 163 "easymesh/easymesh-parser.y"
    787817    { mc.m_mesh.CsgUnion(); }
     
    790820  case 62:
    791821
    792 /* Line 677 of lalr1.cc  */
     822/* Line 690 of lalr1.cc  */
    793823#line 164 "easymesh/easymesh-parser.y"
    794824    { mc.m_mesh.CsgSubstract(); }
     
    797827  case 63:
    798828
    799 /* Line 677 of lalr1.cc  */
     829/* Line 690 of lalr1.cc  */
    800830#line 165 "easymesh/easymesh-parser.y"
    801831    { mc.m_mesh.CsgSubstractLoss(); }
     
    804834  case 64:
    805835
    806 /* Line 677 of lalr1.cc  */
     836/* Line 690 of lalr1.cc  */
    807837#line 166 "easymesh/easymesh-parser.y"
    808838    { mc.m_mesh.CsgAnd(); }
     
    811841  case 65:
    812842
    813 /* Line 677 of lalr1.cc  */
     843/* Line 690 of lalr1.cc  */
    814844#line 167 "easymesh/easymesh-parser.y"
    815845    { mc.m_mesh.CsgXor(); }
     
    818848  case 66:
    819849
    820 /* Line 677 of lalr1.cc  */
     850/* Line 690 of lalr1.cc  */
    821851#line 171 "easymesh/easymesh-parser.y"
    822852    { mc.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
     
    827857  case 67:
    828858
    829 /* Line 677 of lalr1.cc  */
     859/* Line 690 of lalr1.cc  */
    830860#line 174 "easymesh/easymesh-parser.y"
    831861    { mc.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
     
    836866  case 68:
    837867
    838 /* Line 677 of lalr1.cc  */
     868/* Line 690 of lalr1.cc  */
    839869#line 177 "easymesh/easymesh-parser.y"
    840870    { mc.m_mesh.AppendBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); }
     
    843873  case 69:
    844874
    845 /* Line 677 of lalr1.cc  */
     875/* Line 690 of lalr1.cc  */
    846876#line 178 "easymesh/easymesh-parser.y"
    847877    { mc.m_mesh.AppendSmoothChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
     
    851881  case 70:
    852882
    853 /* Line 677 of lalr1.cc  */
     883/* Line 690 of lalr1.cc  */
    854884#line 180 "easymesh/easymesh-parser.y"
    855885    { mc.m_mesh.AppendFlatChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
     
    859889  case 71:
    860890
    861 /* Line 677 of lalr1.cc  */
     891/* Line 690 of lalr1.cc  */
    862892#line 182 "easymesh/easymesh-parser.y"
    863893    { mc.m_mesh.AppendSphere((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
     
    866896  case 72:
    867897
    868 /* Line 677 of lalr1.cc  */
     898/* Line 690 of lalr1.cc  */
    869899#line 183 "easymesh/easymesh-parser.y"
    870900    { mc.m_mesh.AppendCapsule((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
     
    873903  case 73:
    874904
    875 /* Line 677 of lalr1.cc  */
     905/* Line 690 of lalr1.cc  */
    876906#line 184 "easymesh/easymesh-parser.y"
    877907    { mc.m_mesh.AppendTorus((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
     
    880910  case 74:
    881911
    882 /* Line 677 of lalr1.cc  */
     912/* Line 690 of lalr1.cc  */
    883913#line 185 "easymesh/easymesh-parser.y"
    884914    { mc.m_mesh.AppendStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2,
     
    888918  case 75:
    889919
    890 /* Line 677 of lalr1.cc  */
     920/* Line 690 of lalr1.cc  */
    891921#line 187 "easymesh/easymesh-parser.y"
    892922    { mc.m_mesh.AppendExpandedStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
     
    896926  case 76:
    897927
    898 /* Line 677 of lalr1.cc  */
     928/* Line 690 of lalr1.cc  */
    899929#line 189 "easymesh/easymesh-parser.y"
    900930    { mc.m_mesh.AppendDisc((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (int)(yysemantic_stack_[(2) - (2)].args).f2); }
     
    903933  case 77:
    904934
    905 /* Line 677 of lalr1.cc  */
     935/* Line 690 of lalr1.cc  */
    906936#line 190 "easymesh/easymesh-parser.y"
    907937    { mc.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); }
     
    910940  case 78:
    911941
    912 /* Line 677 of lalr1.cc  */
     942/* Line 690 of lalr1.cc  */
    913943#line 191 "easymesh/easymesh-parser.y"
    914944    { mc.m_mesh.AppendSimpleQuad((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); }
     
    917947  case 79:
    918948
    919 /* Line 677 of lalr1.cc  */
     949/* Line 690 of lalr1.cc  */
    920950#line 192 "easymesh/easymesh-parser.y"
    921951    { mc.m_mesh.AppendCog((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
     
    926956  case 80:
    927957
    928 /* Line 677 of lalr1.cc  */
     958/* Line 690 of lalr1.cc  */
    929959#line 197 "easymesh/easymesh-parser.y"
    930960    { (yyval.args).f0 = (yysemantic_stack_[(1) - (1)].fval); }
     
    933963  case 81:
    934964
    935 /* Line 677 of lalr1.cc  */
     965/* Line 690 of lalr1.cc  */
    936966#line 198 "easymesh/easymesh-parser.y"
    937967    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f1 = (yysemantic_stack_[(2) - (2)].fval); }
     
    940970  case 82:
    941971
    942 /* Line 677 of lalr1.cc  */
     972/* Line 690 of lalr1.cc  */
    943973#line 199 "easymesh/easymesh-parser.y"
    944974    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f2 = (yysemantic_stack_[(2) - (2)].fval); }
     
    947977  case 83:
    948978
    949 /* Line 677 of lalr1.cc  */
     979/* Line 690 of lalr1.cc  */
    950980#line 200 "easymesh/easymesh-parser.y"
    951981    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f3 = (yysemantic_stack_[(2) - (2)].fval); }
     
    954984  case 84:
    955985
    956 /* Line 677 of lalr1.cc  */
     986/* Line 690 of lalr1.cc  */
    957987#line 201 "easymesh/easymesh-parser.y"
    958988    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f4 = (yysemantic_stack_[(2) - (2)].fval); }
     
    961991  case 85:
    962992
    963 /* Line 677 of lalr1.cc  */
     993/* Line 690 of lalr1.cc  */
    964994#line 202 "easymesh/easymesh-parser.y"
    965995    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f5 = (yysemantic_stack_[(2) - (2)].fval); }
     
    968998  case 86:
    969999
    970 /* Line 677 of lalr1.cc  */
     1000/* Line 690 of lalr1.cc  */
    9711001#line 203 "easymesh/easymesh-parser.y"
    9721002    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f6 = (yysemantic_stack_[(2) - (2)].fval); }
     
    9751005  case 87:
    9761006
    977 /* Line 677 of lalr1.cc  */
     1007/* Line 690 of lalr1.cc  */
    9781008#line 204 "easymesh/easymesh-parser.y"
    9791009    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f7 = (yysemantic_stack_[(2) - (2)].fval); }
     
    9821012  case 88:
    9831013
    984 /* Line 677 of lalr1.cc  */
     1014/* Line 690 of lalr1.cc  */
    9851015#line 205 "easymesh/easymesh-parser.y"
    9861016    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f8 = (yysemantic_stack_[(2) - (2)].fval); }
     
    9891019  case 89:
    9901020
    991 /* Line 677 of lalr1.cc  */
     1021/* Line 690 of lalr1.cc  */
    9921022#line 206 "easymesh/easymesh-parser.y"
    9931023    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f9 = (yysemantic_stack_[(2) - (2)].fval); }
     
    9961026  case 90:
    9971027
    998 /* Line 677 of lalr1.cc  */
     1028/* Line 690 of lalr1.cc  */
    9991029#line 209 "easymesh/easymesh-parser.y"
    10001030    { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); }
     
    10031033  case 91:
    10041034
    1005 /* Line 677 of lalr1.cc  */
     1035/* Line 690 of lalr1.cc  */
    10061036#line 210 "easymesh/easymesh-parser.y"
    10071037    { (yyval.fval) = -(yysemantic_stack_[(2) - (2)].fval); }
     
    10101040
    10111041
    1012 /* Line 677 of lalr1.cc  */
    1013 #line 1014 "generated/easymesh-parser.cpp"
     1042/* Line 690 of lalr1.cc  */
     1043#line 1044 "generated/easymesh-parser.cpp"
    10141044        default:
    10151045          break;
    10161046      }
     1047    /* User semantic actions sometimes alter yychar, and that requires
     1048       that yytoken be updated with the new translation.  We take the
     1049       approach of translating immediately before every use of yytoken.
     1050       One alternative is translating here after every semantic action,
     1051       but that translation would be missed if the semantic action
     1052       invokes YYABORT, YYACCEPT, or YYERROR immediately after altering
     1053       yychar.  In the case of YYABORT or YYACCEPT, an incorrect
     1054       destructor might then be invoked immediately.  In the case of
     1055       YYERROR, subsequent parser actions might lead to an incorrect
     1056       destructor call or verbose syntax error message before the
     1057       lookahead is translated.  */
    10171058    YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc);
    10181059
     
    10381079  `------------------------------------*/
    10391080  yyerrlab:
     1081    /* Make sure we have latest lookahead translation.  See comments at
     1082       user semantic actions for why this is necessary.  */
     1083    yytoken = yytranslate_ (yychar);
     1084
    10401085    /* If not already recovering from an error, report this error.  */
    10411086    if (!yyerrstatus_)
    10421087      {
    10431088        ++yynerrs_;
     1089        if (yychar == yyempty_)
     1090          yytoken = yyempty_;
    10441091        error (yylloc, yysyntax_error_ (yystate, yytoken));
    10451092      }
    10461093
    1047     yyerror_range[0] = yylloc;
     1094    yyerror_range[1] = yylloc;
    10481095    if (yyerrstatus_ == 3)
    10491096      {
     
    10801127      goto yyerrorlab;
    10811128
    1082     yyerror_range[0] = yylocation_stack_[yylen - 1];
     1129    yyerror_range[1] = yylocation_stack_[yylen - 1];
    10831130    /* Do not reclaim the symbols of the rule which action triggered
    10841131       this YYERROR.  */
     
    10971144      {
    10981145        yyn = yypact_[yystate];
    1099         if (yyn != yypact_ninf_)
     1146        if (!yy_pact_value_is_default_ (yyn))
    11001147        {
    11011148          yyn += yyterror_;
     
    11121159        YYABORT;
    11131160
    1114         yyerror_range[0] = yylocation_stack_[0];
     1161        yyerror_range[1] = yylocation_stack_[0];
    11151162        yydestruct_ ("Error: popping",
    11161163                     yystos_[yystate],
     
    11211168      }
    11221169
    1123     yyerror_range[1] = yylloc;
     1170    yyerror_range[2] = yylloc;
    11241171    // Using YYLLOC is tempting, but would change the location of
    11251172    // the lookahead.  YYLOC is available though.
    1126     YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
     1173    YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
    11271174    yysemantic_stack_.push (yylval);
    11281175    yylocation_stack_.push (yyloc);
     
    11471194  yyreturn:
    11481195    if (yychar != yyempty_)
    1149       yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc);
     1196      {
     1197        /* Make sure we have latest lookahead translation.  See comments
     1198           at user semantic actions for why this is necessary.  */
     1199        yytoken = yytranslate_ (yychar);
     1200        yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval,
     1201                     &yylloc);
     1202      }
    11501203
    11511204    /* Do not reclaim the symbols of the rule which action triggered
     
    11661219  // Generate an error message.
    11671220  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_)
     1221  EasyMeshParser::yysyntax_error_ (int yystate, int yytoken)
     1222  {
     1223    std::string yyres;
     1224    // Number of reported tokens (one for the "unexpected", one per
     1225    // "expected").
     1226    size_t yycount = 0;
     1227    // Its maximum.
     1228    enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
     1229    // Arguments of yyformat.
     1230    char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
     1231
     1232    /* There are many possibilities here to consider:
     1233       - If this state is a consistent state with a default action, then
     1234         the only way this function was invoked is if the default action
     1235         is an error action.  In that case, don't check for expected
     1236         tokens because there are none.
     1237       - The only way there can be no lookahead present (in yytoken) is
     1238         if this state is a consistent state with a default action.
     1239         Thus, detecting the absence of a lookahead is sufficient to
     1240         determine that there is no unexpected or expected token to
     1241         report.  In that case, just report a simple "syntax error".
     1242       - Don't assume there isn't a lookahead just because this state is
     1243         a consistent state with a default action.  There might have
     1244         been a previous inconsistent state, consistent state with a
     1245         non-default action, or user semantic action that manipulated
     1246         yychar.
     1247       - Of course, the expected token list depends on states to have
     1248         correct lookahead information, and it depends on the parser not
     1249         to perform extra reductions after fetching a lookahead from the
     1250         scanner and before detecting a syntax error.  Thus, state
     1251         merging (from LALR or IELR) and default reductions corrupt the
     1252         expected token list.  However, the list is correct for
     1253         canonical LR with one exception: it will still contain any
     1254         token that will not be accepted due to an error action in a
     1255         later state.
     1256    */
     1257    if (yytoken != yyempty_)
    11751258      {
    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           }
     1259        yyarg[yycount++] = yytname_[yytoken];
     1260        int yyn = yypact_[yystate];
     1261        if (!yy_pact_value_is_default_ (yyn))
     1262          {
     1263            /* Start YYX at -YYN if negative to avoid negative indexes in
     1264               YYCHECK.  In other words, skip the first -YYN actions for
     1265               this state because they are default actions.  */
     1266            int yyxbegin = yyn < 0 ? -yyn : 0;
     1267            /* Stay within bounds of both yycheck and yytname.  */
     1268            int yychecklim = yylast_ - yyn + 1;
     1269            int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
     1270            for (int yyx = yyxbegin; yyx < yyxend; ++yyx)
     1271              if (yycheck_[yyx + yyn] == yyx && yyx != yyterror_
     1272                  && !yy_table_value_is_error_ (yytable_[yyx + yyn]))
     1273                {
     1274                  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
     1275                    {
     1276                      yycount = 1;
     1277                      break;
     1278                    }
     1279                  else
     1280                    yyarg[yycount++] = yytname_[yyx];
     1281                }
     1282          }
    12081283      }
    1209     else
    1210 #endif
    1211       res = YY_("syntax error");
    1212     return res;
     1284
     1285    char const* yyformat = 0;
     1286    switch (yycount)
     1287      {
     1288#define YYCASE_(N, S)                         \
     1289        case N:                               \
     1290          yyformat = S;                       \
     1291        break
     1292        YYCASE_(0, YY_("syntax error"));
     1293        YYCASE_(1, YY_("syntax error, unexpected %s"));
     1294        YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
     1295        YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
     1296        YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
     1297        YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
     1298#undef YYCASE_
     1299      }
     1300
     1301    // Argument number.
     1302    size_t yyi = 0;
     1303    for (char const* yyp = yyformat; *yyp; ++yyp)
     1304      if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount)
     1305        {
     1306          yyres += yytnamerr_ (yyarg[yyi++]);
     1307          ++yyp;
     1308        }
     1309      else
     1310        yyres += *yyp;
     1311    return yyres;
    12131312  }
    12141313
     
    12381337  };
    12391338
    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.  */
     1339  /* YYDEFACT[S] -- default reduction number in state S.  Performed when
     1340     YYTABLE doesn't specify something else to do.  Zero means the
     1341     default is an error.  */
    12431342  const unsigned char
    12441343  EasyMeshParser::yydefact_[] =
     
    12821381  /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    12831382     positive, shift that token.  If negative, reduce the rule which
    1284      number is the opposite.  If zero, do what YYDEFACT says.  */
     1383     number is the opposite.  If YYTABLE_NINF_, syntax error.  */
    12851384  const signed char EasyMeshParser::yytable_ninf_ = -1;
    12861385  const unsigned char
     
    16061705} // lol
    16071706
    1608 /* Line 1053 of lalr1.cc  */
    1609 #line 1610 "generated/easymesh-parser.cpp"
    1610 
    1611 
    1612 /* Line 1055 of lalr1.cc  */
     1707/* Line 1136 of lalr1.cc  */
     1708#line 1709 "generated/easymesh-parser.cpp"
     1709
     1710
     1711/* Line 1138 of lalr1.cc  */
    16131712#line 213 "easymesh/easymesh-parser.y"
    16141713
Note: See TracChangeset for help on using the changeset viewer.