diff --git a/Common/CreateFile.cpp b/Common/CreateFile.cpp
index 89cf2a95ecb55e47fb97ebc56644eb6998e9b13d..83d3a653faed2a9118b76f4206f7500501c1d49f 100644
--- a/Common/CreateFile.cpp
+++ b/Common/CreateFile.cpp
@@ -47,6 +47,7 @@ int GetFileFormatFromExtension(const std::string &ext)
   else if(ext == ".diff") return FORMAT_DIFF;
   else if(ext == ".inp")  return FORMAT_INP;
   else if(ext == ".celum")return FORMAT_CELUM;
+  else if(ext == ".su2")  return FORMAT_SU2;
   else if(ext == ".nas")  return FORMAT_BDF;
   else if(ext == ".p3d")  return FORMAT_P3D;
   else if(ext == ".wrl")  return FORMAT_VRML;
@@ -101,6 +102,7 @@ std::string GetDefaultFileName(int format)
   case FORMAT_DIFF: name += ".diff"; break;
   case FORMAT_INP:  name += ".inp"; break;
   case FORMAT_CELUM:name += ".celum"; break;
+  case FORMAT_SU2:  name += ".su2"; break;
   case FORMAT_P3D:  name += ".p3d"; break;
   case FORMAT_VRML: name += ".wrl"; break;
   case FORMAT_PLY2: name += ".ply2"; break;
@@ -318,6 +320,11 @@ void CreateOutputFile(const std::string &fileName, int format, bool redraw)
       (name, CTX::instance()->mesh.saveAll, CTX::instance()->mesh.scalingFactor);
     break;
 
+  case FORMAT_SU2:
+    GModel::current()->writeSU2
+      (name, CTX::instance()->mesh.saveAll, CTX::instance()->mesh.scalingFactor);
+    break;
+
   case FORMAT_P3D:
     GModel::current()->writeP3D
       (name, CTX::instance()->mesh.saveAll, CTX::instance()->mesh.scalingFactor);
diff --git a/Common/GmshDefines.h b/Common/GmshDefines.h
index 09cf319b196834c5129c9d0f9c0e5dcfa3c770c4..16632e84c2f095ab69f7a19f9da0eaa96105ca35 100644
--- a/Common/GmshDefines.h
+++ b/Common/GmshDefines.h
@@ -48,6 +48,7 @@
 #define FORMAT_INP   39
 #define FORMAT_PLY2  40
 #define FORMAT_CELUM 41
+#define FORMAT_SU2   42
 
 // Element types
 #define TYPE_PNT     1
@@ -243,11 +244,11 @@
 #define MESH_UNSTRUCTURED 2
 
 // QuadTri options (structured/unstructured coupling with pyramids)
-#define NO_QUADTRI               0
-#define QUADTRI_DBL_1            1
-#define QUADTRI_DBL_1_RECOMB     2
-#define QUADTRI_SNGL_1           3
-#define QUADTRI_SNGL_1_RECOMB    4
-#define TRANSFINITE_QUADTRI_1    5
+#define NO_QUADTRI                    0
+#define QUADTRI_ADDVERTS_1            1
+#define QUADTRI_ADDVERTS_1_RECOMB     2
+#define QUADTRI_NOVERTS_1             3
+#define QUADTRI_NOVERTS_1_RECOMB      4
+#define TRANSFINITE_QUADTRI_1         5
 
 #endif
diff --git a/Common/SmoothData.cpp b/Common/SmoothData.cpp
index c81bbc5d7bd13611ff1bb00fe800db255896a7cc..4e004b1b638f6a190d581966743b61871ee13668 100644
--- a/Common/SmoothData.cpp
+++ b/Common/SmoothData.cpp
@@ -17,6 +17,8 @@ xyzv::xyzv(const xyzv &other)
   x = other.x;
   y = other.y;
   z = other.z;
+  scaleValue = other.scaleValue;  // Added by Trevor Strickler 07/10/2013
+  scale_numvals = other.scale_numvals;  // Added by Trevor Strickler 07/10/2013
   nbvals = other.nbvals;
   nboccurences = other.nboccurences;
   if(other.vals && other.nbvals) {
@@ -32,6 +34,8 @@ xyzv &xyzv::operator = (const xyzv &other)
     x = other.x;
     y = other.y;
     z = other.z;
+    scaleValue = other.scaleValue;  // Added by Trevor Strickler 07/10/2013
+    scale_numvals = other.scale_numvals;  // Added by Trevor Strickler 07/10/2013
     nbvals = other.nbvals;
     nboccurences = other.nboccurences;
     if(other.vals && other.nbvals) {
@@ -61,6 +65,21 @@ void xyzv::update(int n, double *v)
   nboccurences++;
 }
 
+// Added by Trevor Strickler
+void xyzv::scale_update(double scale_inp)
+{
+  if( fabs(1.0 - scale_inp) <= eps )
+    scale_inp = 1.0;
+  if( scale_inp != 1.0 || scaleValue != 1.0 ){
+    double x1 = (double)(scale_numvals) / (double)(scale_numvals + 1);
+    double x2 = 1.0 / (double)(scale_numvals + 1);
+    scaleValue = ( x1 * scaleValue + x2 * scale_inp);
+  }
+  if( fabs(1.0 - scaleValue) <= eps )
+    scaleValue = 1.0;
+  scale_numvals++;
+}
+
 void smooth_data::add(double x, double y, double z, int n, double *vals)
 {
   xyzv xyz(x, y, z);
@@ -77,6 +96,23 @@ void smooth_data::add(double x, double y, double z, int n, double *vals)
   }
 }
 
+//added by Trevor Strickler
+void smooth_data::add_scale(double x, double y, double z, double scale_val)
+{
+  xyzv xyz(x, y, z);
+  std::set<xyzv, lessthanxyzv>::const_iterator it = c.find(xyz);
+  if(it == c.end()){
+    xyz.scale_update(scale_val);
+    c.insert(xyz); 
+  }
+  else {
+    // we can do this because we know that it will not destroy the set
+    // ordering
+    xyzv *p = (xyzv *) & (*it);
+    p->scale_update(scale_val);
+  }
+}
+
 bool smooth_data::get(double x, double y, double z, int n, double *vals)
 {
   std::set<xyzv, lessthanxyzv>::const_iterator it = c.find(xyzv(x, y, z));
@@ -87,6 +123,16 @@ bool smooth_data::get(double x, double y, double z, int n, double *vals)
   return true;
 }
 
+//added by Trevor Strickler
+bool smooth_data::get_scale(double x, double y, double z, double *scale_val)
+{
+  std::set<xyzv, lessthanxyzv>::const_iterator it = c.find(xyzv(x, y, z));
+  if(it == c.end())
+    return false;
+  (*scale_val) = it->scaleValue;
+  return true;
+}
+
 void smooth_data::normalize()
 {
   std::set<xyzv, lessthanxyzv>::iterator it = c.begin();
diff --git a/Common/SmoothData.h b/Common/SmoothData.h
index 864f1bd5192352879eb77e00facc66a6458492ff..8e3071964acc084182cdcbd50d2d6f49cd83a574 100644
--- a/Common/SmoothData.h
+++ b/Common/SmoothData.h
@@ -16,15 +16,19 @@ struct xyzv {
   double x, y, z, *vals;
   int nbvals;
   int nboccurences;
+  double scaleValue;  // Added by Trevor Strickler for scaling last element layer in quadtri boundary layer to make better quality interfaces
+  int scale_numvals;
   static double eps;
   xyzv(double xx, double yy, double zz)
-    : x(xx), y(yy), z(zz), vals(0), nbvals(0), nboccurences(0) {}
+    : x(xx), y(yy), z(zz), vals(0), nbvals(0), nboccurences(0), scaleValue(1.0), scale_numvals(0) {}  // Trevor Strickler modified
   ~xyzv(){ if(vals) delete [] vals; }
   // these are needed for set<> operations since the default copy
   // constructor won't allocate *vals
   xyzv(const xyzv & other);
   xyzv & operator = (const xyzv &other);
   void update(int n, double *v);
+  void scale_update(double scale_val);  // Trevor Strickler
+
 };
 
 struct lessthanxyzv {
@@ -54,6 +58,8 @@ class smooth_data{
   smooth_data() {}
   void add(double x, double y, double z, int n, double *vals);
   bool get(double x, double y, double z, int n, double *vals);
+  void add_scale(double x, double y, double z, double scale_val);  // Trevor Strickler
+  bool get_scale(double x, double y, double z, double *scale_val); // Trevor Strickler
   void normalize();
   bool exportview(std::string filename);
 };
diff --git a/Fltk/graphicWindow.cpp b/Fltk/graphicWindow.cpp
index 0defb96aa60caf14e6402df9df1d041e2594f1d8..37ed3c25c916b2a188c80580f516e0602b7ee8f0 100644
--- a/Fltk/graphicWindow.cpp
+++ b/Fltk/graphicWindow.cpp
@@ -272,6 +272,8 @@ static int _save_inp(const char *name){ return unvinpFileDialog
     (name, "Abaqus INP Options", FORMAT_INP); }
 static int _save_celum(const char *name){ return genericMeshFileDialog
     (name, "CELUM Options", FORMAT_CELUM, false, false); }
+static int _save_su2(const char *name){ return genericMeshFileDialog
+    (name, "SU2 Options", FORMAT_SU2, false, false); }
 static int _save_med(const char *name){ return genericMeshFileDialog
     (name, "MED Options", FORMAT_MED, false, false); }
 static int _save_mesh(const char *name){ return genericMeshFileDialog
@@ -335,6 +337,7 @@ static int _save_auto(const char *name)
   case FORMAT_DIFF : return _save_diff(name);
   case FORMAT_INP  : return _save_inp(name);
   case FORMAT_CELUM: return _save_celum(name);
+  case FORMAT_SU2  : return _save_su2(name);
   case FORMAT_P3D  : return _save_p3d(name);
   case FORMAT_IR3  : return _save_ir3(name);
   case FORMAT_STL  : return _save_stl(name);
@@ -392,6 +395,7 @@ static void file_save_as_cb(Fl_Widget *w, void *data)
     {"Mesh - VRML Surface" TT "*.wrl", _save_vrml},
     {"Mesh - VTK" TT "*.vtk", _save_vtk},
     {"Mesh - PLY2 Surface" TT "*.ply2", _save_ply2},
+    {"Mesh - SU2" TT "*.su2", _save_su2},
     {"Post-processing - Gmsh POS" TT "*.pos", _save_view_pos},
 #if defined(HAVE_MED)
     {"Post-processing - MED" TT "*.rmed", _save_view_med},
diff --git a/Geo/CMakeLists.txt b/Geo/CMakeLists.txt
index c9cea87f405625c90835efcaea180464265087a3..4f8685ff42167732df7a0a5118931e7b7611ad52 100644
--- a/Geo/CMakeLists.txt
+++ b/Geo/CMakeLists.txt
@@ -27,7 +27,7 @@ set(SRC
       GModelIO_PLY.cpp GModelIO_VRML.cpp GModelIO_UNV.cpp GModelIO_BDF.cpp 
       GModelIO_IR3.cpp GModelIO_DIFF.cpp GModelIO_GEOM.cpp GModelIO_INP.cpp
       GModelIO_MAIL.cpp GModelIO_P3D.cpp GModelIO_SGEOM.cpp GModelIO_CELUM.cpp
-      GModelIO_ACTRAN.cpp
+      GModelIO_ACTRAN.cpp GModelIO_SU2.cpp
   ExtrudeParams.cpp
   Geo.cpp
   GeoStringInterface.cpp GeoInterpolation.cpp
diff --git a/Geo/ExtrudeParams.cpp b/Geo/ExtrudeParams.cpp
index deb9899b04c6911611604fb5b910112bd4aa15bc..6c4510a79da9a020b638c25b675ac2808cc76dcf 100644
--- a/Geo/ExtrudeParams.cpp
+++ b/Geo/ExtrudeParams.cpp
@@ -10,6 +10,14 @@
 smooth_data* ExtrudeParams::normals[2] = {0, 0};
 std::vector<SPoint3> ExtrudeParams::normalsCoherence;
 
+// Added by Trevor Strickler to scale last layer size locally
+// If one section of the boundary layer index = 0 or 1  is not supposed to be
+// scaled...that section's normals will have scaleFactor = 1.0 (exactly  1.0 to all sig figs)
+// ...however, if that non-scaled
+// section borders a scaled section, the boundary normals will extrude consistently (an 
+// average of scaled and non-scaled heights).
+bool ExtrudeParams::calcLayerScaleFactor[2] = {0,0};  // Added by Trevor Strickler
+
 static void Projette(double p[3], double mat[3][3])
 {
   double X = p[0] * mat[0][0] + p[1] * mat[0][1] + p[2] * mat[0][2];
@@ -27,6 +35,8 @@ ExtrudeParams::ExtrudeParams(int ModeEx)
   mesh.ExtrudeMesh = false;
   mesh.Recombine = false;
   mesh.QuadToTri = NO_QUADTRI;
+  //added by Trevor Strickler 07/07/2013 (determines if a layer is scaled by source grid size (1) or not (0))...only meant for boundary layers
+  mesh.ScaleLast = false;
   mesh.ViewIndex = -1;
   mesh.BoundaryLayerIndex = 0;
 }
@@ -53,6 +63,22 @@ void ExtrudeParams::Extrude(int iLayer, int iElemLayer,
                             double &x, double &y, double &z)
 {
   double t = u(iLayer, iElemLayer);
+  // Trevor Strickler (this definitely relies on fixing lateral boundary extruded
+  // surfaces if mesh.ScaleLast is changed by ReplaceDuplicates.  This is done in BoundaryLayers.cpp right now.
+  if( geo.Type == BOUNDARY_LAYER && calcLayerScaleFactor[mesh.BoundaryLayerIndex]  && iLayer == mesh.NbLayer-1 &&
+      mesh.BoundaryLayerIndex >= 0 && mesh.BoundaryLayerIndex <= 1 && normals[mesh.BoundaryLayerIndex] ){
+    double scale = 1.0;
+    normals[mesh.BoundaryLayerIndex]->get_scale(x, y, z, &scale);
+    if( fabs(scale-1.0) <= xyzv::eps )
+      scale = 1.0;
+    else{
+      if( mesh.NbLayer == 1 )
+	t = t * scale;
+      else
+        t = (t-mesh.hLayer[mesh.NbLayer-2])*scale + mesh.hLayer[mesh.NbLayer-2];
+    }
+  }
+
   Extrude(t, x, y, z);
 }
 
diff --git a/Geo/ExtrudeParams.h b/Geo/ExtrudeParams.h
index e02f5ca8b4564785353f2d47883df594c333915a..03775f84cd5e4924a3f0d5d008f839cb37fd2ef3 100644
--- a/Geo/ExtrudeParams.h
+++ b/Geo/ExtrudeParams.h
@@ -42,6 +42,8 @@ public :
     int NbLayer;
     std::vector<int> NbElmLayer;
     std::vector<double> hLayer;
+    //added by Trevor Strickler 07/07/2013 (determines if a layer is scaled by source grid size (1) or not (0))...only meant for boundary layers
+    bool ScaleLast;
     std::map<int, std::pair<double, std::vector<int> > > Holes;
     int ViewIndex, BoundaryLayerIndex;
   }mesh;
@@ -54,6 +56,13 @@ public :
   }geo;
 
   // for boundary layers
+  // Added by Trevor Strickler to scale last layer size locally
+  // If one section of the boundary layer index = 0 or 1  is not supposed to be
+  // scaled...that section's normals will have scaleFactor = 1.0 (exactly  1.0 to all sig figs)
+  // ...however, if that non-scaled
+  // section borders a scaled section, the boundary normals will extrude consistently (an
+  // average of scaled and non-scaled heights).
+  static bool calcLayerScaleFactor[2];  // Trevor Strickler, to give a global awareness of whether last layer scaling is to be used.
   static smooth_data *normals[2];
   static std::vector<SPoint3> normalsCoherence;
 };
diff --git a/Geo/GFaceCompound.cpp b/Geo/GFaceCompound.cpp
index 8d2044caf5553387f53a5b7dec048a89e2f6aa2a..8993eef77a59203b6618a605b5ca9fa6cbfa1f18 100644
--- a/Geo/GFaceCompound.cpp
+++ b/Geo/GFaceCompound.cpp
@@ -1014,6 +1014,8 @@ void GFaceCompound::getBoundingEdges()
   getUniqueEdges(_unique);
 
   l_edges.clear();
+  l_dirs.clear();    // added by Trevor Strickler 
+
 
   if(_U0.size()){
     // in case the bounding edges are explicitely given
@@ -1066,8 +1068,36 @@ void GFaceCompound::getBoundingEdges()
       }
     }
   }
+
+    // Added by Trevor Strickler (fill in the l_dirs)
+  std::list<GEdge*>::iterator it_loop;
+  std::list<std::list<GEdge*> >::iterator it_interior;
+  l_edges.clear();
+     
+  for( it_interior = _interior_loops.begin(); it_interior != _interior_loops.end(); it_interior++ ){
+    for( it_loop = it_interior->begin(); it_loop != it_interior->end(); it_loop++ ){
+      l_edges.push_back( (*it_loop) );
+      std::list<GEdge*>::iterator it_loop_next = it_loop;
+      it_loop_next++;
+      if( it_loop_next == it_interior->end() ) 
+        it_loop_next = it_interior->begin();
+      GVertex *vB = (*it_loop)->getBeginVertex();
+      GVertex *vE = (*it_loop)->getEndVertex();  
+      GVertex *vB_next = (*it_loop_next)->getBeginVertex();
+      GVertex *vE_next = (*it_loop_next)->getEndVertex();
+      if( vB == vB_next || vB == vE_next )
+        l_dirs.push_back(-1);
+      else if( vE == vB_next || vE == vE_next )
+        l_dirs.push_back(1);
+      else{
+       l_dirs.push_back(0);
+      }
+    }
+  }
+  
 }
 
+
 double GFaceCompound::getSizeH() const
 {
   SBoundingBox3d bb;
@@ -1134,6 +1164,49 @@ void GFaceCompound::computeALoop(std::set<GEdge*> &_unique, std::list<GEdge*> &l
     _unique.erase(it);
 
     bool found = false;
+/* Mod by Trevor Strickler: In the old implementation, the iterator 
+    itx was incremented twice per loop and _loops was not set up correctly.  
+    The While Loop below replaces the old for loop. 
+*/
+    for(int i = 0; i < 2; i++) {           
+      std::set<GEdge*>::iterator itx = _unique.begin();
+      while (itx != _unique.end() ){
+        GVertex *v1 = (*itx)->getBeginVertex();
+        GVertex *v2 = (*itx)->getEndVertex();
+        
+        std::set<GEdge*>::iterator itp = itx;
+        itx++;
+        
+        if(v1 == vE ){
+          _loop.push_back(*itp);
+          vE = v2;
+          i = -1;
+          _unique.erase(itp);
+        }
+        else if(v2 == vE){
+          _loop.push_back(*itp);
+          vE = v1;
+          i=-1;
+          _unique.erase(itp);
+        }
+      }
+      
+      if(vB == vE) {
+        found = true;
+        break;
+      }
+      
+      if(_unique.empty())  break;
+
+      // Mod by Trevor Strickler: had to wrap this in an if
+      //  or else it was executed when i == -1, which is not good.      
+      if( i != -1 ){
+        GVertex *temp = vB;
+        vB = vE;
+        vE = temp;
+      }
+    }
+    /* This is the old version of above nested loops before modified by Trevor Strickler
     for(int i = 0; i < 2; i++) {
       for(std::set<GEdge*>::iterator itx = _unique.begin();
           itx != _unique.end(); ++itx){
@@ -1170,7 +1243,7 @@ void GFaceCompound::computeALoop(std::set<GEdge*> &_unique, std::list<GEdge*> &l
       GVertex *temp = vB;
       vB = vE;
       vE = temp;
-    }
+    }*/
 
     if(found == true) break;
 
diff --git a/Geo/GModel.h b/Geo/GModel.h
index 51a83c641170ac76b8726e46abb9f4665d45276d..6a973115a80a71d39c7021842334a5de56fa382b 100644
--- a/Geo/GModel.h
+++ b/Geo/GModel.h
@@ -358,11 +358,6 @@ class GModel
   // access a mesh element by coordinates (using an octree search)
   MElement *getMeshElementByCoord(SPoint3 &p, int dim=-1, bool strict=true);
   std::vector<MElement*> getMeshElementsByCoord(SPoint3 &p, int dim=-1, bool strict=true);
-  //  inline std::vector<MElement*> getMeshElementsByCoords(std::vector<std::vector<double, std::allocator<double> >, int dim=-1, bool strict=true){
-  //    std::vector<MElement*> e;
-  //    for (unsigned int i = 0;i<p.size();i++)e.push_back (getMeshElementByCoord (p[i],dim,strict));
-  //    return e;
-  //  }
 
   // access a mesh element by tag, using the element cache
   MElement *getMeshElementByTag(int n);
@@ -700,6 +695,8 @@ class GModel
   // CEA triangulation
   int writeMAIL(const std::string &name, bool saveAll, double scalingFactor);
 
+  // SU2 mesh file
+  int writeSU2(const std::string &name, bool saveAll, double scalingFactor);
 };
 
 #endif
diff --git a/Geo/GModelIO_GEO.cpp b/Geo/GModelIO_GEO.cpp
index 2293dd0073fbd75af8e35982f5a5f45f98556cdf..3b8cf19978d6bb8341d8e4d8698e7f15ddaa2f2c 100644
--- a/Geo/GModelIO_GEO.cpp
+++ b/Geo/GModelIO_GEO.cpp
@@ -212,6 +212,22 @@ int GModel::importGEOInternals()
         f->meshAttributes.recombineAngle = s->RecombineAngle;
         f->meshAttributes.method = s->Method;
         f->meshAttributes.extrude = s->Extrude;
+        // transfinite import Added by Trevor Strickler.  This helps when experimenting
+        // to create compounds from transfinite surfs. Not having it does not break
+        // anything Gmsh *officially* does right now, but maybe it was left out by mistake??? and could
+        // cause problems later?
+        f->meshAttributes.transfiniteArrangement = s->Recombine_Dir;
+        f->meshAttributes.corners.clear();
+        for(int i = 0; i < List_Nbr(s->TrsfPoints); i++){
+          Vertex *corn;
+          List_Read(s->TrsfPoints, i, &corn);
+          GVertex *gv = f->model()->getVertexByTag(corn->Num);
+          if(gv)
+            f->meshAttributes.corners.push_back(gv);
+          else
+            Msg::Error("Unknown vertex %d in transfinite attributes", corn->Num);
+        }
+        
         add(f);
         if(s->EmbeddedCurves){
           for(int i = 0; i < List_Nbr(s->EmbeddedCurves); i++){
diff --git a/Geo/GModelIO_MESH.cpp b/Geo/GModelIO_MESH.cpp
index f23fd8b8970f75c8bd8e34f43ea4ba63dd62e250..2fa3fc6df3dbbd1ebe33d3ce4f507a6537681814 100644
--- a/Geo/GModelIO_MESH.cpp
+++ b/Geo/GModelIO_MESH.cpp
@@ -328,9 +328,3 @@ int GModel::writeMESH(const std::string &name, int elementTagType,
   fclose(fp);
   return 1;
 }
-
-
-
-
-
-
diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp
index 7eec90ad6eee1dcc4907aa8b5544eaa335f21165..21b92b512387e2353b7da4915287183099b08ab0 100644
--- a/Geo/Geo.cpp
+++ b/Geo/Geo.cpp
@@ -1018,8 +1018,12 @@ static Curve *DuplicateCurve(Curve *c, bool copyMeshingMethod)
 
 static void CopySurface(Surface *s, Surface *ss, bool copyMeshingMethod)
 {
-  ss->Typ = s->Typ;
-  if(copyMeshingMethod){
+   // Trevor Strickler modified
+   if( s->Typ == MSH_SURF_COMPOUND )
+     ss->Typ = MSH_SURF_REGL;
+   else
+     ss->Typ = s->Typ;
+   if(copyMeshingMethod){
     ss->Method = s->Method;
     ss->Recombine = s->Recombine;
     ss->RecombineAngle = s->RecombineAngle;
@@ -1273,33 +1277,6 @@ void DeleteShape(int Type, int Num)
   }
 }
 
-static void ColorCurve(int ip, unsigned int col)
-{
-  Curve *c = FindCurve(ip);
-  if(!c)
-    return;
-  c->Color.type = 1;
-  c->Color.mesh = c->Color.geom = col;
-}
-
-static void ColorSurface(int is, unsigned int col)
-{
-  Surface *s = FindSurface(is);
-  if(!s)
-    return;
-  s->Color.type = 1;
-  s->Color.mesh = s->Color.geom = col;
-}
-
-static void ColorVolume(int iv, unsigned int col)
-{
-  Volume *v = FindVolume(iv);
-  if(!v)
-    return;
-  v->Color.type = 1;
-  v->Color.mesh = v->Color.geom = col;
-}
-
 void ColorShape(int Type, int Num, unsigned int Color, bool Recursive)
 {
   Curve *c;
@@ -2113,1175 +2090,1419 @@ void BoundaryShapes(List_T *shapes, List_T *shapesBoundary, bool combined)
   }
 }
 
-// Extrusion routines
-
-void ProtudeXYZ(double &x, double &y, double &z, ExtrudeParams *e)
+// Added by Trevor Strickler for extruding unique compound surface edges
+static List_T* GetCompoundUniqueEdges(Surface *ps)
 {
-  double matrix[4][4];
-  double T[3];
-  Vertex v(x, y, z);
-
-  T[0] = -e->geo.pt[0];
-  T[1] = -e->geo.pt[1];
-  T[2] = -e->geo.pt[2];
-  SetTranslationMatrix(matrix, T);
-  List_Reset(ListOfTransformedPoints);
-  ApplyTransformationToPoint(matrix, &v);
 
-  SetRotationMatrix(matrix, e->geo.axe, e->geo.angle);
-  List_Reset(ListOfTransformedPoints);
-  ApplyTransformationToPoint(matrix, &v);
+  // Two parts:
+  // Part 1: create map of keys with values abs(c->Num) that map to integer counts of abs(c->num) in compound
+  // Part 2: Make the unique list
 
-  T[0] = -T[0];
-  T[1] = -T[1];
-  T[2] = -T[2];
-  SetTranslationMatrix(matrix, T);
-  List_Reset(ListOfTransformedPoints);
-  ApplyTransformationToPoint(matrix, &v);
+  std::vector<int> comp_surfs = ps->compound;
+  if( comp_surfs.size() == 0 || ps->Typ != MSH_SURF_COMPOUND ){
+    Msg::Error("Surface %d is not compound", ps->Num);
+    return (List_T*)(0);
+  }
 
-  x = v.Pos.X;
-  y = v.Pos.Y;
-  z = v.Pos.Z;
+  int num_surfs = comp_surfs.size();
+  List_T *bnd_c= List_Create(4, 1, sizeof(Curve*));
 
-  List_Reset(ListOfTransformedPoints);
-}
+  std::map<int, unsigned int> count_map;
 
-int Extrude_ProtudePoint(int type, int ip,
-			 double T0, double T1, double T2,
-			 double A0, double A1, double A2,
-			 double X0, double X1, double X2, double alpha,
-			 Curve **pc, Curve **prc, int final,
-			 ExtrudeParams *e)
-{
-  double matrix[4][4], T[3], Ax[3], d;
-  Vertex V, *pv, *newp, *chapeau;
-  Curve *c;
-  int i;
+  for( int i = 0; i < num_surfs; i++ ){
+    Surface *s = FindSurface(std::abs(comp_surfs[i]));
+    if( !s ){
+      Msg::Error("Unknown surface %d", std::abs(comp_surfs[i]) );
+      return (List_T*)(0);
+    }
+    int num_in_surf = List_Nbr(s->Generatrices);
+    for( int m = 0; m < num_in_surf; m++ ){
+      Curve *c=0;
+      List_Read(s->Generatrices, m, &c);
 
-  pv = &V;
-  pv->Num = ip;
-  *pc = *prc = NULL;
-  if(!Tree_Query(GModel::current()->getGEOInternals()->Points, &pv))
-    return 0;
+      if( !c ){
+        Msg::Error("Unknown curve");
+        return (List_T*)(0);
+      }
 
-  Msg::Debug("Extrude Point %d", ip);
+      if( !FindCurve(-c->Num)  ) {
+        Msg::Error("Unknown curve %d", -c->Num );
+        return (List_T*)(0);
+      }
 
-  chapeau = DuplicateVertex(pv);
+      int abs_Num = std::abs(c->Num) ;
 
-  switch (type) {
-  case TRANSLATE:
-    T[0] = T0;
-    T[1] = T1;
-    T[2] = T2;
-    SetTranslationMatrix(matrix, T);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToPoint(matrix, chapeau);
-    if(!comparePosition(&pv, &chapeau))
-      return pv->Num;
-    c = Create_Curve(NEWLINE(), MSH_SEGM_LINE, 1, NULL, NULL, -1, -1, 0., 1.);
-    c->Control_Points = List_Create(2, 1, sizeof(Vertex *));
-    c->Extrude = new ExtrudeParams;
-    c->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
-    if(e)
-      c->Extrude->mesh = e->mesh;
-    List_Add(c->Control_Points, &pv);
-    List_Add(c->Control_Points, &chapeau);
-    c->beg = pv;
-    c->end = chapeau;
-    break;
-  case BOUNDARY_LAYER:
-    chapeau->Typ = MSH_POINT_BND_LAYER;
-    if(e) chapeau->boundaryLayerIndex = e->mesh.BoundaryLayerIndex;
-    c = Create_Curve(NEWLINE(), MSH_SEGM_BND_LAYER, 1, NULL, NULL, -1, -1, 0., 1.);
-    c->Control_Points = List_Create(2, 1, sizeof(Vertex *));
-    c->Extrude = new ExtrudeParams;
-    c->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
-    if(e) c->Extrude->mesh = e->mesh;
-    List_Add(c->Control_Points, &pv);
-    List_Add(c->Control_Points, &chapeau);
-    c->beg = pv;
-    c->end = chapeau;
-    break;
-  case ROTATE:
-    T[0] = -X0;
-    T[1] = -X1;
-    T[2] = -X2;
-    SetTranslationMatrix(matrix, T);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToPoint(matrix, chapeau);
-    Ax[0] = A0;
-    Ax[1] = A1;
-    Ax[2] = A2;
-    SetRotationMatrix(matrix, Ax, alpha);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToPoint(matrix, chapeau);
-    T[0] = X0;
-    T[1] = X1;
-    T[2] = X2;
-    SetTranslationMatrix(matrix, T);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToPoint(matrix, chapeau);
-    if(!comparePosition(&pv, &chapeau))
-      return pv->Num;
-    c = Create_Curve(NEWLINE(), MSH_SEGM_CIRC, 1, NULL, NULL, -1, -1, 0., 1.);
-    c->Control_Points = List_Create(3, 1, sizeof(Vertex *));
-    c->Extrude = new ExtrudeParams;
-    c->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
-    if(e)
-      c->Extrude->mesh = e->mesh;
-    List_Add(c->Control_Points, &pv);
-    // compute circle center
-    newp = DuplicateVertex(pv);
-    Ax[0] = A0;
-    Ax[1] = A1;
-    Ax[2] = A2;
-    norme(Ax);
-    T[0] = pv->Pos.X - X0;
-    T[1] = pv->Pos.Y - X1;
-    T[2] = pv->Pos.Z - X2;
-    prosca(T, Ax, &d);
-    newp->Pos.X = X0 + d * Ax[0];
-    newp->Pos.Y = X1 + d * Ax[1];
-    newp->Pos.Z = X2 + d * Ax[2];
-    List_Add(c->Control_Points, &newp);
-    List_Add(c->Control_Points, &chapeau);
-    c->beg = pv;
-    c->end = chapeau;
-    break;
-  case TRANSLATE_ROTATE:
-    d = CTX::instance()->geom.extrudeSplinePoints;
-    d = d ? d : 1;
-    c = Create_Curve(NEWLINE(), MSH_SEGM_SPLN, 1, NULL, NULL, -1, -1, 0., 1.);
-    c->Control_Points =
-      List_Create(CTX::instance()->geom.extrudeSplinePoints + 1, 1, sizeof(Vertex *));
-    c->Extrude = new ExtrudeParams;
-    c->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
-    if(e)
-      c->Extrude->mesh = e->mesh;
-    List_Add(c->Control_Points, &pv);
-    c->beg = pv;
-    for(i = 0; i < CTX::instance()->geom.extrudeSplinePoints; i++) {
-      if(i)
-        chapeau = DuplicateVertex(chapeau);
-      T[0] = -X0;
-      T[1] = -X1;
-      T[2] = -X2;
-      SetTranslationMatrix(matrix, T);
-      List_Reset(ListOfTransformedPoints);
-      ApplyTransformationToPoint(matrix, chapeau);
-      Ax[0] = A0;
-      Ax[1] = A1;
-      Ax[2] = A2;
-      SetRotationMatrix(matrix, Ax, alpha / d);
-      List_Reset(ListOfTransformedPoints);
-      ApplyTransformationToPoint(matrix, chapeau);
-      T[0] = X0;
-      T[1] = X1;
-      T[2] = X2;
-      SetTranslationMatrix(matrix, T);
-      List_Reset(ListOfTransformedPoints);
-      ApplyTransformationToPoint(matrix, chapeau);
-      T[0] = T0 / d;
-      T[1] = T1 / d;
-      T[2] = T2 / d;
-      SetTranslationMatrix(matrix, T);
-      List_Reset(ListOfTransformedPoints);
-      ApplyTransformationToPoint(matrix, chapeau);
-      List_Add(c->Control_Points, &chapeau);
+      if( count_map.find( abs_Num ) == count_map.end() )
+        count_map[ abs_Num ] = 1;
+      else
+        count_map[ abs_Num ]++;
     }
-    c->end = chapeau;
-    break;
-//  case ANALYTICAL:
-//
-//    break;
-  default:
-    Msg::Error("Unknown extrusion type");
-    return pv->Num;
   }
 
-  End_Curve(c);
-  Tree_Add(GModel::current()->getGEOInternals()->Curves, &c);
-  CreateReversedCurve(c);
-  *pc = c;
-  *prc = FindCurve(-c->Num);
-
-  List_Reset(ListOfTransformedPoints);
-
-  if(CTX::instance()->geom.autoCoherence && final)
-    ReplaceAllDuplicates();
+  // Now, create the list of uniques.  Exclude any repeats of abs(c->num) of
+  //   course.
+  for( int i = 0; i < num_surfs; i++ ){
+    Surface *s = FindSurface(std::abs(comp_surfs[i]));
+    int num_in_surf = List_Nbr(s->Generatrices);
+    for( int m = 0; m < num_in_surf; m++ ){
+      Curve *c;
+      List_Read(s->Generatrices, m, &c);
+      std::map<int, unsigned int>::iterator itmap = count_map.find(std::abs(c->Num));
+      if( itmap != count_map.end() ){
+        if( itmap->second == 1 ){
+          List_Add(bnd_c, &c);
+	  // for duplicates  -- if coherence on, do not need. if coherence off, should not try to find them
+          /*bool unique_flag = true;
+          std::map<int, unsigned int>::iterator itmap2 = count_map.begin();
+
+          for( ; itmap2 != count_map.end(); itmap2++ ){
+            Curve *c_tmp1 = FindCurve( itmap2->first );
+            Curve *c_tmp2 = FindCurve( -itmap2->first );
+
+            if( itmap != itmap2 &&
+                ( !compareTwoCurves( &c_tmp1, &c ) ||
+                  !compareTwoCurves( &c_tmp2, &c ) ) ){
+              unique_flag = false;
+              break;
+            }
+          }
+          if( unique_flag )
+	    List_Add(bnd_c, &c);
+	  */
+        }
+      }
+      else{ // if not found the curve in the count_map
+        Msg::Error("A problem in finding unique curves in extrusion of compound surface %d",
+                   std::abs(ps->Num) );
+        return (List_T*)(0);
+      }
+    }
+  }
 
-  return chapeau->Num;
+  return bnd_c;
 }
 
-int Extrude_ProtudeCurve(int type, int ic,
-			 double T0, double T1, double T2,
-			 double A0, double A1, double A2,
-			 double X0, double X1, double X2, double alpha,
-			 Surface **ps, int final,
-			 ExtrudeParams *e)
+
+// Added by Trevor Strickler
+// This function returns a pointer to an allocated List_T type that
+// contains an ordered list of unique edges for a compound surface.
+// The edges are grouped into loops if there is more than one loop.
+// The order is in order around a loop.
+// Only one problem: Sometimes holes can be selected as the first loop,
+// though this should not create many real problems on a copied top surface.
+static List_T* GetOrderedUniqueEdges( Surface *s )
 {
-  double matrix[4][4], T[3], Ax[3];
-  Curve *CurveBeg, *CurveEnd;
-  Curve *ReverseChapeau, *ReverseBeg, *ReverseEnd;
-  Curve *pc, *revpc, *chapeau;
-  Surface *s;
+  List_T* unique = GetCompoundUniqueEdges(s);
 
-  pc = FindCurve(ic);
-  revpc = FindCurve(-ic);
-  *ps = NULL;
+  // need to sort out the list into ordered, oriented loops before passing
+  // these into the gmsh geometry system.
+  // Have to get list of surface numbers
+  int numgen = List_Nbr(unique);
+  List_T *gen_nums = List_Create(numgen, 1, sizeof(int));
 
-  if(!pc || !revpc){
-    return 0;
+  for( int i = 0; i < numgen; i++ ){
+    Curve *ctemp = 0;
+    List_Read(unique, i, &ctemp);
+    if( !ctemp ){
+      Msg::Error("No such curve.");
+      return 0;
+    }
+
+    List_Add(gen_nums, &(ctemp->Num));
   }
 
-  if(!pc->beg || !pc->end){
-    Msg::Error("Cannot extrude curve with no begin/end points");
-    return 0;
+  sortEdgesInLoop(0,gen_nums,1);
+
+  // put sorted list of curve pointers back into compnd_gen and generatrices
+  List_Reset(unique);
+  for( int i = 0; i < List_Nbr(gen_nums); i++ ){
+
+    Curve *ctemp = 0;
+    int j;
+    List_Read(gen_nums, i, &j);
+    if( !(ctemp = FindCurve(j)) ){
+      Msg::Error("No such curve %d.", j);
+      return 0;
+    }
+    List_Add(unique, &ctemp);
   }
 
-  Msg::Debug("Extrude Curve %d", ic);
+  List_Delete(gen_nums);
 
-  chapeau = DuplicateCurve(pc, false);
+  return unique;
 
-  chapeau->Extrude = new ExtrudeParams(COPIED_ENTITY);
-  chapeau->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
-  chapeau->Extrude->geo.Source = pc->Num;
-  if(e)
-    chapeau->Extrude->mesh = e->mesh;
+}
 
-  switch (type) {
-  case TRANSLATE:
-    T[0] = T0;
-    T[1] = T1;
-    T[2] = T2;
-    SetTranslationMatrix(matrix, T);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToCurve(matrix, chapeau);
-    break;
-  case BOUNDARY_LAYER:
-    chapeau->Typ = MSH_SEGM_BND_LAYER;
-    if(chapeau->beg){
-      chapeau->beg->Typ = MSH_POINT_BND_LAYER;
-      if(e) chapeau->beg->boundaryLayerIndex = e->mesh.BoundaryLayerIndex;
-    }
-    if(chapeau->end){
-      chapeau->end->Typ = MSH_POINT_BND_LAYER;
-      if(e) chapeau->end->boundaryLayerIndex = e->mesh.BoundaryLayerIndex;
-    }
-    for(int i = 0; i < List_Nbr(chapeau->Control_Points); i++){
-      Vertex *v;
-      List_Read(chapeau->Control_Points, i, &v);
-      if(e) v->boundaryLayerIndex = e->mesh.BoundaryLayerIndex;
-    }
-    revpc = FindCurve(-chapeau->Num);
-    if(revpc) revpc->Typ = MSH_SEGM_BND_LAYER;
-    break;
-  case ROTATE:
-    T[0] = -X0;
-    T[1] = -X1;
-    T[2] = -X2;
-    SetTranslationMatrix(matrix, T);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToCurve(matrix, chapeau);
-    Ax[0] = A0;
-    Ax[1] = A1;
-    Ax[2] = A2;
-    SetRotationMatrix(matrix, Ax, alpha);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToCurve(matrix, chapeau);
-    T[0] = X0;
-    T[1] = X1;
-    T[2] = X2;
-    SetTranslationMatrix(matrix, T);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToCurve(matrix, chapeau);
-    break;
-  case TRANSLATE_ROTATE:
-    T[0] = -X0;
-    T[1] = -X1;
-    T[2] = -X2;
-    SetTranslationMatrix(matrix, T);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToCurve(matrix, chapeau);
-    Ax[0] = A0;
-    Ax[1] = A1;
-    Ax[2] = A2;
-    SetRotationMatrix(matrix, Ax, alpha);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToCurve(matrix, chapeau);
-    T[0] = X0;
-    T[1] = X1;
-    T[2] = X2;
-    SetTranslationMatrix(matrix, T);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToCurve(matrix, chapeau);
-    T[0] = T0;
-    T[1] = T1;
-    T[2] = T2;
-    SetTranslationMatrix(matrix, T);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToCurve(matrix, chapeau);
-    break;
-  default:
-    Msg::Error("Unknown extrusion type");
-    return pc->Num;
-  }
+// Duplicate removal
 
-  Extrude_ProtudePoint(type, pc->beg->Num, T0, T1, T2,
-                       A0, A1, A2, X0, X1, X2, alpha,
-                       &CurveBeg, &ReverseBeg, 0, e);
-  Extrude_ProtudePoint(type, pc->end->Num, T0, T1, T2,
-                       A0, A1, A2, X0, X1, X2, alpha,
-                       &CurveEnd, &ReverseEnd, 0, e);
+static int compareTwoPoints(const void *a, const void *b)
+{
 
-  if(!CurveBeg && !CurveEnd){
-    return pc->Num;
-  }
+  Vertex *q = *(Vertex **)a;
+  Vertex *w = *(Vertex **)b;
 
-  if(type == BOUNDARY_LAYER)
-    s = Create_Surface(NEWSURFACE(), MSH_SURF_BND_LAYER);
-  else if(!CurveBeg || !CurveEnd)
-    s = Create_Surface(NEWSURFACE(), MSH_SURF_TRIC);
-  else
-    s = Create_Surface(NEWSURFACE(), MSH_SURF_REGL);
+  if(q->Typ != w->Typ)
+    return q->Typ - w->Typ;
 
-  s->Generatrices = List_Create(4, 1, sizeof(Curve *));
-  s->Extrude = new ExtrudeParams;
-  s->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
-  s->Extrude->geo.Source = pc->Num;
-  if(e)
-    s->Extrude->mesh = e->mesh;
+  if(q->boundaryLayerIndex != w->boundaryLayerIndex)
+    return q->boundaryLayerIndex - w->boundaryLayerIndex;
 
-  ReverseChapeau = FindCurve(-chapeau->Num);
+  return comparePosition(a, b);
+}
 
-  if(!CurveBeg) {
-    List_Add(s->Generatrices, &pc);
-    List_Add(s->Generatrices, &CurveEnd);
-    List_Add(s->Generatrices, &ReverseChapeau);
+static int compareTwoCurves(const void *a, const void *b)
+{
+  Curve *c1 = *(Curve **)a;
+  Curve *c2 = *(Curve **)b;
+  int comp;
+
+  if(c1->Typ != c2->Typ){
+    if((c1->Typ == MSH_SEGM_CIRC && c2->Typ == MSH_SEGM_CIRC_INV) ||
+       (c1->Typ == MSH_SEGM_CIRC_INV && c2->Typ == MSH_SEGM_CIRC) ||
+       (c1->Typ == MSH_SEGM_ELLI && c2->Typ == MSH_SEGM_ELLI_INV) ||
+       (c1->Typ == MSH_SEGM_ELLI_INV && c2->Typ == MSH_SEGM_ELLI)){
+      // this is still ok
+    }
+    else
+      return c1->Typ - c2->Typ;
   }
-  else if(!CurveEnd) {
-    List_Add(s->Generatrices, &ReverseChapeau);
-    List_Add(s->Generatrices, &ReverseBeg);
-    List_Add(s->Generatrices, &pc);
+
+  if(List_Nbr(c1->Control_Points) != List_Nbr(c2->Control_Points))
+    return List_Nbr(c1->Control_Points) - List_Nbr(c2->Control_Points);
+
+  if(!List_Nbr(c1->Control_Points)){
+    if(!c1->beg || !c2->beg)
+      return 1;
+    comp = compareVertex(&c1->beg, &c2->beg);
+    if(comp)
+      return comp;
+    if(!c1->end || !c2->end)
+      return 1;
+    comp = compareVertex(&c1->end, &c2->end);
+    if(comp)
+      return comp;
   }
   else {
-    List_Add(s->Generatrices, &pc);
-    List_Add(s->Generatrices, &CurveEnd);
-    List_Add(s->Generatrices, &ReverseChapeau);
-    List_Add(s->Generatrices, &ReverseBeg);
+    for(int i = 0; i < List_Nbr(c1->Control_Points); i++){
+      Vertex *v1, *v2;
+      List_Read(c1->Control_Points, i, &v1);
+      List_Read(c2->Control_Points, i, &v2);
+      comp = compareVertex(&v1, &v2);
+      if(comp)
+        return comp;
+    }
   }
+  return 0;
+}
 
-  End_Surface(s);
-  Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &s);
+static int compareTwoSurfaces(const void *a, const void *b)
+{
+  Surface *s1 = *(Surface **)a;
+  Surface *s2 = *(Surface **)b;
 
-  List_Reset(ListOfTransformedPoints);
+  // checking types is the "right thing" to do (see e.g. compareTwoCurves)
+  // but it would break backward compatibility (see e.g. tutorial/t2.geo),
+  // so let's just do it for boundary layer surfaces for now:
+  if(s1->Typ == MSH_SURF_BND_LAYER || s2->Typ == MSH_SURF_BND_LAYER ||
+     s1->Typ == MSH_SURF_COMPOUND || s2->Typ == MSH_SURF_COMPOUND ){
+    if(s1->Typ != s2->Typ) return s1->Typ - s2->Typ;
+  }
 
-  *ps = s;
+  // if both surfaces have no generatrices, stay on the safe side and
+  // assume they are different
+  if(!List_Nbr(s1->Generatrices) && !List_Nbr(s2->Generatrices))
+    return 1;
 
-  if(CTX::instance()->geom.autoCoherence && final)
-    ReplaceAllDuplicates();
+  return compare2Lists(s1->Generatrices, s2->Generatrices, compareAbsCurve);
+}
 
-  return chapeau->Num;
+static void MaxNumPoint(void *a, void *b)
+{
+  Vertex *v = *(Vertex **)a;
+  GModel::current()->getGEOInternals()->MaxPointNum =
+    std::max(GModel::current()->getGEOInternals()->MaxPointNum, v->Num);
 }
 
-int Extrude_ProtudeSurface(int type, int is,
-			   double T0, double T1, double T2,
-			   double A0, double A1, double A2,
-			   double X0, double X1, double X2, double alpha,
-			   Volume **pv, ExtrudeParams *e)
+static void MaxNumCurve(void *a, void *b)
 {
-  double matrix[4][4], T[3], Ax[3];
-  Curve *c, *c2;
-  int i;
-  Surface *s, *ps, *chapeau;
+  Curve *c = *(Curve **)a;
+  GModel::current()->getGEOInternals()->MaxLineNum =
+    std::max(GModel::current()->getGEOInternals()->MaxLineNum, c->Num);
+}
 
-  *pv = NULL;
+static void MaxNumSurface(void *a, void *b)
+{
+  Surface *s = *(Surface **)a;
+  GModel::current()->getGEOInternals()->MaxSurfaceNum =
+    std::max(GModel::current()->getGEOInternals()->MaxSurfaceNum, s->Num);
+}
 
-  // 'is' can be negative, to signify that the surface orientation
-  // should be reversed. This orientation information is only used at
-  // the moment when creating boundary layers
-  if(!(ps = FindSurface(std::abs(is))))
-    return 0;
 
-  Msg::Debug("Extrude Surface %d", is);
+// Modified by Trevor Strickler
+static void ReplaceDuplicatePoints(std::map<int, int> * v_report = 0)
+{
+  // FIXME: This routine is in fact logically wrong (the compareTwoPoints
+  // function used in the avl tree is not a appropriate comparison
+  // function). The fix is simple (use a multi dimensional tree, e.g.,
+  // MVertexPositionSet), but fixing the routine would break backward
+  // compatibility with old .geo files. This will be fixed in the new abstract
+  // GModel CAD creation routines.
+  Vertex *v, *v2, **pv, **pv2;
+  Curve *c;
+  Surface *s;
+  Volume *vol;
+  Tree_T *points2delete = Tree_Create(sizeof(Vertex *), compareVertex);
+  Tree_T *allNonDuplicatedPoints = Tree_Create(sizeof(Vertex *), compareTwoPoints);
 
-  chapeau = DuplicateSurface(ps, false);
-  chapeau->Extrude = new ExtrudeParams(COPIED_ENTITY);
-  chapeau->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
-  chapeau->Extrude->geo.Source = is; // not ps->Num: we need the sign info
-  if(e)
-    chapeau->Extrude->mesh = e->mesh;
+  // Create unique points
 
-  for(i = 0; i < List_Nbr(chapeau->Generatrices); i++) {
-    List_Read(ps->Generatrices, i, &c2);
-    List_Read(chapeau->Generatrices, i, &c);
-    if(c->Num < 0){
-      int nn = -c->Num;
-      if(!(c = FindCurve(nn))) {
-        Msg::Error("Unknown curve %d", nn);
-        return ps->Num;
+  int start = Tree_Nbr(GModel::current()->getGEOInternals()->Points);
+
+  List_T *All = Tree2List(GModel::current()->getGEOInternals()->Points);
+  for(int i = 0; i < List_Nbr(All); i++) {
+    List_Read(All, i, &v);
+    if(!Tree_Search(allNonDuplicatedPoints, &v)) {
+      Tree_Insert(allNonDuplicatedPoints, &v);
+    }
+    else {
+      Tree_Suppress(GModel::current()->getGEOInternals()->Points, &v);
+      Tree_Insert(points2delete, &v);
+      // Trevor Strickler
+      if(v_report){
+        std::map<int, int>::iterator m_it = v_report->find(v->Num);
+        if( m_it != v_report->end() ){
+	  Vertex **v_rep = (Vertex **)Tree_PQuery(allNonDuplicatedPoints, &v);
+	  m_it->second = (*v_rep)->Num;
+        }
       }
     }
-    c->Extrude = new ExtrudeParams(COPIED_ENTITY);
-    c->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
-    // don't take the abs(): the sign of c2->Num is important (used
-    // when copying the mesh in the extrusion routine)
-    c->Extrude->geo.Source = c2->Num;
-    if(e)
-      c->Extrude->mesh = e->mesh;
   }
+  List_Delete(All);
 
-  // FIXME: this is a really ugly hack for backward compatibility, so
-  // that we don't screw up the old .geo files too much. (Before
-  // version 1.54, we didn't always create new volumes during "Extrude
-  // Surface". Now we do, but with "CTX::instance()->geom.oldNewreg==1", this
-  // bumps the NEWREG() counter, and thus changes the whole automatic
-  // numbering sequence.) So we locally force oldNewreg to 0: in most
-  // cases, since we define points, curves, etc., before defining
-  // volumes, the NEWVOLUME() call below will return a fairly low
-  // number, that will not interfere with the other numbers...
-  int tmp = CTX::instance()->geom.oldNewreg;
-  CTX::instance()->geom.oldNewreg = 0;
-  Volume *v = Create_Volume(NEWVOLUME(), MSH_VOLUME);
-  CTX::instance()->geom.oldNewreg = tmp;
+  int end = Tree_Nbr(GModel::current()->getGEOInternals()->Points);
 
-  v->Extrude = new ExtrudeParams;
-  v->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
-  v->Extrude->geo.Source = is;
-  if(e)
-    v->Extrude->mesh = e->mesh;
-  int ori = -1;
-  List_Add(v->Surfaces, &ps);
-  List_Add(v->SurfacesOrientations, &ori);
-  ori = 1;
-  List_Add(v->Surfaces, &chapeau);
-  List_Add(v->SurfacesOrientations, &ori);
+  if(start == end) {
+    Tree_Delete(points2delete);
+    Tree_Delete(allNonDuplicatedPoints);
+    return;
+  }
 
-  for(i = 0; i < List_Nbr(ps->Generatrices); i++) {
-    List_Read(ps->Generatrices, i, &c);
-    Extrude_ProtudeCurve(type, c->Num, T0, T1, T2, A0, A1, A2, X0, X1, X2,
-                         alpha, &s, 0, e);
-    if(s){
-      if(c->Num < 0)
-        ori = -1;
-      else
-        ori = 1;
-      List_Add(v->Surfaces, &s);
-      List_Add(v->SurfacesOrientations, &ori);
-    }
+  Msg::Debug("Removed %d duplicate points", start - end);
+
+  if(CTX::instance()->geom.oldNewreg) {
+    GModel::current()->getGEOInternals()->MaxPointNum = 0;
+    Tree_Action(GModel::current()->getGEOInternals()->Points, MaxNumPoint);
   }
 
-  switch (type) {
-  case TRANSLATE:
-    T[0] = T0;
-    T[1] = T1;
-    T[2] = T2;
-    SetTranslationMatrix(matrix, T);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToSurface(matrix, chapeau);
-    break;
-  case BOUNDARY_LAYER:
-    chapeau->Typ = MSH_SURF_BND_LAYER;
-    for(int i = 0; i < List_Nbr(chapeau->Generatrices); i++) {
-      List_Read(chapeau->Generatrices, i, &c);
-      c->Typ = MSH_SEGM_BND_LAYER;
-      c = FindCurve(-c->Num);
-      c->Typ = MSH_SEGM_BND_LAYER;
-      if(c->beg){
-        c->beg->Typ = MSH_POINT_BND_LAYER;
-        if(e) c->beg->boundaryLayerIndex = e->mesh.BoundaryLayerIndex;
-      }
-      if(c->end){
-        c->end->Typ = MSH_POINT_BND_LAYER;
-        if(e) c->end->boundaryLayerIndex = e->mesh.BoundaryLayerIndex;
-      }
-      for(int i = 0; i < List_Nbr(c->Control_Points); i++){
-        Vertex *v;
-        List_Read(c->Control_Points, i, &v);
-        if(e) v->boundaryLayerIndex = e->mesh.BoundaryLayerIndex;
+  // Replace old points in curves
+
+  All = Tree2List(GModel::current()->getGEOInternals()->Curves);
+  for(int i = 0; i < List_Nbr(All); i++) {
+    List_Read(All, i, &c);
+    // replace begin/end points
+    if(!Tree_Query(allNonDuplicatedPoints, &c->beg))
+      Msg::Error("Weird point %d in Coherence", c->beg->Num);
+    if(!Tree_Query(allNonDuplicatedPoints, &c->end))
+      Msg::Error("Weird point %d in Coherence", c->end->Num);
+    // replace control points
+    for(int j = 0; j < List_Nbr(c->Control_Points); j++) {
+      pv = (Vertex **)List_Pointer(c->Control_Points, j);
+      if(!(pv2 = (Vertex **)Tree_PQuery(allNonDuplicatedPoints, pv)))
+        Msg::Error("Weird point %d in Coherence", (*pv)->Num);
+      else
+        List_Write(c->Control_Points, j, pv2);
+    }
+    // replace extrusion sources
+    if(c->Extrude && c->Extrude->geo.Mode == EXTRUDED_ENTITY){
+      v2 = FindPoint(std::abs(c->Extrude->geo.Source), points2delete);
+      if(v2){
+        if(!(pv2 = (Vertex **)Tree_PQuery(allNonDuplicatedPoints, &v2)))
+          Msg::Error("Weird point %d in Coherence", v2->Num);
+        else
+          c->Extrude->geo.Source = (*pv2)->Num;
       }
     }
-    break;
-  case ROTATE:
-    T[0] = -X0;
-    T[1] = -X1;
-    T[2] = -X2;
-    SetTranslationMatrix(matrix, T);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToSurface(matrix, chapeau);
-    Ax[0] = A0;
-    Ax[1] = A1;
-    Ax[2] = A2;
-    SetRotationMatrix(matrix, Ax, alpha);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToSurface(matrix, chapeau);
-    T[0] = X0;
-    T[1] = X1;
-    T[2] = X2;
-    SetTranslationMatrix(matrix, T);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToSurface(matrix, chapeau);
-    break;
-  case TRANSLATE_ROTATE:
-    T[0] = -X0;
-    T[1] = -X1;
-    T[2] = -X2;
-    SetTranslationMatrix(matrix, T);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToSurface(matrix, chapeau);
-    Ax[0] = A0;
-    Ax[1] = A1;
-    Ax[2] = A2;
-    SetRotationMatrix(matrix, Ax, alpha);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToSurface(matrix, chapeau);
-    T[0] = X0;
-    T[1] = X1;
-    T[2] = X2;
-    SetTranslationMatrix(matrix, T);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToSurface(matrix, chapeau);
-    T[0] = T0;
-    T[1] = T1;
-    T[2] = T2;
-    SetTranslationMatrix(matrix, T);
-    List_Reset(ListOfTransformedPoints);
-    ApplyTransformationToSurface(matrix, chapeau);
-    break;
-  default:
-    Msg::Error("Unknown extrusion type");
-    return ps->Num;
   }
+  List_Delete(All);
 
-  // this is done only for backward compatibility with the old
-  // numbering scheme
-  Tree_Suppress(GModel::current()->getGEOInternals()->Surfaces, &chapeau);
-
-  chapeau->Num = NEWSURFACE();
-
-  GModel::current()->getGEOInternals()->MaxSurfaceNum = chapeau->Num;
-  Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &chapeau);
+  // Replace old points in surfaces
 
-  Tree_Add(GModel::current()->getGEOInternals()->Volumes, &v);
+  All = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
+  for(int i = 0; i < List_Nbr(All); i++) {
+    List_Read(All, i, &s);
+    // replace transfinite corners
+    for(int j = 0; j < List_Nbr(s->TrsfPoints); j++){
+      pv = (Vertex **)List_Pointer(s->TrsfPoints, j);
+      if(!(pv2 = (Vertex **)Tree_PQuery(allNonDuplicatedPoints, pv)))
+        Msg::Error("Weird point %d in Coherence", (*pv)->Num);
+      else
+        List_Write(s->TrsfPoints, j, pv2);
+    }
+  }
+  List_Delete(All);
 
-  *pv = v;
+  // Replace old points in volumes
 
-  if(CTX::instance()->geom.autoCoherence)
-    ReplaceAllDuplicates();
+  All = Tree2List(GModel::current()->getGEOInternals()->Volumes);
+  for(int i = 0; i < List_Nbr(All); i++) {
+    List_Read(All, i, &vol);
+    // replace transfinite corners
+    for(int j = 0; j < List_Nbr(vol->TrsfPoints); j++){
+      pv = (Vertex **)List_Pointer(vol->TrsfPoints, j);
+      if(!(pv2 = (Vertex **)Tree_PQuery(allNonDuplicatedPoints, pv)))
+        Msg::Error("Weird point %d in Coherence", (*pv)->Num);
+      else
+        List_Write(vol->TrsfPoints, j, pv2);
+    }
+  }
+  List_Delete(All);
 
-  List_Reset(ListOfTransformedPoints);
+  // Replace old points in physical groups
+  for(int i = 0; i < List_Nbr(GModel::current()->getGEOInternals()->PhysicalGroups); i++){
+    PhysicalGroup *p = *(PhysicalGroup**)List_Pointer
+      (GModel::current()->getGEOInternals()->PhysicalGroups, i);
+    if(p->Typ == MSH_PHYSICAL_POINT){
+      for(int j = 0; j < List_Nbr(p->Entities); j++){
+        int num;
+        List_Read(p->Entities, j, &num);
+        v2 = FindPoint(std::abs(num), points2delete);
+        if(v2){
+          if(!(pv2 = (Vertex **)Tree_PQuery(allNonDuplicatedPoints, &v2)))
+            Msg::Error("Weird point %d in Coherence", v2->Num);
+          else
+            List_Write(p->Entities, j, &(*pv2)->Num);
+        }
+      }
+    }
+  }
 
-  return chapeau->Num;
+  Tree_Action(points2delete, Free_Vertex);
+  Tree_Delete(points2delete);
+  Tree_Delete(allNonDuplicatedPoints);
 }
 
-void ExtrudeShape(int extrude_type, int shape_type, int shape_num,
-                  double T0, double T1, double T2,
-                  double A0, double A1, double A2,
-                  double X0, double X1, double X2, double alpha,
-                  ExtrudeParams *e,
-                  List_T *list_out)
-{
-  Shape shape;
-  shape.Type = shape_type;
-  shape.Num = shape_num;
-  List_T *tmp = List_Create(1, 1, sizeof(Shape));
-  List_Add(tmp, &shape);
-  ExtrudeShapes(extrude_type, tmp,
-                T0, T1, T2,
-                A0, A1, A2,
-                X0, X1, X2, alpha,
-                e,
-                list_out);
-  List_Delete(tmp);
-}
+//Modified by Trevor Strickler
+static void ReplaceDuplicateCurves(std::map<int, int> * c_report = 0)
 
-void ExtrudeShapes(int type, List_T *list_in,
-                   double T0, double T1, double T2,
-                   double A0, double A1, double A2,
-                   double X0, double X1, double X2, double alpha,
-                   ExtrudeParams *e,
-                   List_T *list_out)
 {
+  Curve *c, *c2, **pc, **pc2;
+  Surface *s;
+  Tree_T *curves2delete = Tree_Create(sizeof(Curve *), compareCurve);
+  Tree_T *allNonDuplicatedCurves = Tree_Create(sizeof(Curve *), compareTwoCurves);
 
-  for(int i = 0; i < List_Nbr(list_in); i++){
-    Shape shape;
-    List_Read(list_in, i, &shape);
-    switch(shape.Type){
-    case MSH_POINT:
-      {
-        Curve *pc = 0, *prc = 0;
-        Shape top;
-        top.Num = Extrude_ProtudePoint(type, shape.Num, T0, T1, T2,
-                                       A0, A1, A2, X0, X1, X2, alpha,
-                                       &pc, &prc, 1, e);
-        top.Type = MSH_POINT;
-        List_Add(list_out, &top);
-        if(pc){
-          Shape body;
-          body.Num = pc->Num;
-          body.Type = pc->Typ;
-          List_Add(list_out, &body);
+  // Create unique curves
+
+  int start = Tree_Nbr(GModel::current()->getGEOInternals()->Curves);
+
+  List_T *All = Tree2List(GModel::current()->getGEOInternals()->Curves);
+  for(int i = 0; i < List_Nbr(All); i++) {
+    List_Read(All, i, &c);
+    if(c->Num > 0) {
+      if(!Tree_Search(allNonDuplicatedCurves, &c)) {
+        Tree_Insert(allNonDuplicatedCurves, &c);
+        if(!(c2 = FindCurve(-c->Num))) {
+          Msg::Error("Unknown curve %d", -c->Num);
+          List_Delete(All);
+          return;
         }
+        Tree_Insert(allNonDuplicatedCurves, &c2);
       }
-      break;
-    case MSH_SEGM_LINE:
-    case MSH_SEGM_SPLN:
-    case MSH_SEGM_BSPLN:
-    case MSH_SEGM_BEZIER:
-    case MSH_SEGM_CIRC:
-    case MSH_SEGM_CIRC_INV:
-    case MSH_SEGM_ELLI:
-    case MSH_SEGM_ELLI_INV:
-    case MSH_SEGM_NURBS:
-      {
-        Surface *ps = 0;
-        Shape top;
-        top.Num = Extrude_ProtudeCurve(type, shape.Num, T0, T1, T2,
-                                       A0, A1, A2, X0, X1, X2, alpha,
-                                       &ps, 1, e);
-        Curve *pc = FindCurve(top.Num);
-        top.Type = pc ? pc->Typ : 0;
-        List_Add(list_out, &top);
-        if(ps){
-          Shape body;
-          body.Num = ps->Num;
-          body.Type = ps->Typ;
-          List_Add(list_out, &body);
-          if(CTX::instance()->geom.extrudeReturnLateral){
-            for(int j = 0; j < List_Nbr(ps->Generatrices); j++){
-              Curve *c;
-              List_Read(ps->Generatrices, j, &c);
-              if(abs(c->Num) != shape.Num && abs(c->Num) != top.Num){
-                Shape side;
-                side.Num = c->Num;
-                side.Type = c->Typ;
-                List_Add(list_out, &side);
-              }
-            }
-          }
+      else {
+        Tree_Suppress(GModel::current()->getGEOInternals()->Curves, &c);
+        if(!(c2 = FindCurve(-c->Num))) {
+          Msg::Error("Unknown curve %d", -c->Num);
+          break;
         }
+        Tree_Suppress(GModel::current()->getGEOInternals()->Curves, &c2);
+        Tree_Insert(curves2delete, &c);
+        Tree_Insert(curves2delete, &c2);
+	// Trevor Strickler
+	if(c_report){
+	  std::map<int, int>::iterator m_it = c_report->find(c->Num);
+	  if( m_it != c_report->end() ){
+	    Curve **c_rep = (Curve **)Tree_PQuery(allNonDuplicatedCurves, &c);
+	    m_it->second = (*c_rep)->Num;
+	  }
+	  m_it = c_report->find(c2->Num);
+	  if( m_it != c_report->end() ){
+	    Curve **c_rep_neg = (Curve **)Tree_PQuery(allNonDuplicatedCurves, &c2);
+	    m_it->second = (*c_rep_neg)->Num;
+	  }
+	}
       }
-      break;
-    case MSH_SURF_REGL:
-    case MSH_SURF_TRIC:
-    case MSH_SURF_PLAN:
-    case MSH_SURF_DISCRETE:
-    case MSH_SURF_COMPOUND:
-      {
-        Volume *pv = 0;
-        Shape top;
-        top.Num = Extrude_ProtudeSurface(type, shape.Num, T0, T1, T2,
-                                         A0, A1, A2, X0, X1, X2, alpha,
-                                         &pv, e);
-        Surface *ps = FindSurface(top.Num);
-        top.Type = ps ? ps->Typ : 0;
+    }
+  }
+  List_Delete(All);
 
-        List_Add(list_out, &top);
-        if(pv){
-          Shape body;
-          body.Num = pv->Num;
-          body.Type = pv->Typ;
-          List_Add(list_out, &body);
-          if(CTX::instance()->geom.extrudeReturnLateral){
-            for(int j = 0; j < List_Nbr(pv->Surfaces); j++){
-              Surface *s;
-              List_Read(pv->Surfaces, j, &s);
-              if(abs(s->Num) != shape.Num && abs(s->Num) != top.Num){
-                Shape side;
-                side.Num = s->Num;
-                side.Type = s->Typ;
-                List_Add(list_out, &side);
-              }
-            }
-          }
+  int end = Tree_Nbr(GModel::current()->getGEOInternals()->Curves);
+
+  if(start == end) {
+    Tree_Delete(curves2delete);
+    Tree_Delete(allNonDuplicatedCurves);
+    return;
+  }
+
+  Msg::Debug("Removed %d duplicate curves", start - end);
+
+  if(CTX::instance()->geom.oldNewreg) {
+    GModel::current()->getGEOInternals()->MaxLineNum = 0;
+    Tree_Action(GModel::current()->getGEOInternals()->Curves, MaxNumCurve);
+  }
+
+  // Replace old curves in curves
+
+  All = Tree2List(GModel::current()->getGEOInternals()->Curves);
+  for(int i = 0; i < List_Nbr(All); i++) {
+    List_Read(All, i, &c);
+    // replace extrusion sources
+    if(c->Extrude && c->Extrude->geo.Mode == COPIED_ENTITY){
+      c2 = FindCurve(std::abs(c->Extrude->geo.Source), curves2delete);
+      if(c2){
+        if(!(pc2 = (Curve **)Tree_PQuery(allNonDuplicatedCurves, &c2)))
+          Msg::Error("Weird curve %d in Coherence", c2->Num);
+        else
+          c->Extrude->geo.Source = (*pc2)->Num;
+      }
+    }
+  }
+  List_Delete(All);
+
+  // Replace old curves in surfaces
+
+  All = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
+  for(int i = 0; i < List_Nbr(All); i++) {
+    List_Read(All, i, &s);
+    // replace bounding curves
+    for(int j = 0; j < List_Nbr(s->Generatrices); j++) {
+      pc = (Curve **)List_Pointer(s->Generatrices, j);
+      if(!(pc2 = (Curve **)Tree_PQuery(allNonDuplicatedCurves, pc)))
+        Msg::Error("Weird curve %d in Coherence", (*pc)->Num);
+      else {
+        List_Write(s->Generatrices, j, pc2);
+        // arghhh: check compareTwoCurves!
+        End_Curve(*pc2);
+      }
+    }
+    // replace extrusion sources
+    if(s->Extrude && s->Extrude->geo.Mode == EXTRUDED_ENTITY){
+      c2 = FindCurve(std::abs(s->Extrude->geo.Source), curves2delete);
+      if(c2){
+        if(!(pc2 = (Curve **)Tree_PQuery(allNonDuplicatedCurves, &c2)))
+          Msg::Error("Weird curve %d in Coherence", c2->Num);
+        else
+          s->Extrude->geo.Source = (*pc2)->Num;
+      }
+    }
+  }
+  List_Delete(All);
+
+  // Replace old curves in physical groups
+  for(int i = 0; i < List_Nbr(GModel::current()->getGEOInternals()->PhysicalGroups); i++){
+    PhysicalGroup *p = *(PhysicalGroup**)List_Pointer
+      (GModel::current()->getGEOInternals()->PhysicalGroups, i);
+    if(p->Typ == MSH_PHYSICAL_LINE){
+      for(int j = 0; j < List_Nbr(p->Entities); j++){
+        int num;
+        List_Read(p->Entities, j, &num);
+        c2 = FindCurve(std::abs(num), curves2delete);
+        if(c2){
+          if(!(pc2 = (Curve **)Tree_PQuery(allNonDuplicatedCurves, &c2)))
+            Msg::Error("Weird curve %d in Coherence", c2->Num);
+          else
+            List_Write(p->Entities, j, &(*pc2)->Num);
+        }
+      }
+    }
+  }
+
+  Tree_Action(curves2delete, Free_Curve);
+  Tree_Delete(curves2delete);
+  Tree_Delete(allNonDuplicatedCurves);
+}
+
+// Modified By Trevor Strickler
+static void ReplaceDuplicateSurfaces(std::map<int, int> *s_report = 0)
+{
+  Surface *s, *s2, **ps, **ps2;
+  Volume *vol;
+  Tree_T *surfaces2delete = Tree_Create(sizeof(Surface *), compareSurface);
+  Tree_T *allNonDuplicatedSurfaces = Tree_Create(sizeof(Surface *), compareTwoSurfaces);
+
+  // Create unique surfaces
+
+  int start = Tree_Nbr(GModel::current()->getGEOInternals()->Surfaces);
+
+  List_T *All = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
+  for(int i = 0; i < List_Nbr(All); i++) {
+    List_Read(All, i, &s);
+    if(s->Num > 0) {
+      if(!Tree_Search(allNonDuplicatedSurfaces, &s)) {
+        Tree_Insert(allNonDuplicatedSurfaces, &s);
+      }
+      else {
+        Tree_Suppress(GModel::current()->getGEOInternals()->Surfaces, &s);
+        Tree_Insert(surfaces2delete, &s);
+      // Trevor Strickler
+	if(s_report){
+	  std::map<int, int>::iterator m_it = (*s_report).find(s->Num);
+	  if( m_it != s_report->end() ){
+	    Surface **s_rep = (Surface **)Tree_PQuery(allNonDuplicatedSurfaces, &s);
+	    m_it->second = (*s_rep)->Num;
+	  }
+	}
+      }
+    }
+  }
+  List_Delete(All);
+
+  int end = Tree_Nbr(GModel::current()->getGEOInternals()->Surfaces);
+
+  if(start == end) {
+    Tree_Delete(surfaces2delete);
+    Tree_Delete(allNonDuplicatedSurfaces);
+    return;
+  }
+
+  Msg::Debug("Removed %d duplicate surfaces", start - end);
+
+  if(CTX::instance()->geom.oldNewreg) {
+    GModel::current()->getGEOInternals()->MaxSurfaceNum = 0;
+    Tree_Action(GModel::current()->getGEOInternals()->Surfaces, MaxNumSurface);
+  }
+
+  // Replace old surfaces in surfaces
+
+  All = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
+  for(int i = 0; i < List_Nbr(All); i++) {
+    List_Read(All, i, &s);
+    // replace extrusion sources
+    if(s->Extrude && s->Extrude->geo.Mode == COPIED_ENTITY){
+      s2 = FindSurface(std::abs(s->Extrude->geo.Source), surfaces2delete);
+      if(s2){
+        if(!(ps2 = (Surface **)Tree_PQuery(allNonDuplicatedSurfaces, &s2)))
+          Msg::Error("Weird surface %d in Coherence", s2->Num);
+        else
+          s->Extrude->geo.Source = (*ps2)->Num;
+      }
+    }
+  }
+  List_Delete(All);
+
+  // Replace old surfaces in volumes
+
+  All = Tree2List(GModel::current()->getGEOInternals()->Volumes);
+  for(int i = 0; i < List_Nbr(All); i++) {
+    List_Read(All, i, &vol);
+    // replace bounding surfaces
+    for(int j = 0; j < List_Nbr(vol->Surfaces); j++) {
+      ps = (Surface **)List_Pointer(vol->Surfaces, j);
+      if(!(ps2 = (Surface **)Tree_PQuery(allNonDuplicatedSurfaces, ps)))
+        Msg::Error("Weird surface %d in Coherence", (*ps)->Num);
+      else
+        List_Write(vol->Surfaces, j, ps2);
+    }
+    // replace extrusion sources
+    if(vol->Extrude && vol->Extrude->geo.Mode == EXTRUDED_ENTITY){
+      s2 = FindSurface(std::abs(vol->Extrude->geo.Source), surfaces2delete);
+      if(s2){
+        if(!(ps2 = (Surface **)Tree_PQuery(allNonDuplicatedSurfaces, &s2)))
+          Msg::Error("Weird surface %d in Coherence", s2->Num);
+        else
+          vol->Extrude->geo.Source = (*ps2)->Num;
+      }
+    }
+  }
+  List_Delete(All);
+
+  // Replace old surfaces in physical groups
+  for(int i = 0; i < List_Nbr(GModel::current()->getGEOInternals()->PhysicalGroups); i++){
+    PhysicalGroup *p = *(PhysicalGroup**)List_Pointer
+      (GModel::current()->getGEOInternals()->PhysicalGroups, i);
+    if(p->Typ == MSH_PHYSICAL_SURFACE){
+      for(int j = 0; j < List_Nbr(p->Entities); j++){
+        int num;
+        List_Read(p->Entities, j, &num);
+        s2 = FindSurface(std::abs(num), surfaces2delete);
+        if(s2){
+          if(!(ps2 = (Surface **)Tree_PQuery(allNonDuplicatedSurfaces, &s2)))
+            Msg::Error("Weird surface %d in Coherence", s2->Num);
+          else
+            List_Write(p->Entities, j, &(*ps2)->Num);
         }
       }
-      break;
-    default:
-      Msg::Error("Impossible to extrude entity %d (of type %d)",
-                 shape.Num, shape.Type);
-      break;
     }
   }
 
+  Tree_Action(surfaces2delete, Free_Surface);
+  Tree_Delete(surfaces2delete);
+  Tree_Delete(allNonDuplicatedSurfaces);
 }
 
-// Duplicate removal
-
-static int compareTwoPoints(const void *a, const void *b)
+// Trevor Strickler added argument to return select changed shape nums
+// this is needed to set chapeau correctly in situations where chapeau gets replaced!
+// report has a default argument of zero.
+static void ReplaceAllDuplicates(std::vector<std::map<int, int> > &report)
 {
+  std::map<int, int>  *vertex_report = 0;
+  std::map<int, int>  *curve_report = 0;
+  std::map<int, int>  *surface_report = 0;
+  if( report.size() >=1 && report[0].size() )
+    vertex_report = &(report[0]);
+  if( report.size() >=2 && report[1].size() )
+    curve_report = &(report[1]);
+  if( report.size() >= 3 && report[2].size() )
+    surface_report = &(report[2]);
 
-  Vertex *q = *(Vertex **)a;
-  Vertex *w = *(Vertex **)b;
-
-  if(q->Typ != w->Typ)
-    return q->Typ - w->Typ;
+  ReplaceDuplicatePoints(vertex_report);
+  ReplaceDuplicateCurves(curve_report);
+  ReplaceDuplicateSurfaces(surface_report);
+}
 
-  if(q->boundaryLayerIndex != w->boundaryLayerIndex)
-    return q->boundaryLayerIndex - w->boundaryLayerIndex;
 
-  return comparePosition(a, b);
+// overloaded ReplaceAllDuplicates to keep old functionality with no danger of
+// default pointer argument = 0
+void ReplaceAllDuplicates()
+{
+  std::vector<std::map<int,int> > report;
+  report.clear();
+  ReplaceAllDuplicates(report);
 }
 
-static int compareTwoCurves(const void *a, const void *b)
+
+// Extrusion routines
+
+void ProtudeXYZ(double &x, double &y, double &z, ExtrudeParams *e)
 {
-  Curve *c1 = *(Curve **)a;
-  Curve *c2 = *(Curve **)b;
-  int comp;
+  double matrix[4][4];
+  double T[3];
+  Vertex v(x, y, z);
 
-  if(c1->Typ != c2->Typ){
-    if((c1->Typ == MSH_SEGM_CIRC && c2->Typ == MSH_SEGM_CIRC_INV) ||
-       (c1->Typ == MSH_SEGM_CIRC_INV && c2->Typ == MSH_SEGM_CIRC) ||
-       (c1->Typ == MSH_SEGM_ELLI && c2->Typ == MSH_SEGM_ELLI_INV) ||
-       (c1->Typ == MSH_SEGM_ELLI_INV && c2->Typ == MSH_SEGM_ELLI)){
-      // this is still ok
-    }
-    else
-      return c1->Typ - c2->Typ;
-  }
+  T[0] = -e->geo.pt[0];
+  T[1] = -e->geo.pt[1];
+  T[2] = -e->geo.pt[2];
+  SetTranslationMatrix(matrix, T);
+  List_Reset(ListOfTransformedPoints);
+  ApplyTransformationToPoint(matrix, &v);
 
-  if(List_Nbr(c1->Control_Points) != List_Nbr(c2->Control_Points))
-    return List_Nbr(c1->Control_Points) - List_Nbr(c2->Control_Points);
+  SetRotationMatrix(matrix, e->geo.axe, e->geo.angle);
+  List_Reset(ListOfTransformedPoints);
+  ApplyTransformationToPoint(matrix, &v);
 
-  if(!List_Nbr(c1->Control_Points)){
-    if(!c1->beg || !c2->beg)
-      return 1;
-    comp = compareVertex(&c1->beg, &c2->beg);
-    if(comp)
-      return comp;
-    if(!c1->end || !c2->end)
-      return 1;
-    comp = compareVertex(&c1->end, &c2->end);
-    if(comp)
-      return comp;
-  }
-  else {
-    for(int i = 0; i < List_Nbr(c1->Control_Points); i++){
-      Vertex *v1, *v2;
-      List_Read(c1->Control_Points, i, &v1);
-      List_Read(c2->Control_Points, i, &v2);
-      comp = compareVertex(&v1, &v2);
-      if(comp)
-        return comp;
-    }
-  }
-  return 0;
+  T[0] = -T[0];
+  T[1] = -T[1];
+  T[2] = -T[2];
+  SetTranslationMatrix(matrix, T);
+  List_Reset(ListOfTransformedPoints);
+  ApplyTransformationToPoint(matrix, &v);
+
+  x = v.Pos.X;
+  y = v.Pos.Y;
+  z = v.Pos.Z;
+
+  List_Reset(ListOfTransformedPoints);
 }
 
-static int compareTwoSurfaces(const void *a, const void *b)
+int Extrude_ProtudePoint(int type, int ip,
+			 double T0, double T1, double T2,
+			 double A0, double A1, double A2,
+			 double X0, double X1, double X2, double alpha,
+			 Curve **pc, Curve **prc, int final,
+			 ExtrudeParams *e)
 {
-  Surface *s1 = *(Surface **)a;
-  Surface *s2 = *(Surface **)b;
+  double matrix[4][4], T[3], Ax[3], d;
+  Vertex V, *pv, *newp, *chapeau;
+  Curve *c;
+  int i;
 
-  // checking types is the "right thing" to do (see e.g. compareTwoCurves)
-  // but it would break backward compatibility (see e.g. tutorial/t2.geo),
-  // so let's just do it for boundary layer surfaces for now:
-  if(s1->Typ == MSH_SURF_BND_LAYER || s2->Typ == MSH_SURF_BND_LAYER ||
-     s1->Typ == MSH_SURF_COMPOUND || s2->Typ == MSH_SURF_COMPOUND ){
-    if(s1->Typ != s2->Typ) return s1->Typ - s2->Typ;
-  }
+  pv = &V;
+  pv->Num = ip;
+  *pc = *prc = NULL;
+  if(!Tree_Query(GModel::current()->getGEOInternals()->Points, &pv))
+    return 0;
 
-  // if both surfaces have no generatrices, stay on the safe side and
-  // assume they are different
-  if(!List_Nbr(s1->Generatrices) && !List_Nbr(s2->Generatrices))
-    return 1;
+  Msg::Debug("Extrude Point %d", ip);
+
+  chapeau = DuplicateVertex(pv);
+
+  switch (type) {
+  case TRANSLATE:
+    T[0] = T0;
+    T[1] = T1;
+    T[2] = T2;
+    SetTranslationMatrix(matrix, T);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToPoint(matrix, chapeau);
+    if(!comparePosition(&pv, &chapeau))
+      return pv->Num;
+    c = Create_Curve(NEWLINE(), MSH_SEGM_LINE, 1, NULL, NULL, -1, -1, 0., 1.);
+    c->Control_Points = List_Create(2, 1, sizeof(Vertex *));
+    c->Extrude = new ExtrudeParams;
+    c->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
+    if(e)
+      c->Extrude->mesh = e->mesh;
+    List_Add(c->Control_Points, &pv);
+    List_Add(c->Control_Points, &chapeau);
+    c->beg = pv;
+    c->end = chapeau;
+    break;
+  case BOUNDARY_LAYER:
+    chapeau->Typ = MSH_POINT_BND_LAYER;
+    if(e) chapeau->boundaryLayerIndex = e->mesh.BoundaryLayerIndex;
+    c = Create_Curve(NEWLINE(), MSH_SEGM_BND_LAYER, 1, NULL, NULL, -1, -1, 0., 1.);
+    c->Control_Points = List_Create(2, 1, sizeof(Vertex *));
+    c->Extrude = new ExtrudeParams;
+    c->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
+    if(e) c->Extrude->mesh = e->mesh;
+    List_Add(c->Control_Points, &pv);
+    List_Add(c->Control_Points, &chapeau);
+    c->beg = pv;
+    c->end = chapeau;
+    break;
+  case ROTATE:
+    T[0] = -X0;
+    T[1] = -X1;
+    T[2] = -X2;
+    SetTranslationMatrix(matrix, T);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToPoint(matrix, chapeau);
+    Ax[0] = A0;
+    Ax[1] = A1;
+    Ax[2] = A2;
+    SetRotationMatrix(matrix, Ax, alpha);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToPoint(matrix, chapeau);
+    T[0] = X0;
+    T[1] = X1;
+    T[2] = X2;
+    SetTranslationMatrix(matrix, T);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToPoint(matrix, chapeau);
+    if(!comparePosition(&pv, &chapeau))
+      return pv->Num;
+    c = Create_Curve(NEWLINE(), MSH_SEGM_CIRC, 1, NULL, NULL, -1, -1, 0., 1.);
+    c->Control_Points = List_Create(3, 1, sizeof(Vertex *));
+    c->Extrude = new ExtrudeParams;
+    c->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
+    if(e)
+      c->Extrude->mesh = e->mesh;
+    List_Add(c->Control_Points, &pv);
+    // compute circle center
+    newp = DuplicateVertex(pv);
+    Ax[0] = A0;
+    Ax[1] = A1;
+    Ax[2] = A2;
+    norme(Ax);
+    T[0] = pv->Pos.X - X0;
+    T[1] = pv->Pos.Y - X1;
+    T[2] = pv->Pos.Z - X2;
+    prosca(T, Ax, &d);
+    newp->Pos.X = X0 + d * Ax[0];
+    newp->Pos.Y = X1 + d * Ax[1];
+    newp->Pos.Z = X2 + d * Ax[2];
+    List_Add(c->Control_Points, &newp);
+    List_Add(c->Control_Points, &chapeau);
+    c->beg = pv;
+    c->end = chapeau;
+    break;
+  case TRANSLATE_ROTATE:
+    d = CTX::instance()->geom.extrudeSplinePoints;
+    d = d ? d : 1;
+    c = Create_Curve(NEWLINE(), MSH_SEGM_SPLN, 1, NULL, NULL, -1, -1, 0., 1.);
+    c->Control_Points =
+      List_Create(CTX::instance()->geom.extrudeSplinePoints + 1, 1, sizeof(Vertex *));
+    c->Extrude = new ExtrudeParams;
+    c->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
+    if(e)
+      c->Extrude->mesh = e->mesh;
+    List_Add(c->Control_Points, &pv);
+    c->beg = pv;
+    for(i = 0; i < CTX::instance()->geom.extrudeSplinePoints; i++) {
+      if(i)
+        chapeau = DuplicateVertex(chapeau);
+      T[0] = -X0;
+      T[1] = -X1;
+      T[2] = -X2;
+      SetTranslationMatrix(matrix, T);
+      List_Reset(ListOfTransformedPoints);
+      ApplyTransformationToPoint(matrix, chapeau);
+      Ax[0] = A0;
+      Ax[1] = A1;
+      Ax[2] = A2;
+      SetRotationMatrix(matrix, Ax, alpha / d);
+      List_Reset(ListOfTransformedPoints);
+      ApplyTransformationToPoint(matrix, chapeau);
+      T[0] = X0;
+      T[1] = X1;
+      T[2] = X2;
+      SetTranslationMatrix(matrix, T);
+      List_Reset(ListOfTransformedPoints);
+      ApplyTransformationToPoint(matrix, chapeau);
+      T[0] = T0 / d;
+      T[1] = T1 / d;
+      T[2] = T2 / d;
+      SetTranslationMatrix(matrix, T);
+      List_Reset(ListOfTransformedPoints);
+      ApplyTransformationToPoint(matrix, chapeau);
+      List_Add(c->Control_Points, &chapeau);
+    }
+    c->end = chapeau;
+    break;
+//  case ANALYTICAL:
+//
+//    break;
+  default:
+    Msg::Error("Unknown extrusion type");
+    return pv->Num;
+  }
 
-  return compare2Lists(s1->Generatrices, s2->Generatrices, compareAbsCurve);
-}
+  End_Curve(c);
+  Tree_Add(GModel::current()->getGEOInternals()->Curves, &c);
+  CreateReversedCurve(c);
+  *pc = c;
+  *prc = FindCurve(-c->Num);
 
-static void MaxNumPoint(void *a, void *b)
-{
-  Vertex *v = *(Vertex **)a;
-  GModel::current()->getGEOInternals()->MaxPointNum =
-    std::max(GModel::current()->getGEOInternals()->MaxPointNum, v->Num);
-}
+  List_Reset(ListOfTransformedPoints);
 
-static void MaxNumCurve(void *a, void *b)
-{
-  Curve *c = *(Curve **)a;
-  GModel::current()->getGEOInternals()->MaxLineNum =
-    std::max(GModel::current()->getGEOInternals()->MaxLineNum, c->Num);
-}
+  int chap_num = chapeau->Num;
 
-static void MaxNumSurface(void *a, void *b)
-{
-  Surface *s = *(Surface **)a;
-  GModel::current()->getGEOInternals()->MaxSurfaceNum =
-    std::max(GModel::current()->getGEOInternals()->MaxSurfaceNum, s->Num);
+  if(CTX::instance()->geom.autoCoherence && final){
+    // Trevor Strickler added to fix replaced Chapeau
+    std::vector<std::map<int, int> > report(3);
+    report[0][chapeau->Num] = chap_num;
+    ReplaceAllDuplicates(report);
+    std::map<int, int>::iterator m_it = (report[0]).find(chap_num);
+    if( m_it != (report[0]).end() )
+      chap_num = (report[0])[chap_num];
+    else
+      chap_num = 0;
+  }
+  return chap_num;
 }
 
-static void ReplaceDuplicatePoints()
+int Extrude_ProtudeCurve(int type, int ic,
+			 double T0, double T1, double T2,
+			 double A0, double A1, double A2,
+			 double X0, double X1, double X2, double alpha,
+			 Surface **ps, int final,
+			 ExtrudeParams *e)
 {
-  // FIXME: This routine is in fact logically wrong (the compareTwoPoints
-  // function used in the avl tree is not a appropriate comparison
-  // function). The fix is simple (use a multi dimensional tree, e.g.,
-  // MVertexPositionSet), but fixing the routine would break backward
-  // compatibility with old .geo files. This will be fixed in the new abstract
-  // GModel CAD creation routines.
-  Vertex *v, *v2, **pv, **pv2;
-  Curve *c;
+  double matrix[4][4], T[3], Ax[3];
+  Curve *CurveBeg, *CurveEnd;
+  Curve *ReverseChapeau, *ReverseBeg, *ReverseEnd;
+  Curve *pc, *revpc, *chapeau;
   Surface *s;
-  Volume *vol;
-  Tree_T *points2delete = Tree_Create(sizeof(Vertex *), compareVertex);
-  Tree_T *allNonDuplicatedPoints = Tree_Create(sizeof(Vertex *), compareTwoPoints);
 
-  // Create unique points
-
-  int start = Tree_Nbr(GModel::current()->getGEOInternals()->Points);
+  pc = FindCurve(ic);
+  revpc = FindCurve(-ic);
+  *ps = NULL;
 
-  List_T *All = Tree2List(GModel::current()->getGEOInternals()->Points);
-  for(int i = 0; i < List_Nbr(All); i++) {
-    List_Read(All, i, &v);
-    if(!Tree_Search(allNonDuplicatedPoints, &v)) {
-      Tree_Insert(allNonDuplicatedPoints, &v);
-    }
-    else {
-      Tree_Suppress(GModel::current()->getGEOInternals()->Points, &v);
-      Tree_Insert(points2delete, &v);
-    }
+  if(!pc || !revpc){
+    return 0;
   }
-  List_Delete(All);
-
-  int end = Tree_Nbr(GModel::current()->getGEOInternals()->Points);
 
-  if(start == end) {
-    Tree_Delete(points2delete);
-    Tree_Delete(allNonDuplicatedPoints);
-    return;
+  if(!pc->beg || !pc->end){
+    Msg::Error("Cannot extrude curve with no begin/end points");
+    return 0;
   }
 
-  Msg::Debug("Removed %d duplicate points", start - end);
+  Msg::Debug("Extrude Curve %d", ic);
 
-  if(CTX::instance()->geom.oldNewreg) {
-    GModel::current()->getGEOInternals()->MaxPointNum = 0;
-    Tree_Action(GModel::current()->getGEOInternals()->Points, MaxNumPoint);
-  }
+  chapeau = DuplicateCurve(pc, false);
 
-  // Replace old points in curves
+  chapeau->Extrude = new ExtrudeParams(COPIED_ENTITY);
+  chapeau->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
+  chapeau->Extrude->geo.Source = pc->Num;
+  if(e)
+    chapeau->Extrude->mesh = e->mesh;
 
-  All = Tree2List(GModel::current()->getGEOInternals()->Curves);
-  for(int i = 0; i < List_Nbr(All); i++) {
-    List_Read(All, i, &c);
-    // replace begin/end points
-    if(!Tree_Query(allNonDuplicatedPoints, &c->beg))
-      Msg::Error("Weird point %d in Coherence", c->beg->Num);
-    if(!Tree_Query(allNonDuplicatedPoints, &c->end))
-      Msg::Error("Weird point %d in Coherence", c->end->Num);
-    // replace control points
-    for(int j = 0; j < List_Nbr(c->Control_Points); j++) {
-      pv = (Vertex **)List_Pointer(c->Control_Points, j);
-      if(!(pv2 = (Vertex **)Tree_PQuery(allNonDuplicatedPoints, pv)))
-        Msg::Error("Weird point %d in Coherence", (*pv)->Num);
-      else
-        List_Write(c->Control_Points, j, pv2);
+  switch (type) {
+  case TRANSLATE:
+    T[0] = T0;
+    T[1] = T1;
+    T[2] = T2;
+    SetTranslationMatrix(matrix, T);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToCurve(matrix, chapeau);
+    break;
+  case BOUNDARY_LAYER:
+    chapeau->Typ = MSH_SEGM_BND_LAYER;
+    if(chapeau->beg){
+      chapeau->beg->Typ = MSH_POINT_BND_LAYER;
+      if(e) chapeau->beg->boundaryLayerIndex = e->mesh.BoundaryLayerIndex;
     }
-    // replace extrusion sources
-    if(c->Extrude && c->Extrude->geo.Mode == EXTRUDED_ENTITY){
-      v2 = FindPoint(std::abs(c->Extrude->geo.Source), points2delete);
-      if(v2){
-        if(!(pv2 = (Vertex **)Tree_PQuery(allNonDuplicatedPoints, &v2)))
-          Msg::Error("Weird point %d in Coherence", v2->Num);
-        else
-          c->Extrude->geo.Source = (*pv2)->Num;
-      }
+    if(chapeau->end){
+      chapeau->end->Typ = MSH_POINT_BND_LAYER;
+      if(e) chapeau->end->boundaryLayerIndex = e->mesh.BoundaryLayerIndex;
     }
-  }
-  List_Delete(All);
-
-  // Replace old points in surfaces
-
-  All = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
-  for(int i = 0; i < List_Nbr(All); i++) {
-    List_Read(All, i, &s);
-    // replace transfinite corners
-    for(int j = 0; j < List_Nbr(s->TrsfPoints); j++){
-      pv = (Vertex **)List_Pointer(s->TrsfPoints, j);
-      if(!(pv2 = (Vertex **)Tree_PQuery(allNonDuplicatedPoints, pv)))
-        Msg::Error("Weird point %d in Coherence", (*pv)->Num);
-      else
-        List_Write(s->TrsfPoints, j, pv2);
+    for(int i = 0; i < List_Nbr(chapeau->Control_Points); i++){
+      Vertex *v;
+      List_Read(chapeau->Control_Points, i, &v);
+      if(e) v->boundaryLayerIndex = e->mesh.BoundaryLayerIndex;
     }
+    revpc = FindCurve(-chapeau->Num);
+    if(revpc) revpc->Typ = MSH_SEGM_BND_LAYER;
+    break;
+  case ROTATE:
+    T[0] = -X0;
+    T[1] = -X1;
+    T[2] = -X2;
+    SetTranslationMatrix(matrix, T);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToCurve(matrix, chapeau);
+    Ax[0] = A0;
+    Ax[1] = A1;
+    Ax[2] = A2;
+    SetRotationMatrix(matrix, Ax, alpha);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToCurve(matrix, chapeau);
+    T[0] = X0;
+    T[1] = X1;
+    T[2] = X2;
+    SetTranslationMatrix(matrix, T);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToCurve(matrix, chapeau);
+    break;
+  case TRANSLATE_ROTATE:
+    T[0] = -X0;
+    T[1] = -X1;
+    T[2] = -X2;
+    SetTranslationMatrix(matrix, T);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToCurve(matrix, chapeau);
+    Ax[0] = A0;
+    Ax[1] = A1;
+    Ax[2] = A2;
+    SetRotationMatrix(matrix, Ax, alpha);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToCurve(matrix, chapeau);
+    T[0] = X0;
+    T[1] = X1;
+    T[2] = X2;
+    SetTranslationMatrix(matrix, T);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToCurve(matrix, chapeau);
+    T[0] = T0;
+    T[1] = T1;
+    T[2] = T2;
+    SetTranslationMatrix(matrix, T);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToCurve(matrix, chapeau);
+    break;
+  default:
+    Msg::Error("Unknown extrusion type");
+    return pc->Num;
   }
-  List_Delete(All);
 
-  // Replace old points in volumes
+  Extrude_ProtudePoint(type, pc->beg->Num, T0, T1, T2,
+                       A0, A1, A2, X0, X1, X2, alpha,
+                       &CurveBeg, &ReverseBeg, 0, e);
+  Extrude_ProtudePoint(type, pc->end->Num, T0, T1, T2,
+                       A0, A1, A2, X0, X1, X2, alpha,
+                       &CurveEnd, &ReverseEnd, 0, e);
 
-  All = Tree2List(GModel::current()->getGEOInternals()->Volumes);
-  for(int i = 0; i < List_Nbr(All); i++) {
-    List_Read(All, i, &vol);
-    // replace transfinite corners
-    for(int j = 0; j < List_Nbr(vol->TrsfPoints); j++){
-      pv = (Vertex **)List_Pointer(vol->TrsfPoints, j);
-      if(!(pv2 = (Vertex **)Tree_PQuery(allNonDuplicatedPoints, pv)))
-        Msg::Error("Weird point %d in Coherence", (*pv)->Num);
-      else
-        List_Write(vol->TrsfPoints, j, pv2);
-    }
+  if(!CurveBeg && !CurveEnd){
+    return pc->Num;
   }
-  List_Delete(All);
 
-  // Replace old points in physical groups
-  for(int i = 0; i < List_Nbr(GModel::current()->getGEOInternals()->PhysicalGroups); i++){
-    PhysicalGroup *p = *(PhysicalGroup**)List_Pointer
-      (GModel::current()->getGEOInternals()->PhysicalGroups, i);
-    if(p->Typ == MSH_PHYSICAL_POINT){
-      for(int j = 0; j < List_Nbr(p->Entities); j++){
-        int num;
-        List_Read(p->Entities, j, &num);
-        v2 = FindPoint(std::abs(num), points2delete);
-        if(v2){
-          if(!(pv2 = (Vertex **)Tree_PQuery(allNonDuplicatedPoints, &v2)))
-            Msg::Error("Weird point %d in Coherence", v2->Num);
-          else
-            List_Write(p->Entities, j, &(*pv2)->Num);
-        }
-      }
-    }
+  if(type == BOUNDARY_LAYER)
+    s = Create_Surface(NEWSURFACE(), MSH_SURF_BND_LAYER);
+  else if(!CurveBeg || !CurveEnd)
+    s = Create_Surface(NEWSURFACE(), MSH_SURF_TRIC);
+  else
+    s = Create_Surface(NEWSURFACE(), MSH_SURF_REGL);
+
+  s->Generatrices = List_Create(4, 1, sizeof(Curve *));
+  s->Extrude = new ExtrudeParams;
+  s->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
+  s->Extrude->geo.Source = pc->Num;
+  if(e)
+    s->Extrude->mesh = e->mesh;
+
+  ReverseChapeau = FindCurve(-chapeau->Num);
+
+  if(!CurveBeg) {
+    List_Add(s->Generatrices, &pc);
+    List_Add(s->Generatrices, &CurveEnd);
+    List_Add(s->Generatrices, &ReverseChapeau);
+  }
+  else if(!CurveEnd) {
+    List_Add(s->Generatrices, &ReverseChapeau);
+    List_Add(s->Generatrices, &ReverseBeg);
+    List_Add(s->Generatrices, &pc);
+  }
+  else {
+    List_Add(s->Generatrices, &pc);
+    List_Add(s->Generatrices, &CurveEnd);
+    List_Add(s->Generatrices, &ReverseChapeau);
+    List_Add(s->Generatrices, &ReverseBeg);
   }
 
-  Tree_Action(points2delete, Free_Vertex);
-  Tree_Delete(points2delete);
-  Tree_Delete(allNonDuplicatedPoints);
-}
+  End_Surface(s);
+  Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &s);
 
-static void ReplaceDuplicateCurves()
-{
-  Curve *c, *c2, **pc, **pc2;
-  Surface *s;
-  Tree_T *curves2delete = Tree_Create(sizeof(Curve *), compareCurve);
-  Tree_T *allNonDuplicatedCurves = Tree_Create(sizeof(Curve *), compareTwoCurves);
+  List_Reset(ListOfTransformedPoints);
 
-  // Create unique curves
+  *ps = s;
 
-  int start = Tree_Nbr(GModel::current()->getGEOInternals()->Curves);
+  int chap_num = chapeau->Num;
 
-  List_T *All = Tree2List(GModel::current()->getGEOInternals()->Curves);
-  for(int i = 0; i < List_Nbr(All); i++) {
-    List_Read(All, i, &c);
-    if(c->Num > 0) {
-      if(!Tree_Search(allNonDuplicatedCurves, &c)) {
-        Tree_Insert(allNonDuplicatedCurves, &c);
-        if(!(c2 = FindCurve(-c->Num))) {
-          Msg::Error("Unknown curve %d", -c->Num);
-          List_Delete(All);
-          return;
-        }
-        Tree_Insert(allNonDuplicatedCurves, &c2);
-      }
-      else {
-        Tree_Suppress(GModel::current()->getGEOInternals()->Curves, &c);
-        if(!(c2 = FindCurve(-c->Num))) {
-          Msg::Error("Unknown curve %d", -c->Num);
-          break;
-        }
-        Tree_Suppress(GModel::current()->getGEOInternals()->Curves, &c2);
-        Tree_Insert(curves2delete, &c);
-        Tree_Insert(curves2delete, &c2);
-      }
-    }
+  if(CTX::instance()->geom.autoCoherence && final){
+    // Trevor Strickler added to fix replaced Chapeau
+    std::vector<std::map<int, int> > report(3);
+    (report[1])[chap_num] = chap_num;
+    ReplaceAllDuplicates(report);
+    std::map<int, int>::iterator m_it = (report[1]).find(chap_num);
+    if( m_it != (report[1]).end() )
+      chap_num = (report[1])[chap_num];
+    else
+      chap_num = 0;
   }
-  List_Delete(All);
 
-  int end = Tree_Nbr(GModel::current()->getGEOInternals()->Curves);
+  return chap_num;
+}
 
-  if(start == end) {
-    Tree_Delete(curves2delete);
-    Tree_Delete(allNonDuplicatedCurves);
-    return;
-  }
 
-  Msg::Debug("Removed %d duplicate curves", start - end);
+int Extrude_ProtudeSurface(int type, int is,
+			   double T0, double T1, double T2,
+			   double A0, double A1, double A2,
+			   double X0, double X1, double X2, double alpha,
+			   Volume **pv, ExtrudeParams *e)
+{
+  double matrix[4][4], T[3], Ax[3];
+  Curve *c, *c2;
+  int i;
+  Surface *s, *ps, *chapeau;
 
-  if(CTX::instance()->geom.oldNewreg) {
-    GModel::current()->getGEOInternals()->MaxLineNum = 0;
-    Tree_Action(GModel::current()->getGEOInternals()->Curves, MaxNumCurve);
-  }
+  *pv = NULL;
 
-  // Replace old curves in curves
+  // 'is' can be negative, to signify that the surface orientation
+  // should be reversed. This orientation information is only used at
+  // the moment when creating boundary layers
+  if(!(ps = FindSurface(std::abs(is))))
+    return 0;
 
-  All = Tree2List(GModel::current()->getGEOInternals()->Curves);
-  for(int i = 0; i < List_Nbr(All); i++) {
-    List_Read(All, i, &c);
-    // replace extrusion sources
-    if(c->Extrude && c->Extrude->geo.Mode == COPIED_ENTITY){
-      c2 = FindCurve(std::abs(c->Extrude->geo.Source), curves2delete);
-      if(c2){
-        if(!(pc2 = (Curve **)Tree_PQuery(allNonDuplicatedCurves, &c2)))
-          Msg::Error("Weird curve %d in Coherence", c2->Num);
-        else
-          c->Extrude->geo.Source = (*pc2)->Num;
+  Msg::Debug("Extrude Surface %d", is);
+
+  chapeau = DuplicateSurface(ps, false);
+  chapeau->Extrude = new ExtrudeParams(COPIED_ENTITY);
+  chapeau->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
+  chapeau->Extrude->geo.Source = is; // not ps->Num: we need the sign info
+  if(e)
+    chapeau->Extrude->mesh = e->mesh;
+
+  for(i = 0; i < List_Nbr(chapeau->Generatrices); i++) {
+    List_Read(ps->Generatrices, i, &c2);
+    List_Read(chapeau->Generatrices, i, &c);
+    if(c->Num < 0){
+      int nn = -c->Num;
+      if(!(c = FindCurve(nn))) {
+        Msg::Error("Unknown curve %d", nn);
+        return ps->Num;
       }
     }
+    c->Extrude = new ExtrudeParams(COPIED_ENTITY);
+    c->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
+    // don't take the abs(): the sign of c2->Num is important (used
+    // when copying the mesh in the extrusion routine)
+    c->Extrude->geo.Source = c2->Num;
+    if(e)
+      c->Extrude->mesh = e->mesh;
   }
-  List_Delete(All);
 
-  // Replace old curves in surfaces
+  // FIXME: this is a really ugly hack for backward compatibility, so
+  // that we don't screw up the old .geo files too much. (Before
+  // version 1.54, we didn't always create new volumes during "Extrude
+  // Surface". Now we do, but with "CTX::instance()->geom.oldNewreg==1", this
+  // bumps the NEWREG() counter, and thus changes the whole automatic
+  // numbering sequence.) So we locally force oldNewreg to 0: in most
+  // cases, since we define points, curves, etc., before defining
+  // volumes, the NEWVOLUME() call below will return a fairly low
+  // number, that will not interfere with the other numbers...
+  int tmp = CTX::instance()->geom.oldNewreg;
+  CTX::instance()->geom.oldNewreg = 0;
+  Volume *v = Create_Volume(NEWVOLUME(), MSH_VOLUME);
+  CTX::instance()->geom.oldNewreg = tmp;
 
-  All = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
-  for(int i = 0; i < List_Nbr(All); i++) {
-    List_Read(All, i, &s);
-    // replace bounding curves
-    for(int j = 0; j < List_Nbr(s->Generatrices); j++) {
-      pc = (Curve **)List_Pointer(s->Generatrices, j);
-      if(!(pc2 = (Curve **)Tree_PQuery(allNonDuplicatedCurves, pc)))
-        Msg::Error("Weird curve %d in Coherence", (*pc)->Num);
-      else {
-        List_Write(s->Generatrices, j, pc2);
-        // arghhh: check compareTwoCurves!
-        End_Curve(*pc2);
-      }
-    }
-    // replace extrusion sources
-    if(s->Extrude && s->Extrude->geo.Mode == EXTRUDED_ENTITY){
-      c2 = FindCurve(std::abs(s->Extrude->geo.Source), curves2delete);
-      if(c2){
-        if(!(pc2 = (Curve **)Tree_PQuery(allNonDuplicatedCurves, &c2)))
-          Msg::Error("Weird curve %d in Coherence", c2->Num);
-        else
-          s->Extrude->geo.Source = (*pc2)->Num;
-      }
+  v->Extrude = new ExtrudeParams;
+  v->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha);
+  v->Extrude->geo.Source = is;
+  if(e)
+    v->Extrude->mesh = e->mesh;
+  int ori = -1;
+  List_Add(v->Surfaces, &ps);
+  List_Add(v->SurfacesOrientations, &ori);
+  ori = 1;
+  List_Add(v->Surfaces, &chapeau);
+  List_Add(v->SurfacesOrientations, &ori);
+
+  for(i = 0; i < List_Nbr(ps->Generatrices); i++) {
+    List_Read(ps->Generatrices, i, &c);
+    Extrude_ProtudeCurve(type, c->Num, T0, T1, T2, A0, A1, A2, X0, X1, X2,
+                         alpha, &s, 0, e);
+    if(s){
+      if(c->Num < 0)
+        ori = -1;
+      else
+        ori = 1;
+      List_Add(v->Surfaces, &s);
+      List_Add(v->SurfacesOrientations, &ori);
     }
   }
-  List_Delete(All);
 
-  // Replace old curves in physical groups
-  for(int i = 0; i < List_Nbr(GModel::current()->getGEOInternals()->PhysicalGroups); i++){
-    PhysicalGroup *p = *(PhysicalGroup**)List_Pointer
-      (GModel::current()->getGEOInternals()->PhysicalGroups, i);
-    if(p->Typ == MSH_PHYSICAL_LINE){
-      for(int j = 0; j < List_Nbr(p->Entities); j++){
-        int num;
-        List_Read(p->Entities, j, &num);
-        c2 = FindCurve(std::abs(num), curves2delete);
-        if(c2){
-          if(!(pc2 = (Curve **)Tree_PQuery(allNonDuplicatedCurves, &c2)))
-            Msg::Error("Weird curve %d in Coherence", c2->Num);
-          else
-            List_Write(p->Entities, j, &(*pc2)->Num);
-        }
+  switch (type) {
+  case TRANSLATE:
+    T[0] = T0;
+    T[1] = T1;
+    T[2] = T2;
+    SetTranslationMatrix(matrix, T);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToSurface(matrix, chapeau);
+    break;
+  case BOUNDARY_LAYER:
+    chapeau->Typ = MSH_SURF_BND_LAYER;
+    for(int i = 0; i < List_Nbr(chapeau->Generatrices); i++) {
+      List_Read(chapeau->Generatrices, i, &c);
+      c->Typ = MSH_SEGM_BND_LAYER;
+      c = FindCurve(-c->Num);
+      c->Typ = MSH_SEGM_BND_LAYER;
+      if(c->beg){
+        c->beg->Typ = MSH_POINT_BND_LAYER;
+        if(e) c->beg->boundaryLayerIndex = e->mesh.BoundaryLayerIndex;
+      }
+      if(c->end){
+        c->end->Typ = MSH_POINT_BND_LAYER;
+        if(e) c->end->boundaryLayerIndex = e->mesh.BoundaryLayerIndex;
+      }
+      for(int i = 0; i < List_Nbr(c->Control_Points); i++){
+        Vertex *v;
+        List_Read(c->Control_Points, i, &v);
+        if(e) v->boundaryLayerIndex = e->mesh.BoundaryLayerIndex;
       }
     }
+    break;
+  case ROTATE:
+    T[0] = -X0;
+    T[1] = -X1;
+    T[2] = -X2;
+    SetTranslationMatrix(matrix, T);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToSurface(matrix, chapeau);
+    Ax[0] = A0;
+    Ax[1] = A1;
+    Ax[2] = A2;
+    SetRotationMatrix(matrix, Ax, alpha);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToSurface(matrix, chapeau);
+    T[0] = X0;
+    T[1] = X1;
+    T[2] = X2;
+    SetTranslationMatrix(matrix, T);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToSurface(matrix, chapeau);
+    break;
+  case TRANSLATE_ROTATE:
+    T[0] = -X0;
+    T[1] = -X1;
+    T[2] = -X2;
+    SetTranslationMatrix(matrix, T);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToSurface(matrix, chapeau);
+    Ax[0] = A0;
+    Ax[1] = A1;
+    Ax[2] = A2;
+    SetRotationMatrix(matrix, Ax, alpha);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToSurface(matrix, chapeau);
+    T[0] = X0;
+    T[1] = X1;
+    T[2] = X2;
+    SetTranslationMatrix(matrix, T);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToSurface(matrix, chapeau);
+    T[0] = T0;
+    T[1] = T1;
+    T[2] = T2;
+    SetTranslationMatrix(matrix, T);
+    List_Reset(ListOfTransformedPoints);
+    ApplyTransformationToSurface(matrix, chapeau);
+    break;
+  default:
+    Msg::Error("Unknown extrusion type");
+    return ps->Num;
   }
 
-  Tree_Action(curves2delete, Free_Curve);
-  Tree_Delete(curves2delete);
-  Tree_Delete(allNonDuplicatedCurves);
-}
+  // this is done only for backward compatibility with the old
+  // numbering scheme
+  Tree_Suppress(GModel::current()->getGEOInternals()->Surfaces, &chapeau);
 
-static void ReplaceDuplicateSurfaces()
-{
-  Surface *s, *s2, **ps, **ps2;
-  Volume *vol;
-  Tree_T *surfaces2delete = Tree_Create(sizeof(Surface *), compareSurface);
-  Tree_T *allNonDuplicatedSurfaces = Tree_Create(sizeof(Surface *), compareTwoSurfaces);
+  chapeau->Num = NEWSURFACE();
 
-  // Create unique surfaces
+  GModel::current()->getGEOInternals()->MaxSurfaceNum = chapeau->Num;
+  Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &chapeau);
 
-  int start = Tree_Nbr(GModel::current()->getGEOInternals()->Surfaces);
+  Tree_Add(GModel::current()->getGEOInternals()->Volumes, &v);
 
-  List_T *All = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
-  for(int i = 0; i < List_Nbr(All); i++) {
-    List_Read(All, i, &s);
-    if(s->Num > 0) {
-      if(!Tree_Search(allNonDuplicatedSurfaces, &s)) {
-        Tree_Insert(allNonDuplicatedSurfaces, &s);
-      }
-      else {
-        Tree_Suppress(GModel::current()->getGEOInternals()->Surfaces, &s);
-        Tree_Insert(surfaces2delete, &s);
-      }
-    }
-  }
-  List_Delete(All);
+  *pv = v;
 
-  int end = Tree_Nbr(GModel::current()->getGEOInternals()->Surfaces);
+  int chap_num = chapeau->Num;
 
-  if(start == end) {
-    Tree_Delete(surfaces2delete);
-    Tree_Delete(allNonDuplicatedSurfaces);
-    return;
+  if(CTX::instance()->geom.autoCoherence){
+    // Trevor Strickler added to fix replaced Chapeau
+    std::vector<std::map<int, int> > report(3);
+    (report[2])[chap_num] = chap_num;
+    ReplaceAllDuplicates(report);
+    std::map<int, int>::iterator m_it = (report[2]).find(chap_num);
+    if( m_it != (report[2]).end() )
+      chap_num = (report[2])[chap_num];
+    else
+      chap_num = 0;
   }
 
-  Msg::Debug("Removed %d duplicate surfaces", start - end);
+  List_Reset(ListOfTransformedPoints);
 
-  if(CTX::instance()->geom.oldNewreg) {
-    GModel::current()->getGEOInternals()->MaxSurfaceNum = 0;
-    Tree_Action(GModel::current()->getGEOInternals()->Surfaces, MaxNumSurface);
-  }
 
-  // Replace old surfaces in surfaces
+  return chap_num;
+}
 
-  All = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
-  for(int i = 0; i < List_Nbr(All); i++) {
-    List_Read(All, i, &s);
-    // replace extrusion sources
-    if(s->Extrude && s->Extrude->geo.Mode == COPIED_ENTITY){
-      s2 = FindSurface(std::abs(s->Extrude->geo.Source), surfaces2delete);
-      if(s2){
-        if(!(ps2 = (Surface **)Tree_PQuery(allNonDuplicatedSurfaces, &s2)))
-          Msg::Error("Weird surface %d in Coherence", s2->Num);
-        else
-          s->Extrude->geo.Source = (*ps2)->Num;
-      }
-    }
-  }
-  List_Delete(All);
+void ExtrudeShape(int extrude_type, int shape_type, int shape_num,
+                  double T0, double T1, double T2,
+                  double A0, double A1, double A2,
+                  double X0, double X1, double X2, double alpha,
+                  ExtrudeParams *e,
+                  List_T *list_out)
+{
+  Shape shape;
+  shape.Type = shape_type;
+  shape.Num = shape_num;
+  List_T *tmp = List_Create(1, 1, sizeof(Shape));
+  List_Add(tmp, &shape);
+  ExtrudeShapes(extrude_type, tmp,
+                T0, T1, T2,
+                A0, A1, A2,
+                X0, X1, X2, alpha,
+                e,
+                list_out);
+  List_Delete(tmp);
+}
 
-  // Replace old surfaces in volumes
+void ExtrudeShapes(int type, List_T *list_in,
+                   double T0, double T1, double T2,
+                   double A0, double A1, double A2,
+                   double X0, double X1, double X2, double alpha,
+                   ExtrudeParams *e,
+                   List_T *list_out)
+{
 
-  All = Tree2List(GModel::current()->getGEOInternals()->Volumes);
-  for(int i = 0; i < List_Nbr(All); i++) {
-    List_Read(All, i, &vol);
-    // replace bounding surfaces
-    for(int j = 0; j < List_Nbr(vol->Surfaces); j++) {
-      ps = (Surface **)List_Pointer(vol->Surfaces, j);
-      if(!(ps2 = (Surface **)Tree_PQuery(allNonDuplicatedSurfaces, ps)))
-        Msg::Error("Weird surface %d in Coherence", (*ps)->Num);
-      else
-        List_Write(vol->Surfaces, j, ps2);
-    }
-    // replace extrusion sources
-    if(vol->Extrude && vol->Extrude->geo.Mode == EXTRUDED_ENTITY){
-      s2 = FindSurface(std::abs(vol->Extrude->geo.Source), surfaces2delete);
-      if(s2){
-        if(!(ps2 = (Surface **)Tree_PQuery(allNonDuplicatedSurfaces, &s2)))
-          Msg::Error("Weird surface %d in Coherence", s2->Num);
-        else
-          vol->Extrude->geo.Source = (*ps2)->Num;
+  for(int i = 0; i < List_Nbr(list_in); i++){
+    Shape shape;
+    List_Read(list_in, i, &shape);
+    switch(shape.Type){
+    case MSH_POINT:
+      {
+        Curve *pc = 0, *prc = 0;
+        Shape top;
+        top.Num = Extrude_ProtudePoint(type, shape.Num, T0, T1, T2,
+                                       A0, A1, A2, X0, X1, X2, alpha,
+                                       &pc, &prc, 1, e);
+        top.Type = MSH_POINT;
+        List_Add(list_out, &top);
+        if(pc){
+          Shape body;
+          body.Num = pc->Num;
+          body.Type = pc->Typ;
+          List_Add(list_out, &body);
+        }
       }
-    }
-  }
-  List_Delete(All);
+      break;
+    case MSH_SEGM_LINE:
+    case MSH_SEGM_SPLN:
+    case MSH_SEGM_BSPLN:
+    case MSH_SEGM_BEZIER:
+    case MSH_SEGM_CIRC:
+    case MSH_SEGM_CIRC_INV:
+    case MSH_SEGM_ELLI:
+    case MSH_SEGM_ELLI_INV:
+    case MSH_SEGM_NURBS:
+      {
+        Surface *ps = 0;
+        Shape top;
+        top.Num = Extrude_ProtudeCurve(type, shape.Num, T0, T1, T2,
+                                       A0, A1, A2, X0, X1, X2, alpha,
+                                       &ps, 1, e);
+        Curve *pc = FindCurve(top.Num);
+        top.Type = pc ? pc->Typ : 0;
+        List_Add(list_out, &top);
+        if(ps){
+          Shape body;
+          body.Num = ps->Num;
+          body.Type = ps->Typ;
+          List_Add(list_out, &body);
+          if(CTX::instance()->geom.extrudeReturnLateral){
+            for(int j = 0; j < List_Nbr(ps->Generatrices); j++){
+              Curve *c;
+              List_Read(ps->Generatrices, j, &c);
+              if(abs(c->Num) != shape.Num && abs(c->Num) != top.Num){
+                Shape side;
+                side.Num = c->Num;
+                side.Type = c->Typ;
+                List_Add(list_out, &side);
+              }
+            }
+          }
+        }
+      }
+      break;
+    case MSH_SURF_REGL:
+    case MSH_SURF_TRIC:
+    case MSH_SURF_PLAN:
+    case MSH_SURF_DISCRETE:
+    case MSH_SURF_COMPOUND:
+      {
+        // if statement by Trevor Strickler
+        if( shape.Type == MSH_SURF_COMPOUND ){
+          if( !(e && e->mesh.ExtrudeMesh) ){
+            Msg::Error("Impossible to extrude compound entity %d without also extruding mesh!",
+                       abs(shape.Num) );
+            break;
+          }
+        }
 
-  // Replace old surfaces in physical groups
-  for(int i = 0; i < List_Nbr(GModel::current()->getGEOInternals()->PhysicalGroups); i++){
-    PhysicalGroup *p = *(PhysicalGroup**)List_Pointer
-      (GModel::current()->getGEOInternals()->PhysicalGroups, i);
-    if(p->Typ == MSH_PHYSICAL_SURFACE){
-      for(int j = 0; j < List_Nbr(p->Entities); j++){
-        int num;
-        List_Read(p->Entities, j, &num);
-        s2 = FindSurface(std::abs(num), surfaces2delete);
-        if(s2){
-          if(!(ps2 = (Surface **)Tree_PQuery(allNonDuplicatedSurfaces, &s2)))
-            Msg::Error("Weird surface %d in Coherence", s2->Num);
-          else
-            List_Write(p->Entities, j, &(*ps2)->Num);
+        Volume *pv = 0;
+        Shape top;
+        top.Num = Extrude_ProtudeSurface(type, shape.Num, T0, T1, T2,
+                                         A0, A1, A2, X0, X1, X2, alpha,
+                                         &pv, e);
+        Surface *ps = FindSurface(top.Num);
+        top.Type = ps ? ps->Typ : 0;
+
+        List_Add(list_out, &top);
+        if(pv){
+          Shape body;
+          body.Num = pv->Num;
+          body.Type = pv->Typ;
+          List_Add(list_out, &body);
+          if(CTX::instance()->geom.extrudeReturnLateral){
+            for(int j = 0; j < List_Nbr(pv->Surfaces); j++){
+              Surface *s;
+              List_Read(pv->Surfaces, j, &s);
+              if(abs(s->Num) != shape.Num && abs(s->Num) != top.Num){
+                Shape side;
+                side.Num = s->Num;
+                side.Type = s->Typ;
+                List_Add(list_out, &side);
+              }
+            }
+          }
         }
       }
+      break;
+    default:
+      Msg::Error("Impossible to extrude entity %d (of type %d)",
+                 shape.Num, shape.Type);
+      break;
     }
   }
 
-  Tree_Action(surfaces2delete, Free_Surface);
-  Tree_Delete(surfaces2delete);
-  Tree_Delete(allNonDuplicatedSurfaces);
-}
-
-void ReplaceAllDuplicates()
-{
-  ReplaceDuplicatePoints();
-  ReplaceDuplicateCurves();
-  ReplaceDuplicateSurfaces();
 }
 
 // Projection of a point on a surface
@@ -3662,6 +3883,14 @@ void setSurfaceGeneratrices(Surface *s, List_T *loops)
   s->Generatrices = List_Create(4, 4, sizeof(Curve *));
   List_Delete(s->GeneratricesByTag);
   s->GeneratricesByTag = List_Create(4, 4, sizeof(int));
+  //trevor strickler
+  if(s->Typ == MSH_SURF_COMPOUND){
+    s->Generatrices = GetOrderedUniqueEdges(s);
+    if(!List_Nbr(s->Generatrices)){
+      Msg::Error("Could not make generatrices list for compound surface %d.",s->Num);
+      return;
+    }
+  }
   for(int i = 0; i < nbLoop; i++) {
     int iLoop;
     List_Read(loops, i, &iLoop);
diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp
index a1474e1c00e4dada8f1390e7e2644c106d8929c9..4f1452d22cba5c262f837867c809e10b17c8fab3 100644
--- a/Geo/MElement.cpp
+++ b/Geo/MElement.cpp
@@ -1169,6 +1169,16 @@ void MElement::writeINP(FILE *fp, int num)
   fprintf(fp, "\n");
 }
 
+void MElement::writeSU2(FILE *fp, int num)
+{
+  setVolumePositive();
+  fprintf(fp, "%d ", getTypeForVTK());
+  for(int i = 0; i < getNumVertices(); i++)
+    fprintf(fp, "%d ", getVertexVTK(i)->getIndex() - 1);
+  if(num >= 0) fprintf(fp, "%d\n", num);
+  else fprintf(fp, "\n");
+}
+
 int MElement::getInfoMSH(const int typeMSH, const char **const name)
 {
   switch(typeMSH){
diff --git a/Geo/MElement.h b/Geo/MElement.h
index 9b7bfb9f9df40c81787751320bbb126e2c9d5e53..9cef0e28a73149cd72e68732942615edb0ecd146 100644
--- a/Geo/MElement.h
+++ b/Geo/MElement.h
@@ -343,6 +343,7 @@ class MElement
   virtual void writeDIFF(FILE *fp, int num, bool binary=false,
                          int physical_property=1);
   virtual void writeINP(FILE *fp, int num);
+  virtual void writeSU2(FILE *fp, int num);
 
   // info for specific IO formats (returning 0 means that the element
   // is not implemented in that format)
diff --git a/Geo/MVertex.cpp b/Geo/MVertex.cpp
index d06aa37af52c54529f9c461882d4f8cba5ee4d80..4238a82429160b41af6181a525e792f70bc84cb8 100644
--- a/Geo/MVertex.cpp
+++ b/Geo/MVertex.cpp
@@ -337,6 +337,18 @@ void MVertex::writeDIFF(FILE *fp, bool binary, double scalingFactor)
           _index, x() * scalingFactor, y() * scalingFactor, z() * scalingFactor);
 }
 
+void MVertex::writeSU2(FILE *fp, int dim, double scalingFactor)
+{
+  if(_index < 0) return; // negative index vertices are never saved
+
+  if(dim == 2)
+    fprintf(fp, "%.16g %.16g %d\n", x() * scalingFactor, y() * scalingFactor,
+             _index - 1);
+  else
+    fprintf(fp, "%.16g %.16g %.16g %d\n", x() * scalingFactor, y() * scalingFactor,
+            z() * scalingFactor, _index - 1);
+}
+
 std::set<MVertex*, MVertexLessThanLexicographic>::iterator
 MVertex::linearSearch(std::set<MVertex*, MVertexLessThanLexicographic> &pos)
 {
diff --git a/Geo/MVertex.h b/Geo/MVertex.h
index c35064a94852b689c3671bc0c211a4efcc9b2ed1..70038b6f4324587a2c4ad3e0e34aabfa186d2368 100644
--- a/Geo/MVertex.h
+++ b/Geo/MVertex.h
@@ -117,6 +117,7 @@ class MVertex{
   void writeBDF(FILE *fp, int format=0, double scalingFactor=1.0);
   void writeINP(FILE *fp, double scalingFactor=1.0);
   void writeDIFF(FILE *fp, bool binary, double scalingFactor=1.0);
+  void writeSU2(FILE *fp, int dim, double scalingFactor=1.0);
 };
 
 class MEdgeVertex : public MVertex{
diff --git a/Mesh/BoundaryLayers.cpp b/Mesh/BoundaryLayers.cpp
index 6459d2f6856b9f4f8b52562878a3129258025980..5e5864bb198920802909075089dc0d8d14bbb7de 100644
--- a/Mesh/BoundaryLayers.cpp
+++ b/Mesh/BoundaryLayers.cpp
@@ -13,6 +13,8 @@
 #include "meshGFace.h"
 #include "GmshMessage.h"
 #include "Field.h"
+// added by Trevor Strickler
+#include "GFaceCompound.h"
 
 #if defined(HAVE_POST)
 #include "PView.h"
@@ -22,9 +24,24 @@
 class OctreePost{ int dummy; };
 #endif
 
+// by Trevor Strickler
+static double GetAveEdgeLength(std::vector<MVertex*> &elem_verts)
+{
+  double ave = 0.0;
+  int size = elem_verts.size();
+  if(!size)
+    return 0.0;
+  for( int i = 0; i < size-1; i++ )
+    ave += elem_verts[i]->distance(elem_verts[i+1]);    
+  ave += elem_verts[0]->distance(elem_verts[size-1]);
+  ave /= size;
+  return ave;
+}
+
+// Trevor Strickler modified this function
 template<class T>
 static void addExtrudeNormals(std::vector<T*> &elements, int invert,
-                              OctreePost *octree, bool gouraud, int index)
+                              OctreePost *octree, bool gouraud, int index, bool skipScaleCalc)
 {
   if(index < 0 || index > 1){
     Msg::Error("Boundary layer index should be 0 or 1");
@@ -32,10 +49,29 @@ static void addExtrudeNormals(std::vector<T*> &elements, int invert,
   }
  
   if(octree && !gouraud){ // get extrusion direction from post-processing view
+    // Trevor Strickler modified this section heavily
     std::set<MVertex*> verts;
-    for(unsigned int i = 0; i < elements.size(); i++)
-      for(int j = 0; j < elements[i]->getNumVertices(); j++)
-        verts.insert(elements[i]->getVertex(j));
+    for(unsigned int i = 0; i < elements.size(); i++){
+      if( !ExtrudeParams::calcLayerScaleFactor[index] )  // Trevor Strickler
+	for(int j = 0; j < elements[i]->getNumVertices(); j++)
+          verts.insert(elements[i]->getVertex(j));
+      else{	// Trevor Strickler
+	std::vector<MVertex*> elem_verts;
+	double aveLength = 0.0;
+	elements[i]->getVertices(elem_verts);
+	if( skipScaleCalc )
+	  aveLength = 1.0;
+	else
+	  aveLength = GetAveEdgeLength(elem_verts);
+	for(unsigned int j = 0; j < elem_verts.size(); j++){
+	  verts.insert(elem_verts[j]);
+	  // Added by Trevor Strickler: if scaleLastLayer selection, but not doing gouraud, then still scale the last layer...
+	  // This might create weird behavior for the unprepared....
+	  if( aveLength != 0.0 )
+	    ExtrudeParams::normals[index]->add_scale(elem_verts[j]->x(), elem_verts[j]->y(), elem_verts[j]->z(), aveLength);
+	}
+      }
+    }
     for(std::set<MVertex*>::iterator it = verts.begin(); it != verts.end(); it++){
       MVertex *v = *it;
       double nn[3] = {0., 0., 0.};
@@ -55,9 +91,24 @@ static void addExtrudeNormals(std::vector<T*> &elements, int invert,
         n = crossprod(ele->getEdge(0).tangent(), SVector3(0., 0., 1.));
       if(invert) n *= -1.;
       double nn[3] = {n[0], n[1], n[2]};
-      for(int k = 0; k < ele->getNumVertices(); k++){
-        MVertex *v = ele->getVertex(k);
-        ExtrudeParams::normals[index]->add(v->x(), v->y(), v->z(), 3, nn);
+      if( !ExtrudeParams::calcLayerScaleFactor[index] )  // Trevor Strickler
+	for(int k = 0; k < ele->getNumVertices(); k++){
+          MVertex *v = ele->getVertex(k);
+          ExtrudeParams::normals[index]->add(v->x(), v->y(), v->z(), 3, nn);
+        }
+      else{  // Trevor Strickler
+	std::vector<MVertex*> elem_verts;
+	double aveLength = 0.0;
+	elements[i]->getVertices(elem_verts);
+	if( skipScaleCalc )
+	  aveLength = 1.0;
+	else
+	  aveLength = GetAveEdgeLength(elem_verts);
+	for(unsigned int j = 0; j < elem_verts.size(); j++){
+	  ExtrudeParams::normals[index]->add(elem_verts[j]->x(), elem_verts[j]->y(), elem_verts[j]->z(), 3, nn);
+	  if( aveLength != 0.0 )
+	    ExtrudeParams::normals[index]->add_scale(elem_verts[j]->x(), elem_verts[j]->y(), elem_verts[j]->z(), aveLength);
+	}
       }
     }
   }
@@ -65,9 +116,15 @@ static void addExtrudeNormals(std::vector<T*> &elements, int invert,
 
 typedef std::set<std::pair<bool, std::pair<int, int> > > infoset;
 
+// Trevor Strickler Modified this function
+//skipScaleCalcMap maps an entity tag to a flag telling whether to skip the 
+// scale calc when extruding only that entity.  The flag is false when an extrusion
+// is not scaleLast when in a boundary layer that has at least one scaleLast region.
+// Effectively, this makes the vertices on the boundary between a scaled and not 
+// scaled region 'average' between being scaled and not scaled.
 template<class T>
 static void addExtrudeNormals(std::set<T*> &entities,
-                              std::map<int, infoset> &infos)
+                              std::map<int, infoset> &infos, std::map<int, bool> &skipScaleCalcMap)
 {
   bool normalize = true, special3dbox = false, extrudeField=false;
   std::vector<OctreePost*> octrees;
@@ -103,11 +160,16 @@ static void addExtrudeNormals(std::set<T*> &entities,
           Msg::Error("Unknown View[%d]: using normals instead", view);
       }
 #endif
+      // Trevor Strickler
+      bool skipScaleCalc = true;
+      std::map<int, bool>::iterator itskip = skipScaleCalcMap.find(ge->tag());
+      if( itskip != skipScaleCalcMap.end() )
+	skipScaleCalc = skipScaleCalcMap[ge->tag()];
       if(ge->dim() == 1)
-        addExtrudeNormals(((GEdge*)ge)->lines, invert, octree, gouraud, index);
+	addExtrudeNormals(((GEdge*)ge)->lines, invert, octree, gouraud, index, skipScaleCalc );
       else if(ge->dim() == 2){
-        addExtrudeNormals(((GFace*)ge)->triangles, invert, octree, gouraud, index);
-        addExtrudeNormals(((GFace*)ge)->quadrangles, invert, octree, gouraud, index);
+        addExtrudeNormals(((GFace*)ge)->triangles, invert, octree, gouraud, index, skipScaleCalc );
+        addExtrudeNormals(((GFace*)ge)->quadrangles, invert, octree, gouraud, index, skipScaleCalc );
       }
       if(!gouraud) normalize = false;
     }
@@ -183,6 +245,71 @@ static void checkDepends(GModel *m, GFace *f, std::set<GFace*> &dep)
     dep.insert(from);
     checkDepends(m, from, dep);
   }
+  
+  // Added by Trevor Strickler for compound face extrusion
+  if( f->geomType() == GEntity::CompoundSurface ){
+    std::list<GFace*> compounds = ((GFaceCompound*)(f))->getCompounds();
+    std::list<GFace*>::iterator itgf = compounds.begin();
+    for( ; itgf != compounds.end(); itgf++ ){
+      if( !(*itgf) ){
+        Msg::Error("Unknown compound face in boundary layer source face %d.",  f->tag() );
+        return;
+      }
+      dep.insert( *itgf );
+      checkDepends(m, *itgf, dep);
+    }
+  }
+  
+}
+
+// Trevor Strickler
+static unsigned int FixErasedExtrScaleFlags(GModel *m, std::map<int, bool> &faceSkipScaleCalc, std::map<int, bool> &edgeSkipScaleCalc)
+{
+  unsigned int num_changed = 0;
+  std::set<GRegion *, GEntityLessThan>::iterator itreg;
+  // fix all extruded faces bordering ScaleLast regions
+  for( itreg = m->firstRegion(); itreg != m->lastRegion(); itreg++ ){
+    ExtrudeParams *r_ep = (*itreg)->meshAttributes.extrude;
+    if(!r_ep || !r_ep->mesh.ExtrudeMesh || r_ep->geo.Mode != EXTRUDED_ENTITY 
+        || !r_ep->mesh.ScaleLast )
+      continue;
+    std::list<GFace *> reg_faces = (*itreg)->faces();
+    std::list<GFace *>::iterator itface;
+    for( itface = reg_faces.begin(); itface != reg_faces.end(); itface++ ){
+      if( m->getFaceByTag( std::abs(r_ep->geo.Source) ) != (*itface) ){
+	ExtrudeParams *f_ep = (*itface)->meshAttributes.extrude;
+	if(f_ep && f_ep->mesh.ExtrudeMesh && !f_ep->mesh.ScaleLast){
+	  num_changed++;
+	  f_ep->mesh.ScaleLast = true;
+	  faceSkipScaleCalc[(*itface)->tag()] = false;
+	}
+      }
+    }
+  }
+  // fix all extruded curves bordering ScaleLast faces...the previous loop should
+  // have fixed any replaced extruded faces.  if a face is not bordering a region,
+  // then it would not have been replaced except by a pointless degenerate extrusion
+  // right on it...which makes no sense anyway.
+  // So... just loop through faces.
+  for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++){
+    ExtrudeParams *f_ep = (*it)->meshAttributes.extrude;
+    if(!f_ep || !f_ep->mesh.ExtrudeMesh || !f_ep->mesh.ScaleLast )
+      continue;
+    std::list<GEdge *> f_edges = (*it)->edges();
+    std::list<GEdge *>::iterator itedge;
+    for( itedge = f_edges.begin(); itedge != f_edges.end(); itedge++ ){
+      if( m->getEdgeByTag( std::abs(f_ep->geo.Source) ) != (*itedge) ){
+	ExtrudeParams *e_ep = (*itedge)->meshAttributes.extrude;
+	if( e_ep && e_ep->mesh.ExtrudeMesh && !e_ep->mesh.ScaleLast ){
+	  num_changed++;
+	  e_ep->mesh.ScaleLast = true;
+	  edgeSkipScaleCalc[(*itedge)->tag()] = false;
+	}
+      }
+    }
+  }
+  
+  return num_changed;
 }
 
 int Mesh2DWithBoundaryLayers(GModel *m)
@@ -190,7 +317,10 @@ int Mesh2DWithBoundaryLayers(GModel *m)
   std::set<GFace*> sourceFaces, otherFaces;
   std::set<GEdge*> sourceEdges, otherEdges;
   std::map<int, infoset> sourceFaceInfo, sourceEdgeInfo;
-
+  std::map<int, bool> faceSkipScaleCalc, edgeSkipScaleCalc; // Trevor Strickler
+  ExtrudeParams::calcLayerScaleFactor[0] = 0; // Trevor Strickler
+  ExtrudeParams::calcLayerScaleFactor[1] = 0; // Trevor Strickler
+  
   // 2D boundary layers
   for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++){
     GEdge *ge = *it;
@@ -208,6 +338,18 @@ int Mesh2DWithBoundaryLayers(GModel *m)
            (ep->mesh.BoundaryLayerIndex, ep->mesh.ViewIndex));
         sourceEdgeInfo[from->tag()].insert(tags);
         sourceEdges.insert(from);
+	// Trevor Strickler
+        // Added by Trevor Strickler to scale last layer size locally
+	// Do not worry if one section of the boundary layer index = 0 or 1  is not supposed to be
+	// scaled...that section's normals will have scaleFactor = 1.0 (exactly  1.0 to all sig figs)
+	// ...however, if that non-scaled
+	// section borders a scaled section, the boundary normals will extrude scaled.
+	if( !ep->mesh.ScaleLast )
+	  edgeSkipScaleCalc[from->tag()] = true;
+        else{
+	  edgeSkipScaleCalc[from->tag()] = false;
+	  ExtrudeParams::calcLayerScaleFactor[ep->mesh.BoundaryLayerIndex] = true;
+	}
       }
     }
   }
@@ -229,14 +371,43 @@ int Mesh2DWithBoundaryLayers(GModel *m)
            (ep->mesh.BoundaryLayerIndex, ep->mesh.ViewIndex));
         sourceFaceInfo[from->tag()].insert(tags);
         sourceFaces.insert(from);
+        // Trevor Strickler
+	// Added by Trevor Strickler to scale last layer size locally
+	// Do not worry if one section of the boundary layer index = 0 or 1  is not supposed to be
+	// scaled...that section's normals will have scaleFactor = 1.0 (exactly  1.0 to all sig figs)
+	// ...however, if that non-scaled
+	// section borders a scaled section, the boundary normals will extrude scaled
+	if( !ep->mesh.ScaleLast )
+	  faceSkipScaleCalc[from->tag()] = true;
+        else{
+	  faceSkipScaleCalc[from->tag()] = false;
+	  ExtrudeParams::calcLayerScaleFactor[ep->mesh.BoundaryLayerIndex] = true;
+	}
         std::list<GEdge*> e = from->edges();
         sourceEdges.insert(e.begin(), e.end());
+        // by Trevor Strickler
+	for( std::list<GEdge*>::iterator ite = e.begin(); ite != e.end(); ite++ ){
+	  if( edgeSkipScaleCalc.find( (*ite)->tag() ) == edgeSkipScaleCalc.end() )
+	    edgeSkipScaleCalc[ (*ite)->tag() ] = true;  // a default
+	  if( ep->mesh.ScaleLast )
+	    edgeSkipScaleCalc[(*ite)->tag()] = false;
+	}
       }
     }
   }
 
   if(sourceEdges.empty() && sourceFaces.empty()) return 0;
 
+  // from Trevor Strickler -- Just in case ReplaceDuplicates() erases the ExtrudeParams::mesh.scaleLast
+  // flag, should check all bounding regions of this curve to see if scaleLast is set.
+  // if so, reset it in the extrudeParams (maybe this could be done in the TreeUtils....
+  // but I do not want to change the code too much and create a bug.
+  // The developers should decide that.
+  if( ExtrudeParams::calcLayerScaleFactor[0]  || ExtrudeParams::calcLayerScaleFactor[1] ){
+    unsigned int num_changed = FixErasedExtrScaleFlags(m, faceSkipScaleCalc, edgeSkipScaleCalc);
+    if( num_changed )
+      Msg::Warning("%d entities were changed from ScaleLast = false to ScaleLast = true", num_changed);
+  }
   // compute mesh dependencies in source faces (so we can e.g. create
   // a boundary layer on an extruded mesh)
   std::set<GFace*> sourceFacesDependencies;
@@ -275,9 +446,9 @@ int Mesh2DWithBoundaryLayers(GModel *m)
     ExtrudeParams::normals[i] = new smooth_data();
   }
   if(sourceFaces.empty())
-    addExtrudeNormals(sourceEdges, sourceEdgeInfo);
+    addExtrudeNormals(sourceEdges, sourceEdgeInfo, edgeSkipScaleCalc);
   else
-    addExtrudeNormals(sourceFaces, sourceFaceInfo);
+    addExtrudeNormals(sourceFaces, sourceFaceInfo, faceSkipScaleCalc);
 
   // set the position of boundary layer points using the smooth normal
   // field
diff --git a/Mesh/QuadTriExtruded2D.cpp b/Mesh/QuadTriExtruded2D.cpp
index 079890013bbcfe533567f862bd49201a973df348..04e610d15787be41aacb046f334cc966efa802c6 100644
--- a/Mesh/QuadTriExtruded2D.cpp
+++ b/Mesh/QuadTriExtruded2D.cpp
@@ -36,12 +36,14 @@ GNU General Public License for more details.
 
 // By Geuzaine, Remacle...
 static void addTriangle(MVertex* v1, MVertex* v2, MVertex* v3,
-                        GFace *to, MElement* source)
+                        GFace *to)
 {
   MTriangle* newTri = new MTriangle(v1, v2, v3);
   to->triangles.push_back(newTri);
 }
 
+
+
 // The function that tests whether a 2D surface is a lateral of a valid QuadToTri
 // region and whether there are conflicts. If surface is not part of valid QuadToTri region
 // or if there are QuadToTri conflicts, return 0.  Note that RemoveDuplicateSurfaces()
@@ -126,17 +128,19 @@ int IsValidQuadToTriLateral(GFace *face, int *tri_quad_flag, bool *detectQuadToT
   bool detect_conflict = false;
 
 
-  // Set the tri_quad_flag that lets extrudeMesh override ep->Recombine;
+  // Set the tri_quad_flag that lets ExtrudeMesh override ep->Recombine;
   // tri_quad_values: 0 = no override, 1 = mesh as quads, 2 = mesh as triangles.
 
   // if this face is a free surface:
   if( adjacent_regions.size() == 1 ){
-    if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_SNGL_1_RECOMB ||
-        lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_DBL_1_RECOMB )
+    if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_NOVERTS_1_RECOMB ||
+        lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_ADDVERTS_1_RECOMB ){
       (*tri_quad_flag) = 1;
-    else if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_SNGL_1 ||
-             lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_DBL_1 )
+    }
+    if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_NOVERTS_1 ||
+        lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_ADDVERTS_1 ){
       (*tri_quad_flag) = 2;
+    }
     else
       (*tri_quad_flag) = 0;
   }
@@ -161,11 +165,11 @@ int IsValidQuadToTriLateral(GFace *face, int *tri_quad_flag, bool *detectQuadToT
     // neighboring extrusion.
     else if( adj_ep && adj_ep->mesh.ExtrudeMesh &&
              model->getFaceByTag( std::abs( adj_ep->geo.Source ) ) == face ){
-      if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_SNGL_1_RECOMB ||
-          lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_DBL_1_RECOMB )
+      if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_NOVERTS_1_RECOMB ||
+          lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_ADDVERTS_1_RECOMB )
         (*tri_quad_flag) = 1;
-      else if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_SNGL_1 ||
-               lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_DBL_1 )
+      else if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_NOVERTS_1 ||
+               lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_ADDVERTS_1 )
         (*tri_quad_flag) = 2;
       else
         (*tri_quad_flag) = 0;
@@ -178,15 +182,11 @@ int IsValidQuadToTriLateral(GFace *face, int *tri_quad_flag, bool *detectQuadToT
       else if( (adj_ep && !adj_ep->mesh.QuadToTri && !adj_ep->mesh.Recombine) ||
                (ep && !ep->mesh.QuadToTri && !ep->mesh.Recombine) )
         (*tri_quad_flag) = 2;
-      // if both are quadToTri and either are quadToTri recomblaterals, recombine
-      else if( ep->mesh.QuadToTri == QUADTRI_SNGL_1_RECOMB ||
-               (adj_ep && adj_ep->mesh.QuadToTri == QUADTRI_SNGL_1_RECOMB) )
-        (*tri_quad_flag) = 1;
-      else if( ep->mesh.QuadToTri == QUADTRI_DBL_1_RECOMB ||
-               (adj_ep && adj_ep->mesh.QuadToTri == QUADTRI_DBL_1_RECOMB) )
+      // if both are quadToTri ALWAYS try to recombine
+      else if( ep->mesh.QuadToTri && adj_ep && adj_ep->mesh.QuadToTri )
         (*tri_quad_flag) = 1;
       else
-        (*tri_quad_flag) = 2;
+        (*tri_quad_flag) = 0;
     }
     // any other adjacent surface, just default to the QuadToTri region's non-QuadToTri
     // default recombination method.  Any mistakes at this point are not this feature's.
@@ -210,8 +210,11 @@ int IsValidQuadToTriLateral(GFace *face, int *tri_quad_flag, bool *detectQuadToT
 
 // The function that tests whether a surface is a QuadToTri top surface and whether
 // there are conflicts. If surface is not a top for a valid QuadToTri region or if
-// there are QuadToTri conflicts, return 0.  Note that RemoveDuplicateSurfaces()
-// makes this DIFFICULT. Also, the type of QuadToTri interface is placed into the
+// there are QuadToTri conflicts, return 0.
+// if the surface turns out to be the source of a toroidal loop extrusion (which will then
+// NOT have geo.Mode == COPIED_ENTITY), return 2 (this will require special meshing considerations).
+// Note that RemoveDuplicateSurfaces() makes this DIFFICULT. 
+// Also, the type of QuadToTri interface is placed into the
 // pointer argument quadToTri. .
 // Added 2010-12-09.
 int IsValidQuadToTriTop(GFace *face, int *quadToTri, bool *detectQuadToTriTop)
@@ -219,8 +222,13 @@ int IsValidQuadToTriTop(GFace *face, int *quadToTri, bool *detectQuadToTriTop)
   (*quadToTri) = NO_QUADTRI;
   (*detectQuadToTriTop) = false;
 
+  int is_toroidal_quadtri = 0;
+  
   GModel *model = face->model();
 
+  // First thing is first: determine if this is a toroidal quadtri extrusion.  if so, can skip the  rest
+  
+  
   // It seems the member pointers to neighboring regions for extruded top faces are not set.
   // For now, have to loop through
   // ALL the regions to see if the presently considered face belongs to the region.
@@ -228,109 +236,128 @@ int IsValidQuadToTriTop(GFace *face, int *quadToTri, bool *detectQuadToTriTop)
   // whether the face is a top face of the region (including whether the region is even extruded).
   // After that information is determined, function can test for QuadToTri neighbor conflicts.
 
-  std::vector<GRegion *> top_regions;
-  std::vector<GRegion *> adjacent_regions;
-  std::vector<GRegion *> all_regions;
-  int numRegions = 0;
-  int numTopRegions = 0;
-
-  std::set<GRegion *, GEntityLessThan>::iterator itreg;
-  for( itreg = model->firstRegion(); itreg != model->lastRegion(); itreg++ )
-    all_regions.push_back( (*itreg) );
+  
 
-  for(unsigned int i_reg = 0; i_reg < all_regions.size(); i_reg++ ){
-
-    // save time
-    if( numRegions >= 2 )
-      break;
-
-    GRegion *region = all_regions[i_reg];
-
-    // is region in the current model's regions or is it deleted?
-    if( !FindVolume( ( region->tag() ) ) )
-      continue;
-
-    // does face belong to region?
-    std::list<GFace *> region_faces = std::list<GFace *>( region->faces() );
-    if( std::find( region_faces.begin(), region_faces.end(), face ) !=
-          region_faces.end() ){
-      adjacent_regions.push_back(region);
-      numRegions++;
+  
+  // first determine if this is toroidal quadtotri
+  is_toroidal_quadtri = IsInToroidalQuadToTri(face);
+  
+  if( is_toroidal_quadtri )
+    (*detectQuadToTriTop) = true;
+  else{
+    std::vector<GRegion *> top_regions;
+    std::vector<GRegion *> adjacent_regions;
+    std::vector<GRegion *> all_regions;
+    int numRegions = 0;
+    int numTopRegions = 0;
+    std::set<GRegion *, GEntityLessThan>::iterator itreg;
+
+    for( itreg = model->firstRegion(); itreg != model->lastRegion(); itreg++ )
+      all_regions.push_back( (*itreg) );
+
+    for(unsigned int i_reg = 0; i_reg < all_regions.size(); i_reg++ ){
+
+      // save time
+      if( numRegions >= 2 )
+	break;
+
+      GRegion *region = all_regions[i_reg];
+
+      // is region in the current model's regions or is it deleted?
+      if( !FindVolume( ( region->tag() ) ) )
+	continue;
+
+      // does face belong to region?
+      std::list<GFace *> region_faces = std::list<GFace *>( region->faces() );
+      if( std::find( region_faces.begin(), region_faces.end(), face ) !=
+	    region_faces.end() ){
+	adjacent_regions.push_back(region);
+	numRegions++;
+      }
+      else
+	continue;
+
+      // is region a structured extruded?
+      if( !(region->meshAttributes.extrude && region->meshAttributes.extrude->mesh.ExtrudeMesh &&
+	    region->meshAttributes.extrude->geo.Mode == EXTRUDED_ENTITY) )
+	continue;
+
+      // Test whether the face is a top for the region
+      if( IsSurfaceATopForRegion(region, face) ){
+	top_regions.push_back(region);
+	numTopRegions++;
+	if( region->meshAttributes.extrude->mesh.QuadToTri )
+	  (*detectQuadToTriTop) = true;
+      }
+	      
     }
-    else
-      continue;
+ 
+    // MAIN test of whether this is even a quadToTri extrusion lateral
+    // the only return 0 path that is NOT an error
+    if( !(*detectQuadToTriTop) )
+      return 0;
 
-    // is region extruded?
-    if( !region->meshAttributes.extrude )
-      continue;
-    if( region->meshAttributes.extrude->geo.Mode != EXTRUDED_ENTITY )
-      continue;
+    ExtrudeParams *ep = face->meshAttributes.extrude;
 
-    // Test whether the face is a top for the region
-    if( IsSurfaceATopForRegion(region, face) ){
-      top_regions.push_back(region);
-      numTopRegions++;
-      if( region->meshAttributes.extrude->mesh.QuadToTri )
-        (*detectQuadToTriTop) = true;
+    if(!ep && !is_toroidal_quadtri){
+      Msg::Error("In IsValidQuadToTriTop(), no extrude info for surface %d.",
+		face->tag() );
+      return 0;
     }
 
-  }
-
-  // MAIN test of whether this is even a quadToTri extrusion lateral
-  // the only return 0 path that is NOT an error
-  if( !(*detectQuadToTriTop) )
-    return 0;
-
-
-
-  ExtrudeParams *ep = face->meshAttributes.extrude;
+    if( ep->geo.Mode != COPIED_ENTITY ){
+      Msg::Error("In IsValidQuadToTriTop(), surface %d is not copied from source.",
+		face->tag() );
+      return 0;
+    }
 
-  if(!ep){
-    Msg::Error("In IsValidQuadToTriTop(), no extrude info for surface %d.",
-               face->tag() );
-    return 0;
-  }
+    if( ep->mesh.QuadToTri == 0){
+      Msg::Error("In IsValidQuadToTriTop(), surface %d was determined to be the top surface "
+		"for a QuadToTri extrusion, but does not have QuadToTri parameters set within itself.",
+		face->tag() );
+      return 0;
+    }
 
-  if( ep->geo.Mode != COPIED_ENTITY){
-    Msg::Error("In IsValidQuadToTriTop(), surface %d is not copied from source.",
-               face->tag() );
-    return 0;
-  }
+    GFace *face_source = model->getFaceByTag(std::abs(ep->geo.Source));
+    if(!face_source){
+      Msg::Error("In IsValidQuadToTriTop(), unknown source face number %d.",
+		  face->meshAttributes.extrude->geo.Source);
+      return 0;
+    }
 
-  if( ep->mesh.QuadToTri == 0){
-    Msg::Error("In IsValidQuadToTriTop(), surface %d was determined to be the top surface "
-               "for a QuadToTri extrusion, but does not have QuadToTri parameters set within itself.",
-               face->tag() );
-    return 0;
-  }
+    if(numRegions > 2){
+      Msg::Error("In IsValidQuadToTriTop(), too many regions adjacent to surface %d.",
+		face->tag() );
+      return 0;
+    }
 
-  GFace *face_source = model->getFaceByTag(std::abs(ep->geo.Source));
-  if(!face_source){
-    Msg::Error("In IsValidQuadToTriTop(), unknown source face number %d.",
-                 face->meshAttributes.extrude->geo.Source);
-    return 0;
-  }
 
-  if(numRegions > 2){
-    Msg::Error("In IsValidQuadToTriTop(), too many regions adjacent to surface %d.",
-               face->tag() );
-    return 0;
-  }
+    if( top_regions.size() ){
+      (*quadToTri) = top_regions[0]->meshAttributes.extrude->mesh.QuadToTri;
+    }
 
+    // Make sure that face is the top for only one region. if not, then there will likely
+    // be conflicts (two regions extruded into each other).
+    if( top_regions.size() > 1 ){
+      Msg::Error("In IsValidQuadToTriTop(), QuadToTri top surface %d identified as top "
+		"surface for more than one region. Likely conflict.",  face->tag() );
+      return 0;
+    }
 
-  if( top_regions.size() ){
-    (*quadToTri) = top_regions[0]->meshAttributes.extrude->mesh.QuadToTri;
-  }
+  }  // end of else that executes if NOT toroidal extrusion
 
-  // Make sure that face is the top for only one region. if not, then there will likely
-  // be conflicts (two regions extruded into each other).
-  if( top_regions.size() > 1 ){
-    Msg::Error("In IsValidQuadToTriTop(), QuadToTri top surface %d identified as top "
-               "surface for more than one region. Likely conflict.",  face->tag() );
+  
+  // this is technically redundant...but if changes are made, it's good to keep this here at the end for safety
+  if( !(*detectQuadToTriTop) )
     return 0;
-  }
 
-  return 1;
+  if( !is_toroidal_quadtri )
+    return 1;
+  else if( is_toroidal_quadtri == 1 )
+  { return 2;} // for toroidal extrusion
+  else
+    return 3;
+    
 }
 
 
@@ -394,8 +421,6 @@ static int MeshQuadToTriTopUnstructured(GFace *from, GFace *to,
       return 0;
     }
 
-    // make the element
-    MElement *element = from->quadrangles[i];
 
     // draw other diagonals to minimize difference in average edge length with diagonal length, in quadrature
 
@@ -410,12 +435,12 @@ static int MeshQuadToTriTopUnstructured(GFace *from, GFace *to,
     double d2 = verts[1]->distance(verts[3]);
 
     if(fabs(d1*d1-mag_sq_ave) <= fabs(d2*d2-mag_sq_ave) ){
-      addTriangle(verts[0],verts[1],verts[2],to,element);
-      addTriangle(verts[0],verts[2],verts[3],to,element);
+      addTriangle(verts[0],verts[1],verts[2],to);
+      addTriangle(verts[0],verts[2],verts[3],to);
     }
     else{
-      addTriangle(verts[1],verts[2],verts[3],to,element);
-      addTriangle(verts[1],verts[3],verts[0],to,element);
+      addTriangle(verts[1],verts[2],verts[3],to);
+      addTriangle(verts[1],verts[3],verts[0],to);
     }
   }
 
@@ -429,10 +454,10 @@ static int MeshQuadToTriTopUnstructured(GFace *from, GFace *to,
 //       'GFace *to' is the top surface to mesh, 'from' is the source surface, 'pos' is a std::set
 //       of vertex positions for the top surface.
 int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*,
-                             MVertexLessThanLexicographic> &pos)
+                             MVertexLessThanLexicographic> &pos )
 {
   if( !to->meshAttributes.extrude || !to->meshAttributes.extrude->mesh.QuadToTri  )
-    return 0;
+   return 0;
 
   // if the source is all triangles, then just let this function is not needed. Return 1.
   if( from->triangles.size() && !from->quadrangles.size() )
@@ -442,30 +467,26 @@ int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*,
   if( !from->triangles.size() && !from->quadrangles.size() )
     return 0;
 
+
   ExtrudeParams *ep = to->meshAttributes.extrude;
   if( !ep || !ep->mesh.ExtrudeMesh || !(ep->geo.Mode == COPIED_ENTITY) ){
     Msg::Error("In MeshQuadToTriTopSurface(), incomplete or no "
-               "extrude information for top face %d.", to->tag() );
+		"extrude information for top face %d.", to->tag() );
     return 0;
   }
-
-  // number of extrusion layers
-  int num_layers = 0;
-  for( int p = 0; p < ep->mesh.NbLayer; p++ )
-    num_layers += ep->mesh.NbElmLayer[p];
-
-  // is this a valid double layer extrusion?
-  bool is_dbl = false;
-  if( num_layers >= 2 && ( ep->mesh.QuadToTri == QUADTRI_DBL_1 || ep->mesh.QuadToTri == QUADTRI_DBL_1_RECOMB ) )
-    is_dbl = true;
-
-  // IF this is a SINGLE layer quadToTri, mesh the surfaces according to this modified
+  
+  // is this a quadtri extrusion with added vertices?
+  bool is_addverts = false;
+  if( ep && (ep->mesh.QuadToTri == QUADTRI_ADDVERTS_1 || ep->mesh.QuadToTri == QUADTRI_ADDVERTS_1_RECOMB) )
+    is_addverts = true;
+
+  // execute this section if 
+  // IF this is a 'no new vertices' quadToTri, mesh the surfaces according to this modified
   // least point value method: if a 3 boundary point quad, draw diagonals from middle corner toward
   // interior.  If a a 2- or 1- point boundary quad, draw toward lowest pointer number NOT on boundary.
   // All interior quad, draw diagonal to vertex with lowest pointer number.
 
-  if( !is_dbl ){
-
+  if( !is_addverts ){
     std::set<MVertex*, MVertexLessThanLexicographic> pos_src_edge;
     QuadToTriInsertFaceEdgeVertices(from, pos_src_edge);
     std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp;
@@ -540,17 +561,17 @@ int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*,
         low_index = getIndexForLowestVertexPointer(verts);
 
       addTriangle( verts[low_index],verts[(low_index+1)%verts.size()],
-                   verts[(low_index+2)%verts.size()],to,element);
+                   verts[(low_index+2)%verts.size()],to);
       addTriangle( verts[low_index],verts[(low_index+2)%verts.size()],
-                   verts[(low_index+3)%verts.size()],to,element);
+                   verts[(low_index+3)%verts.size()],to);
     }
     return 1;
   }
 
 
-  // AFTER THIS POINT IN FUNCTION, CODE IS ALL FOR DOUBLE LAYER EXTRUSIONS (Less restrictive).
+  // AFTER THIS POINT IN FUNCTION, CODE IS ALL FOR 'ADD INTERNAL VERTEX' EXTRUSIONS (Less restrictive).
 
-  // if double layer and unstructured, can try to make the top mesh a little neater
+  // if source face is unstructured, can try to make the top mesh a little neater
   GFace *root_source = findRootSourceFaceForFace( from );
   ExtrudeParams *ep_src = root_source->meshAttributes.extrude;
   bool struct_root = false;
@@ -562,7 +583,7 @@ int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*,
   if( !struct_root && MeshQuadToTriTopUnstructured(from, to, pos) )
     return 1;
 
-  // And top surface for a structured double layer can be meshed quite easily
+  // And top surface for the 'added internal vertex' method can be meshed quite easily
   else{
     std::set<MVertex *, MVertexLessThanLexicographic >::iterator itp;
     // loop through each element source quadrangle and extrude
@@ -597,10 +618,9 @@ int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*,
         return 0;
       }
 
-      // make the element
-      MElement *element = from->quadrangles[i];
-      addTriangle( verts[0],verts[2], verts[3],to,element);
-      addTriangle( verts[0],verts[1], verts[2],to,element);
+      // make the elements
+      addTriangle( verts[0],verts[2], verts[3],to);
+      addTriangle( verts[0],verts[1], verts[2],to);
     }
     return 1;
   }
diff --git a/Mesh/QuadTriExtruded2D.h b/Mesh/QuadTriExtruded2D.h
index 131a21bde372658afeb5890584d303de120604ae..329a842cfe2861061dddf4b173e6f3c9e12e44d0 100644
--- a/Mesh/QuadTriExtruded2D.h
+++ b/Mesh/QuadTriExtruded2D.h
@@ -53,6 +53,8 @@ GNU General Public License for more details.
 #include <math.h>
 #include "QuadTriUtils.h"
 
+
+
 // The function that tests whether a 2D surface is a lateral of a valid QuadToTri 
 // region and whether there are conflicts. If surface is not part of valid QuadToTri region 
 // or if there are QuadToTri conflicts, return 0.  Note that RemoveDuplicateSurfaces() 
@@ -78,6 +80,6 @@ int IsValidQuadToTriTop(GFace *face, int *quadToTri, bool *detectQuadToTriTop);
 //       'GFace *to' is the top surface to mesh, 'from' is the source surface, 'pos' is a std::set  
 //       of vertex positions for the top surface.
 int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*, 
-                             MVertexLessThanLexicographic> &pos);
+                             MVertexLessThanLexicographic> &pos );
 
 #endif
diff --git a/Mesh/QuadTriExtruded3D.cpp b/Mesh/QuadTriExtruded3D.cpp
index 079b83291ed40a73418a30349681c8ae20c9bfc7..acb2ddc6ecd0dd96cfd6453f09d99de718b9225b 100644
--- a/Mesh/QuadTriExtruded3D.cpp
+++ b/Mesh/QuadTriExtruded3D.cpp
@@ -270,7 +270,10 @@ bool IsValidQuadToTriRegion(GRegion *region, bool *allNonGlobalSharedLaterals)
                region->tag() );
     return false;
   }
-
+  
+  bool is_toroidal = IsInToroidalQuadToTri(reg_source);
+  GFace *root = findRootSourceFaceForFace(reg_source);
+  
   // Find a source surface. Then find a COPIED_ENTITY that is the top surface.
   // Then determine if all the laterals are either all quad or all triangle.
   // If shared laterals are all static (quad or non subdivide triangles),
@@ -278,15 +281,18 @@ bool IsValidQuadToTriRegion(GRegion *region, bool *allNonGlobalSharedLaterals)
   // If any lateral is unstructured, error.
 
   bool foundTop = false, foundSource = false,
-                  foundNoStruct = false;
+                  foundNoStruct = false, foundRoot = false;
 
   std::list<GFace *> faces = region->faces();
   std::list<GFace *>::iterator it = faces.begin();
 
   (*allNonGlobalSharedLaterals) = true;
 
+  
   for( it = faces.begin(); it != faces.end(); it++ ){
     ExtrudeParams *face_tmp_ep = (*it)->meshAttributes.extrude;
+    if( (*it) == root )
+      foundRoot = true;
     if( (*it) == reg_source )
       foundSource = true;
     else if( face_tmp_ep && face_tmp_ep->geo.Mode ==
@@ -303,6 +309,7 @@ bool IsValidQuadToTriRegion(GRegion *region, bool *allNonGlobalSharedLaterals)
       else if( top_source_tmp == reg_source &&
                !IsSurfaceALateralForRegion(region, *it) )
         foundTop = true;
+     
     }
     // This is a check to see if there are lateral surface triangles that need to be edged globally in subdivide operation
     else if( IsSurfaceALateralForRegion(region, *it) ){
@@ -317,11 +324,15 @@ bool IsValidQuadToTriRegion(GRegion *region, bool *allNonGlobalSharedLaterals)
           (*allNonGlobalSharedLaterals) = false;
       }
     }
-    else
+    else if( !is_toroidal )
       foundNoStruct = true;
   }
 
 
+  // if didn't find the copied entity, maybe this is toroidal and the top has been replaced
+  if( is_toroidal && !foundTop && foundRoot && root != reg_source )
+    foundTop = true;
+  
   // test for errors
   bool detectConflict = false;
   if( !foundTop ){
@@ -2377,34 +2388,46 @@ static bool QuadToTriGetRegionDiags(GRegion *gr,
     return false;
   }
 
-  // Find a source surface, find a COPIED_ENTITY that is the top surface,
+  // Find a source surface, find a COPIED_ENTITY that is the top surface, or if toroidal, find what is now the top
 
-  bool foundSource = false, foundTop = false;
+  bool foundSource = false, foundTop = false, foundRoot = false;
   GFace *reg_top = NULL;
+  GFace *root_face = NULL;
   std::list<GFace *> faces = gr->faces();
   std::list<GFace *>::iterator it = faces.begin();
 
+  // top faces in toroidal quadtri need special treatment
+  bool is_toroidal = IsInToroidalQuadToTri(reg_source);
+  if( is_toroidal )
+    root_face = findRootSourceFaceForFace(reg_source);
+  
   for( it = faces.begin(); it != faces.end(); it++ ){
     ExtrudeParams *face_tmp_ep = (*it)->meshAttributes.extrude;
+    if( (*it) == root_face )
+      foundRoot = true;
     if( (*it) == reg_source )
       foundSource = true;
     else if( face_tmp_ep && face_tmp_ep->geo.Mode ==
-        COPIED_ENTITY ){
+	COPIED_ENTITY ){
       GFace *top_source_tmp = model->getFaceByTag(
-                              std::abs( face_tmp_ep->geo.Source ) );
+			      std::abs( face_tmp_ep->geo.Source ) );
       if( !top_source_tmp ){
-        Msg::Error("In QuadToTriGetRegionDiags(), could not find source face "
-                   "%d for copied surface %d of region %d.",
-                   std::abs( face_tmp_ep->geo.Source ),
-                   (*it)->tag(), gr->tag() );
+	Msg::Error("In QuadToTriGetRegionDiags(), could not find source face "
+		  "%d for copied surface %d of region %d.",
+		  std::abs( face_tmp_ep->geo.Source ),
+		  (*it)->tag(), gr->tag() );
       }
       else if( top_source_tmp == reg_source ){
-        foundTop = true;
-        reg_top = (*it);
+	foundTop = true;
+	reg_top = (*it);
       }
     }
   }
 
+  if( !foundTop && is_toroidal && foundRoot && root_face != reg_source ){
+    foundTop = true;
+    reg_top = root_face;
+  }
   if( !foundTop )
     Msg::Warning("In QuadToTriGetRegionDiags(), could not find top face "
                "for region %d.", gr->tag() );
@@ -2427,14 +2450,29 @@ static bool QuadToTriGetRegionDiags(GRegion *gr,
         IsSurfaceALateralForRegion(gr, *it) ){
 
       // take care of forbidden edges
-      for( unsigned int i = 0; i < (*it)->quadrangles.size(); i++){
-        std::vector<MVertex*> v;
-        (*it)->quadrangles[i]->getVertices(v);
-        createForbidden(v, forbidden_edges );
-      }
-
-      // at this point, if there are no triangles or if there are quads, continue
-      if( !(*it)->triangles.size() || (*it)->quadrangles.size() )
+      // test whether this surface is a lateral bounded by two quadtri regions.
+      // if so, and the other is not already meshed, 
+      // then don't make these forbidden.  This is worked out in a 
+      // lateral remesh later
+      std::vector<GRegion *> adj_regions;
+      int numNeighbors = 0;
+      numNeighbors = GetNeighborRegionsOfFace((*it), adj_regions);
+      int ind_notcurrent = adj_regions[0] == gr ? 1 : 0;
+      if( !( numNeighbors == 2 && adj_regions[0]->meshAttributes.extrude && adj_regions[1]->meshAttributes.extrude &&
+	  adj_regions[0]->meshAttributes.extrude->mesh.ExtrudeMesh && adj_regions[1]->meshAttributes.extrude->mesh.ExtrudeMesh &&
+	  adj_regions[0]->meshAttributes.extrude->geo.Mode == EXTRUDED_ENTITY  && adj_regions[1]->meshAttributes.extrude->geo.Mode == EXTRUDED_ENTITY &&
+	  adj_regions[0]->meshAttributes.extrude->mesh.QuadToTri && adj_regions[1]->meshAttributes.extrude->mesh.QuadToTri  &&
+	  IsSurfaceALateralForRegion(adj_regions[ind_notcurrent], *it) &&
+	  !adj_regions[ind_notcurrent]->getNumMeshElements() ) ){
+	for( unsigned int i = 0; i < (*it)->quadrangles.size(); i++){
+          std::vector<MVertex*> v;
+	  (*it)->quadrangles[i]->getVertices(v);
+	  createForbidden(v, forbidden_edges );
+	}
+      }
+      
+      // at this point, if there are no triangles, continue
+      if( !(*it)->triangles.size() )
         continue;
 
       ExtrudeParams *face_ep_tmp = (*it)->meshAttributes.extrude;
@@ -2552,9 +2590,9 @@ static bool QuadToTriGetRegionDiags(GRegion *gr,
               else
                 createEdge( verts[diag.first+add], verts[diag.second-add], lat_tri_diags );
             }
-            else
-              Msg::Error("In QuadToTriGetRegionDiags(), failed to find a diagonal on unrecombined lateral surface %d.", (*it)->tag() );
-
+            else if( !(*it)->quadrangles.size() )
+              Msg::Error("In QuadToTriGetRegionDiags(), failed to find a diagonal in lateral surface %d.", (*it)->tag() );
+	  
             index_guess += 2;
              /*
 
@@ -2582,18 +2620,19 @@ static bool QuadToTriGetRegionDiags(GRegion *gr,
               else
                 createEdge( elemEdge_tmp.first, elemEdge_tmp.second, lat_tri_diags );
               */
-
+	  
           }
         }
       }
-    }
 
+    }
   }
-  // Insert diagonals of the COPIED top surface into quadToTri_edges;
+    
+  // Insert diagonals of the top surface into quadToTri_edges;
   unsigned int index_guess = reg_source->triangles.size();
-  if( reg_top->quadrangles.size() ){
+  if( reg_top->quadrangles.size() && !is_toroidal ){
     Msg::Error("In QuadToTriGetRegionDiags(), top surface of region "
-               "%d has quads.", gr->tag() );
+               "%d has quads in a non-toroidal QuadToTri extrusion.", gr->tag() );
     return false;
   }
 
@@ -2605,16 +2644,19 @@ static bool QuadToTriGetRegionDiags(GRegion *gr,
     std::vector<MVertex *> verts;
     get2DExtrudedVertices( elem, ep, j_top, k_top, pos, verts );
     if( verts.size() != 4 ) break;
-
-    // Find diagonal:
-    std::pair<int,int> diag(0,0);
-    diag = FindDiagonalEdgeIndices( verts, reg_top, false, index_guess );
-    if( diag.first || diag.second )
-      createEdge( verts[diag.first], verts[diag.second], quadToTri_edges );
+    if( !is_toroidal ){
+      // Find diagonal:
+      std::pair<int,int> diag(0,0);
+      diag = FindDiagonalEdgeIndices( verts, reg_top, false, index_guess );
+      if( diag.first || diag.second )
+	createEdge( verts[diag.first], verts[diag.second], quadToTri_edges );
+      else
+	  Msg::Error("In QuadToTriGetRegionDiags(), failed to find a diagonal on top surface %d, but should have.", reg_top->tag() );
+      index_guess += 2;
+    }
     else
-      Msg::Error("In QuadToTriGetRegionDiags(), failed to find a diagonal on top surface %d.", reg_top->tag() );
+      createForbidden(verts, forbidden_edges);
 
-    index_guess += 2;
   }
   return true;
 }
@@ -2623,7 +2665,7 @@ static bool QuadToTriGetRegionDiags(GRegion *gr,
 // For use in QuadToTriEdgeGenerator:  Controls BRUTE FORCE edging of elements with ALL vertices
 // on a lateral boundary surface.
 // Added 04/08/2011
-static int makeEdgesForElemsWithAllVertsOnBnd( GRegion *gr, bool is_dbl,
+static int makeEdgesForElemsWithAllVertsOnBnd( GRegion *gr, bool is_addverts,
                                                CategorizedSourceElements &cat_src_elems,
                                                std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
                                                std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
@@ -2672,8 +2714,8 @@ static int makeEdgesForElemsWithAllVertsOnBnd( GRegion *gr, bool is_dbl,
   // can afford temporary copies since these sets should be relatively small for all cases.
   std::set<unsigned int> tri_tmp, quad_tmp;
   tri_tmp = cat_src_elems.three_bnd_pt_tri;
-  // if is_dbl, then don't track the quads
-  if( !is_dbl )
+  // if is_addverts, then don't track the quads
+  if( !is_addverts )
     quad_tmp = cat_src_elems.four_bnd_pt_quad;
 
   while( tri_tmp.size() || quad_tmp.size() ){
@@ -2869,7 +2911,7 @@ static int makeEdgesForElemsWithAllVertsOnBnd( GRegion *gr, bool is_dbl,
 // For use in QuadToTriEdgeGenerator:  Does the edging of prisms with some but not all vertices
 // on a lateral boundary surface.
 // Added 04/08/2011
-static int makeEdgesForOtherBndPrisms( GRegion *gr, bool is_dbl, CategorizedSourceElements &cat_src_elems,
+static int makeEdgesForOtherBndPrisms( GRegion *gr, bool is_addverts, CategorizedSourceElements &cat_src_elems,
                                        std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
                                        std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
                                        std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
@@ -2996,7 +3038,7 @@ static int makeEdgesForOtherBndPrisms( GRegion *gr, bool is_dbl, CategorizedSour
 // For use in QuadToTriEdgeGenerator:  Does the edging of hexahedra with some but not all vertices
 // on a lateral boundary surface.
 // Added 04/08/2011
-static int makeEdgesForOtherBndHexa( GRegion *gr, bool is_dbl, CategorizedSourceElements &cat_src_elems,
+static int makeEdgesForOtherBndHexa( GRegion *gr, bool is_addverts, CategorizedSourceElements &cat_src_elems,
                                      std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
                                      std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
                                      std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
@@ -3320,7 +3362,7 @@ static int makeEdgesForOtherBndHexa( GRegion *gr, bool is_dbl, CategorizedSource
 // a pivot vertex of a hexahedral element that has ONE SOURCE vertex on a lateral boundary surface.
 // See inside function for a definition of the "pivot vertex."
 // Added 04/08/2011
- static int makeEdgesForElemsTouchPivotVert( GRegion *gr, bool is_dbl, CategorizedSourceElements &cat_src_elems,
+ static int makeEdgesForElemsTouchPivotVert( GRegion *gr, bool is_addverts, CategorizedSourceElements &cat_src_elems,
                                        std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
                                        std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
                                        std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
@@ -3546,7 +3588,7 @@ static int makeEdgesForOtherBndHexa( GRegion *gr, bool is_dbl, CategorizedSource
 // For use in QuadToTriEdgeGenerator:  Does the lateral edging of internal elements in the top extrusion
 // layer by lowest vertex pointer value in TOP FACE.
 // Added 04/08/2011
-static int makeEdgesInternalTopLayer( GRegion *gr, bool is_dbl, CategorizedSourceElements &cat_src_elems,
+static int makeEdgesInternalTopLayer( GRegion *gr, bool is_addverts, CategorizedSourceElements &cat_src_elems,
                                       std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
                                       std::set<MVertex*, MVertexLessThanLexicographic> &pos )
 {
@@ -3660,15 +3702,16 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
     return 0;
   }
 
+  
   // number of extrusion layers
   int num_layers = 0;
   for( int p = 0; p < ep->mesh.NbLayer; p++ )
     num_layers += ep->mesh.NbElmLayer[p];
 
-  // is this a valid double layer extrusion?
-  bool is_dbl = false;
-  if( num_layers >= 2 && ( ep->mesh.QuadToTri == QUADTRI_DBL_1 || ep->mesh.QuadToTri == QUADTRI_DBL_1_RECOMB ) )
-    is_dbl = true;
+  // is this a valid 'add internal vertex' extrusion?
+  bool is_addverts = false;
+  if( ep->mesh.QuadToTri == QUADTRI_ADDVERTS_1 || ep->mesh.QuadToTri == QUADTRI_ADDVERTS_1_RECOMB )
+    is_addverts = true;
 
 
   // now find and verify the source and the top of region
@@ -3680,20 +3723,32 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
     return 0;
   }
 
+  // need for toroidal loop extrusions...top layer treated specially
+  bool is_toroidal = IsInToroidalQuadToTri(reg_source);
+  
+  
   std::list<GFace *> reg_faces = gr->faces();
   std::list<GFace *>::iterator itf = reg_faces.begin();
 
-  // find top surface of extrusion
+  // find top surface of extrusion and first root dependency of source
   GFace *reg_top = NULL;
+  GFace *root = findRootSourceFaceForFace(reg_source);
+  bool foundRoot = false;
   for( itf = reg_faces.begin(); itf != reg_faces.end(); itf++ ){
     ExtrudeParams *face_ep = (*itf)->meshAttributes.extrude;
     if( face_ep && face_ep->geo.Mode == COPIED_ENTITY &&
         reg_source == model->getFaceByTag( std::abs(face_ep->geo.Source) ) ){
       reg_top = (*itf);
-      break;
     }
+    if( (*itf) == root )
+      foundRoot = true;
+    if( reg_top && (foundRoot || !is_toroidal) )
+      break;
+    
   }
-
+  
+  if( is_toroidal && !reg_top && foundRoot && root != reg_source )
+    reg_top = root;
   if( !reg_top ){
     Msg::Error("In QuadToTriEdgeGenerator(), invalid top surface for region "
                "%d.", gr->tag() );
@@ -3755,9 +3810,9 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
     }
   }*/
 
-  // if this is a double layer extrusion, don't need adjustable lateral edges, so
+  // if this is an' add internal vertex' extrusion, don't need adjustable lateral edges, so
   // put all lat_tri_diags into quadToTri_edges
-  if( is_dbl)
+  if( is_addverts)
     quadToTri_edges.insert(lat_tri_diags.begin(), lat_tri_diags.end());
 
   // If there are no lat_tri_diags and no quads, there is nothing  left to do
@@ -3765,14 +3820,14 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
     return 1;
 
 
-  // can return now if this is a double layer extrusion...nothing left to do
-  if( is_dbl )
+  // can return now if this is an 'add internal vertex' extrusion...nothing left to do
+  if( is_addverts )
     return 1;
 
 
   // BRUTE FORCE diagonalization of elements with all vertices on a lateral boundary of region:
   // This has to be done for all cases with such elements if
-  if( !makeEdgesForElemsWithAllVertsOnBnd( gr, is_dbl, cat_src_elems, quadToTri_edges,
+  if( !makeEdgesForElemsWithAllVertsOnBnd( gr, is_addverts, cat_src_elems, quadToTri_edges,
                                            lat_tri_diags, forbidden_edges, problems, pos ) ){
      Msg::Error("In QuadToTriEdgeGenerator(), failed to make edges for the elements in region %d "
                 "with all vertices on a lateral boundary", gr->tag() );
@@ -3783,7 +3838,7 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
 
 
   // Extrude source triangles that are on the source boundary edges and find any diagonals
-  if( !makeEdgesForOtherBndPrisms( gr, is_dbl, cat_src_elems, quadToTri_edges,
+  if( !makeEdgesForOtherBndPrisms( gr, is_addverts, cat_src_elems, quadToTri_edges,
                                    lat_tri_diags, forbidden_edges, problems, pos ) ){
     Msg::Error("In QuadToTriEdgeGenerator(), failed to make edges for the prism extrusions in region %d with "
                "source triangles having some but not all vertices on the boundary", gr->tag() );
@@ -3799,7 +3854,7 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
 
 
   // Edge creation for extruded quadrangles with some but not all vertices on a boundary.
-  if( !makeEdgesForOtherBndHexa( gr, is_dbl, cat_src_elems, quadToTri_edges,
+  if( !makeEdgesForOtherBndHexa( gr, is_addverts, cat_src_elems, quadToTri_edges,
                                  lat_tri_diags, forbidden_edges, problems, pos ) ){
     Msg::Error("In QuadToTriEdgeGenerator(), failed to make edges for the hexahedral extrusions in region %d with "
                "source quads having some but not all vertices on the boundary", gr->tag() );
@@ -3810,7 +3865,7 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
   // Find diagonals for elements touching a "pivot vertex" of a hexa element that has
   // a source quad with only one vertex on a lateral boundary (see inside makeEdgesForOtherBndHexa() and
   // makeEdgesForElemsTouchingPivotVert() for details of "pivot vertex".
-  if( !makeEdgesForElemsTouchPivotVert( gr, is_dbl, cat_src_elems, quadToTri_edges,
+  if( !makeEdgesForElemsTouchPivotVert( gr, is_addverts, cat_src_elems, quadToTri_edges,
                                         lat_tri_diags, forbidden_edges, pos ) ){
     Msg::Error("In QuadToTriEdgeGenerator(), failed to make edges for "
                "the elements in region %d touching a \'pivot vertex\' of a "
@@ -3820,7 +3875,7 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
 
   // Mesh internal elements in the top layer (just add lateral diagonals for the
   // Do this by lowest pointer in top surface
-  if( !makeEdgesInternalTopLayer( gr, is_dbl, cat_src_elems, quadToTri_edges, pos ) ){
+  if( !is_toroidal && !makeEdgesInternalTopLayer( gr, is_addverts, cat_src_elems, quadToTri_edges, pos ) ){
     Msg::Error("In QuadToTriEdgeGenerator(), failed to make internal edges "
                "in top extrusion layer of region %d.", gr->tag() );
     return 0;
@@ -3857,14 +3912,19 @@ static bool QuadToTriLateralRemesh( GRegion *gr, std::set<std::pair<MVertex*,MVe
   // If shared laterals are all static (quad or non subdivide triangles),
   // set the allStaticSharedLaterals argument to true.
   // If any lateral is unstructured, error.
-
-  bool foundTop = false;
+  
+  bool is_toroidal = IsInToroidalQuadToTri(reg_source);
+  GFace *root = findRootSourceFaceForFace(reg_source);
+  
+  bool foundTop = false, foundRoot = false;
   GFace *reg_top = NULL;
   std::list<GFace *> faces = gr->faces();
   std::list<GFace *>::iterator it = faces.begin();
 
   for( it = faces.begin(); it != faces.end(); it++ ){
     ExtrudeParams *face_tmp_ep = (*it)->meshAttributes.extrude;
+    if( (*it) == root )
+      foundRoot = true;
     if( face_tmp_ep && face_tmp_ep->geo.Mode ==
         COPIED_ENTITY ){
       GFace *top_source_tmp = model->getFaceByTag(
@@ -3882,6 +3942,10 @@ static bool QuadToTriLateralRemesh( GRegion *gr, std::set<std::pair<MVertex*,MVe
     }
   }
 
+    // if didn't find the copied entity, maybe this is toroidal and the top has been replaced
+  if( is_toroidal && !foundTop && foundRoot && root != reg_source )
+    foundTop = true;
+
   if( !foundTop )
     Msg::Warning("In QuadToTriLateralRemesh(), could not find top face "
                  "for region %d.", gr->tag() );
@@ -3891,11 +3955,9 @@ static bool QuadToTriLateralRemesh( GRegion *gr, std::set<std::pair<MVertex*,MVe
   // now loop through faces again, remeshing all laterals that need it.
   for( it = faces.begin(); it != faces.end(); it++ ){
     if( (*it) != reg_top && (*it) != reg_source &&
-        IsSurfaceALateralForRegion(gr, *it)
-        &&
-        (*it)->triangles.size() && !(*it)->quadrangles.size() ){
+        IsSurfaceALateralForRegion(gr, *it) ){
 
-      // *** JUST REMESH EVERY TRIANGLE SURFACE AGAIN TO BE SURE ***
+      // *** JUST REMESH EVERY SURFACE AGAIN TO BE SURE ***
 
       for(unsigned int i = 0; i < (*it)->triangles.size(); i++)
         delete (*it)->triangles[i];
@@ -3911,10 +3973,10 @@ static bool QuadToTriLateralRemesh( GRegion *gr, std::set<std::pair<MVertex*,MVe
 
 
 // Adds the face- or body-center vertices needed for some QuadToTri elements
-static bool addFaceOrBodyCenteredVertices( GRegion *to, CategorizedSourceElements &c,
+static bool addBodyCenteredVertices( GRegion *to, CategorizedSourceElements &c,
                                            std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
                                            std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
-                                           bool is_dbl, unsigned int lat_tri_diags_size,
+                                           bool is_addverts, unsigned int lat_tri_diags_size,
                                            std::set<MVertex *, MVertexLessThanLexicographic> &pos )
 {
 
@@ -3927,42 +3989,31 @@ static bool addFaceOrBodyCenteredVertices( GRegion *to, CategorizedSourceElement
   if( !from )
     return false;
 
-  // need these for double layer extrusion purposes
-  int j_second_from_top, k_second_from_top;
-  if( ep->mesh.NbElmLayer[ep->mesh.NbLayer-1] > 1 ){
-    j_second_from_top = ep->mesh.NbLayer-1;
-    k_second_from_top = ep->mesh.NbElmLayer[j_second_from_top]-2;
-  }
-  else{
-    j_second_from_top = std::max(ep->mesh.NbLayer-2, 0);
-    k_second_from_top = ep->mesh.NbElmLayer[j_second_from_top]-1;
-  }
-
   // find number of layers;
   unsigned int num_layer = 0;
   for( int p = 0; p < ep->mesh.NbLayer; p++ )
     num_layer += ep->mesh.NbElmLayer[p];
 
-  // If !is_dbl, make the body centered internal vertices for all "problem" elements
-  // If is_dbl, make face-centered verts where needed
-
   // create reserve capacity for the temp vector of new vertices:
   unsigned int cap_add = 0;
-  if( !is_dbl ){
+  if( !is_addverts ){
     std::map<MElement *, std::set< std::pair<unsigned int, unsigned int> > >::iterator itmap;
     for( itmap = problems.begin(); itmap != problems.end(); itmap++ )
       cap_add += itmap->second.size();
-    to->mesh_vertices.reserve(to->mesh_vertices.size()+cap_add);
   }
   else{
     unsigned int NbBndElems = c.four_bnd_pt_quad.size() + c.three_bnd_pt_tri.size() +
                               c.other_bnd_quad.size()   + c.other_bnd_tri.size();
     unsigned int NbSourceElems = from->triangles.size() + from->quadrangles.size();
-    cap_add = NbSourceElems + NbBndElems * ( num_layer-2 > 0 ? num_layer-2 : 0 );
+    if( findRootSourceFaceForFace(from) == from ) // if extruded back on the source in a ring
+      cap_add = NbBndElems * num_layer;
+    else
+      cap_add = NbSourceElems + NbBndElems * (num_layer-1);
   }
+  to->mesh_vertices.reserve(to->mesh_vertices.size()+cap_add);
 
-  // first the !is_dbl case
-  if( problems.size() && !is_dbl ){
+  // first the !is_addverts case
+  if( problems.size() && !is_addverts ){
     std::map<MElement *, std::set< std::pair<unsigned int, unsigned int> > >::iterator itmap;
     for( itmap = problems.begin(); itmap != problems.end(); itmap++ ){
       MElement *elem = itmap->first;
@@ -3977,10 +4028,10 @@ static bool addFaceOrBodyCenteredVertices( GRegion *to, CategorizedSourceElement
     }
   }
 
-  if( !is_dbl )
+  if( !is_addverts )
     return 1;
 
-  // The rest of the function works for is_dbl, double layer quadToTri extrusion
+  // The rest of the function works for is_addverts
 
 
   //Holds the new vertices...put them in to->mesh_vertices only at the end
@@ -4034,7 +4085,7 @@ static bool addFaceOrBodyCenteredVertices( GRegion *to, CategorizedSourceElement
           else if( edgeExists( verts3D[p+elem_size], verts3D[(p+1)%elem_size], quadToTri_edges ) )
             found_diags = true;
         }
-        // triangle extrusions don't need face centered verts if NO diags found
+        // triangle extrusions don't need body centered verts if NO diags found
         // or if not on lateral boundary
         if( !t && ( !found_diags || s==2 ) )
           continue;
@@ -4044,19 +4095,17 @@ static bool addFaceOrBodyCenteredVertices( GRegion *to, CategorizedSourceElement
           j_start = 0;
           k_start = 0;
         }
-        else{  // only non quads not extruded into degen hexa should execute this
-          j_start = j_second_from_top;
-          k_start = k_second_from_top;
+        else{  // only non-bnd quads or columns with no lateral diags and not extruded into degen hexa should execute this
+          j_start = ep->mesh.NbLayer-1;
+          k_start = ep->mesh.NbElmLayer[j_start]-1;
         }
-        std::vector<MVertex*> v_face;
+        std::vector<MVertex*> verts;
         for( int j = j_start; j < ep->mesh.NbLayer; j++ ){
-          int k_start_tmp = (j == j_start) ? k_start : 0;
-          int k_stop = (j == ep->mesh.NbLayer-1)
-                       ? ep->mesh.NbElmLayer[j]-1 : ep->mesh.NbElmLayer[j];
-          for( int k = k_start_tmp; k < k_stop; k++ ){
-            v_face.resize(0);
-            get2DExtrudedVertices( elem, ep, j, k+1, pos, v_face);
-            QtMakeCentroidVertex(v_face, &v_tmp, to, pos);
+          int k_stop = ep->mesh.NbElmLayer[j];
+	  for( int k = k_start; k < k_stop; k++ ){
+            verts.resize(0);
+            getExtrudedVertices(elem, ep, j, k, pos, verts);
+            QtMakeCentroidVertex(verts, &v_tmp, to, pos);
           }
         }
       }
@@ -4101,7 +4150,7 @@ static void MeshWithInternalVertex( GRegion *to, MElement *source, std::vector<M
   std::vector<double> centroid = QtFindVertsCentroid(v);
   MVertex tmp(centroid[0], centroid[1], centroid[2], 0, -1);
 
-  // it's too dangerous to use the 'new' command in here even with face-centered vertices.
+  // it's too dangerous to use the 'new' command in here even with body-centered vertices.
 
   std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp;
   itp = pos.find(&tmp);
@@ -4168,7 +4217,7 @@ static void MeshWithInternalVertex( GRegion *to, MElement *source, std::vector<M
 // Can pick top or bottom faces to have the vertex, or both, based on the top_flag and bottom_flag args.
 // created here in the code
 // Added 2010-04-05
-static void MeshWithFaceCenteredVertex( GRegion *to, MElement *source, std::vector<MVertex *> v, std::vector<int> n1,
+/*static void MeshWithFaceCenteredVertex( GRegion *to, MElement *source, std::vector<MVertex *> v, std::vector<int> n1,
                                         std::vector<int> n2, bool bottom_flag, bool top_flag,
                                         std::set<MVertex *, MVertexLessThanLexicographic> &pos )
 {
@@ -4307,6 +4356,8 @@ static void MeshWithFaceCenteredVertex( GRegion *to, MElement *source, std::vect
 
 }
 
+*/
+
 
 // Construct the elements that subdivide a prism (or degenerated prism)  in a QuadToTri interface;
 // Added 2010-01-24
@@ -4315,7 +4366,7 @@ static inline void QuadToTriPriPyrTet(std::vector<MVertex*> &v, GRegion *to, int
                               std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
                               std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
                               std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
-                              unsigned int lat_tri_diags_size, bool bnd_elem, bool is_dbl, bool diag_search,
+                              unsigned int lat_tri_diags_size, bool bnd_elem, bool is_addverts, bool diag_search,
                               std::set<MVertex*, MVertexLessThanLexicographic> &pos )
 {
   int dup[3];
@@ -4324,25 +4375,8 @@ static inline void QuadToTriPriPyrTet(std::vector<MVertex*> &v, GRegion *to, int
     if(v[i] == v[i + 3])
       dup[m++] = i;
 
-
-  ExtrudeParams *ep = to->meshAttributes.extrude;
-
-  // need these for double layer extrusion purposes
-  /*unsigned int j_second_from_top = 0, k_second_from_top = 0;
-  if( ep ){
-    if( ep->mesh.NbElmLayer[ep->mesh.NbLayer-1] > 1 ){
-      j_second_from_top = ep->mesh.NbLayer-1;
-      k_second_from_top = ep->mesh.NbElmLayer[j_second_from_top]-2;
-    }
-    else{
-      j_second_from_top = std::max(ep->mesh.NbLayer-2, 0);
-      k_second_from_top = ep->mesh.NbElmLayer[j_second_from_top]-1;
-    }
-  }*/
-
-
   bool is_problem = false;
-  if( !is_dbl ){
+  if( !is_addverts ){
     std::pair<unsigned int, unsigned int> jk_pair (j,k);
     std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > >::iterator itprob;
     itprob = problems.find(source);
@@ -4385,19 +4419,14 @@ static inline void QuadToTriPriPyrTet(std::vector<MVertex*> &v, GRegion *to, int
     }
   }
 
-  // mesh double layer
-  // is this prism part of a QuadToTri Double Layer extrusion and does it need to be extruded as such?
-  if( is_dbl && bnd_elem && found_diags ){
-    if( j==0 && k==0 )
-      MeshWithFaceCenteredVertex( to, source, v, n1, n2, 0, 1, pos );
-    else if( j >= ep->mesh.NbLayer-1 && k >= ep->mesh.NbElmLayer[ep->mesh.NbLayer-1]-1 )
-      MeshWithFaceCenteredVertex( to, source, v, n1, n2, 1, 0, pos );
-    else
-      MeshWithFaceCenteredVertex( to, source, v, n1, n2, 1, 1, pos );
+  // mesh with added internal body centered vertex
+  // is this prism part of a QuadToTri internal vertex extrusion and does it need to be extruded as such?
+  if( is_addverts && bnd_elem && found_diags ){
+    MeshWithInternalVertex( to, source, v, n1, n2, pos );
     return;
   }
 
-  // The rest are for single layer extrusions or degenerate prisms:
+  // The rest are for 'no new vertex' extrusions or degenerate prisms:
 
 
   // tetrahedron
@@ -4479,7 +4508,7 @@ static inline bool createTwoPtDegenHexElems( std::vector<MVertex*> &v, GRegion *
                                       std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
                                       std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
                                       std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
-                                      unsigned int lat_tri_diags_size, bool bnd_elem, bool is_dbl, bool found_diags,
+                                      unsigned int lat_tri_diags_size, bool bnd_elem, bool is_addverts, bool found_diags,
                                       std::set<MVertex*, MVertexLessThanLexicographic> &pos )
 {
 
@@ -4577,7 +4606,7 @@ static inline bool createOnePtDegenHexElems( std::vector<MVertex*> &v, GRegion *
                                       std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
                                       std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
                                       std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
-                                      unsigned int lat_tri_diags_size, bool bnd_elem, bool is_dbl, bool found_diags,
+                                      unsigned int lat_tri_diags_size, bool bnd_elem, bool is_addverts, bool found_diags,
                                       std::set<MVertex*, MVertexLessThanLexicographic> &pos )
 {
 
@@ -4818,7 +4847,7 @@ static inline bool createFullHexElems( std::vector<MVertex*> &v, GRegion *to, Ex
                                 std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
                                 std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
                                 std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
-                                unsigned int lat_tri_diags_size, bool bnd_elem, bool is_dbl, bool found_diags,
+                                unsigned int lat_tri_diags_size, bool bnd_elem, bool is_addverts, bool found_diags,
                                 std::set<MVertex*, MVertexLessThanLexicographic> &pos )
 {
 
@@ -5216,7 +5245,7 @@ static inline void QuadToTriHexPri(std::vector<MVertex*> &v, GRegion *to, int j,
                               std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
                               std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
                               std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
-                              unsigned int lat_tri_diags_size, bool bnd_elem, bool is_dbl, bool diag_search,
+                              unsigned int lat_tri_diags_size, bool bnd_elem, bool is_addverts, bool diag_search,
                               std::set<MVertex*, MVertexLessThanLexicographic> &pos )
 {
 
@@ -5229,7 +5258,7 @@ static inline void QuadToTriHexPri(std::vector<MVertex*> &v, GRegion *to, int j,
   bool is_problem = false;
 
   // is element marked as needing internal vertex?
-  if( !is_dbl ){
+  if( !is_addverts ){
     std::pair<unsigned int, unsigned int> jk_pair (j,k);
     std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > >::iterator itprob;
     itprob = problems.find(source);
@@ -5241,20 +5270,7 @@ static inline void QuadToTriHexPri(std::vector<MVertex*> &v, GRegion *to, int j,
 
   ExtrudeParams *ep = to->meshAttributes.extrude;
 
-  // need these for double layer extrusion purposes
-  int j_second_from_top = 0, k_second_from_top = 0;
-  if( ep ){
-    if( ep->mesh.NbElmLayer[ep->mesh.NbLayer-1] > 1 ){
-      j_second_from_top = ep->mesh.NbLayer-1;
-      k_second_from_top = ep->mesh.NbElmLayer[j_second_from_top]-2;
-    }
-    else{
-      j_second_from_top = std::max(ep->mesh.NbLayer-2, 0);
-      k_second_from_top = ep->mesh.NbElmLayer[j_second_from_top]-1;
-    }
-  }
-
-
+  
   // variables to hold of each faces's diagonal vertex nodes
   bool found_diags = false;
   std::vector<int> n1, n2;
@@ -5297,33 +5313,26 @@ static inline void QuadToTriHexPri(std::vector<MVertex*> &v, GRegion *to, int j,
   }
 
 
-  // Divide by double layer extrusion method?
-  if( is_dbl && ( found_diags || j > j_second_from_top ||
-                  (j==j_second_from_top && k >= k_second_from_top) || m==1 ) ){
-    if( (j==0 && k==0) ||
-        (j==j_second_from_top && k==k_second_from_top && ( !bnd_elem || !found_diags ) && m != 1) )
-      MeshWithFaceCenteredVertex( to, source, v, n1, n2, 0, 1, pos );
-    else if( j == ep->mesh.NbLayer-1 && k == ep->mesh.NbElmLayer[j]-1 )
-      MeshWithFaceCenteredVertex( to, source, v, n1, n2, 1, 0, pos );
-    else
-      MeshWithFaceCenteredVertex( to, source, v, n1, n2, 1, 1, pos );
+  // Divide by new internal vertex extrusion method?
+  if( is_addverts && ( found_diags || m==1 ) ){
+    MeshWithInternalVertex( to, source, v, n1, n2, pos );
     return;
   }
 
 
-  // The of the possibilites are for a single layer extrusion
+  // The of the possibilites are for a 'no new vertex' extrusion
 
   // PRISM
   else if( m == 2 && !is_problem ){
     if( createTwoPtDegenHexElems( v, to, ep, j, k, dup, source, n1, n2, quadToTri_edges, problems,
-                                  problems_new, lat_tri_diags_size, bnd_elem, is_dbl, found_diags, pos ) )
+                                  problems_new, lat_tri_diags_size, bnd_elem, is_addverts, found_diags, pos ) )
       return;
   }
 
   // DEGENERATE HEXAHEDRON
   else if( m == 1 && !is_problem ){
     if( createOnePtDegenHexElems( v, to, ep, j, k, dup, source, n1, n2, quadToTri_edges, problems,
-                                  problems_new, lat_tri_diags_size, bnd_elem, is_dbl, found_diags, pos ) )
+                                  problems_new, lat_tri_diags_size, bnd_elem, is_addverts, found_diags, pos ) )
       return;
   }
 
@@ -5331,7 +5340,7 @@ static inline void QuadToTriHexPri(std::vector<MVertex*> &v, GRegion *to, int j,
   // FULL HEXAHEDRON
   else if( !is_problem ){
     if( createFullHexElems( v, to, ep, j, k, dup, source, n1, n2, quadToTri_edges, problems,
-                            problems_new, lat_tri_diags_size, bnd_elem, is_dbl, found_diags, pos ) )
+                            problems_new, lat_tri_diags_size, bnd_elem, is_addverts, found_diags, pos ) )
       return;
   }
 
@@ -5359,7 +5368,7 @@ static inline void QuadToTriHexPri(std::vector<MVertex*> &v, GRegion *to, int j,
 // in the element vectors in the region 'to'
 // *** STILL EXPERIMENTAL -- It *kind* of works to limit memory footprint of vectors.
 /*
-static void reserveQuadToTriCapacityForRegion( GRegion *to, GFace *from,  bool is_dbl, unsigned int num_layers,
+static void reserveQuadToTriCapacityForRegion( GRegion *to, GFace *from,  bool is_addverts, unsigned int num_layers,
                                               unsigned int lat_tri_diags_size, CategorizedSourceElements *c,
                                               std::map<MElement*, std::set<std::pair<unsigned int,
                                                        unsigned int> > > *problems )
@@ -5386,7 +5395,7 @@ static void reserveQuadToTriCapacityForRegion( GRegion *to, GFace *from,  bool i
   // in case !ep->Recombine is ever allowed...
   if( !ep->mesh.Recombine )
     to->tetrahedra.reserve( num_layers*(3*num_tri + 6*num_quad + 8*num_prob_tri + 12*num_prob_quad) );
-  else if( !is_dbl ){
+  else if( !is_addverts ){
     //to->tetrahedra.reserve( (6*num_quad + 3*num_tri +2*lat_tri_diags_size + 8*num_prob_tri + 12*num_prob_quad) );
     to->prisms.reserve( num_tri*num_layers );
     to->hexahedra.reserve( num_quad*(num_layers-1) );
@@ -5403,7 +5412,7 @@ static void reserveQuadToTriCapacityForRegion( GRegion *to, GFace *from,  bool i
 */
 
 // displays for the user a list of the body centered vertices created for problem elements.
-static void listBodyCenteredVertices( GRegion *to, bool is_dbl,
+static void listBodyCenteredVertices( GRegion *to, bool is_addverts,
                                       std::map<MElement *, std::set<std::pair<unsigned int,unsigned int> > > *problems,
                                       std::map<MElement *, std::set<std::pair<unsigned int,unsigned int> > > *problems_new,
                                       std::set<MVertex*, MVertexLessThanLexicographic> *pos )
@@ -5425,7 +5434,7 @@ static void listBodyCenteredVertices( GRegion *to, bool is_dbl,
     for( itmap = problems_new->begin(); itmap!= problems_new->end(); itmap++ )
       (*problems)[itmap->first].insert( itmap->second.begin(), itmap->second.end() );
 
-    if( is_dbl ){
+    if( is_addverts ){
       it_begin = problems_new->begin();
       it_end = problems_new->end();
     }
@@ -5442,14 +5451,14 @@ static void listBodyCenteredVertices( GRegion *to, bool is_dbl,
 
     if( int_verts_count ){
       if( int_verts_count == 1 )
-        Msg::Error("QuadToTri meshed %d element in region %d "
+        Msg::Warning("QuadToTri meshed %d element in region %d "
                    "with a body-centered internal vertex.",
                    int_verts_count, to->tag() );
       else
-        Msg::Error("QuadToTri meshed %d elements in region %d "
+        Msg::Warning("QuadToTri meshed %d elements in region %d "
                    "with body-centered internal vertices.",
                    int_verts_count, to->tag() );
-      Msg::Error("( Mesh *should* still conformal, but the user should be aware of these internal vertices. )" );
+      Msg::Warning("( Mesh *should* still conformal, but the user should be aware of these internal vertices. )" );
 
       unsigned int int_verts_count2 = 0;
 
@@ -5463,7 +5472,7 @@ static void listBodyCenteredVertices( GRegion *to, bool is_dbl,
             // find centroid
             std::vector<double> centroid = QtFindVertsCentroid(verts);
             int_verts_count2++;
-            Msg::Error("Internal Vertex %d at (x,y,z) = (%g, %g, %g).", int_verts_count2,
+            Msg::Warning("Internal Vertex %d at (x,y,z) = (%g, %g, %g).", int_verts_count2,
                        centroid[0], centroid[1], centroid[2] );
           }
         }
@@ -5501,14 +5510,14 @@ bool QuadToTriCreateElements(GRegion *to,  CategorizedSourceElements &cat_src_el
   for( int j = 0; j < ep->mesh.NbLayer; j++ )
     num_layers += ep->mesh.NbElmLayer[j];
 
-  // Is this a valid double layer extrusion?
-  bool is_dbl = false;
-  if( num_layers >= 2 && ( ep->mesh.QuadToTri == QUADTRI_DBL_1 || ep->mesh.QuadToTri == QUADTRI_DBL_1_RECOMB ) )
-    is_dbl = true;
+  // Is this a valid 'add internal vertex' extrusion?
+  bool is_addverts = false;
+  if( ep->mesh.QuadToTri == QUADTRI_ADDVERTS_1 || ep->mesh.QuadToTri == QUADTRI_ADDVERTS_1_RECOMB )
+    is_addverts = true;
 
   // Find where top divided layer starts
   /*int j_top_start = 0, k_top_start = 0;
-  if( is_dbl ){  // second from top
+  if( is_addverts ){  // second from top
     if( ep->mesh.NbElmLayer[ep->mesh.NbLayer-1] > 1 ){
       j_top_start = ep->mesh.NbLayer-1;
       k_top_start = ep->mesh.NbElmLayer[j_top_start]-2;
@@ -5541,7 +5550,7 @@ bool QuadToTriCreateElements(GRegion *to,  CategorizedSourceElements &cat_src_el
 
 
   // Make the extra vertices needed for Some QuadToTri elements
-  if( !addFaceOrBodyCenteredVertices( to, cat_src_elems, quadToTri_edges, problems, is_dbl,
+  if( !addBodyCenteredVertices( to, cat_src_elems, quadToTri_edges, problems, is_addverts,
                                       lat_tri_diags_size, pos ) ){
     Msg::Error("QuadToTriCreateElements() could not add face or body vertices for QuadToTri region %d.", to->tag() );
     return false;
@@ -5549,7 +5558,7 @@ bool QuadToTriCreateElements(GRegion *to,  CategorizedSourceElements &cat_src_el
 
   // reserve enough capacity for all possible elements, try to find combination of simplicity and memory efficiency.
   //  *** EXPERIMENTAL ***
-  //reserveQuadToTriCapacityForRegion( to, from, is_dbl, num_layers, lat_tri_diags_size, &cat_src_elems, &problems );
+  //reserveQuadToTriCapacityForRegion( to, from, is_addverts, num_layers, lat_tri_diags_size, &cat_src_elems, &problems );
 
   // create elements:
 
@@ -5584,7 +5593,7 @@ bool QuadToTriCreateElements(GRegion *to,  CategorizedSourceElements &cat_src_el
           if( getExtrudedVertices(elem, ep, j, k, pos, verts) == 6 ){
             QuadToTriPriPyrTet( verts, to, j, k, elem, quadToTri_edges,
                                problems, problems_new, lat_tri_diags_size,
-                               bnd_elem, is_dbl, 1, pos );
+                               bnd_elem, is_addverts, 1, pos );
           }
         }
       }
@@ -5631,7 +5640,7 @@ bool QuadToTriCreateElements(GRegion *to,  CategorizedSourceElements &cat_src_el
             if(getExtrudedVertices(elem, ep, j, k, pos, verts) == 8 ){
               QuadToTriHexPri(verts, to, j, k, elem, quadToTri_edges,
                               problems, problems_new, lat_tri_diags_size,
-                              bnd_elem, is_dbl, 1, pos);
+                              bnd_elem, is_addverts, 1, pos);
             }
           }
         }
@@ -5646,7 +5655,7 @@ bool QuadToTriCreateElements(GRegion *to,  CategorizedSourceElements &cat_src_el
   }
 
   // List for the user any elements with internal vertices:
-  listBodyCenteredVertices( to, is_dbl, &problems, &problems_new, &pos );
+  listBodyCenteredVertices( to, is_addverts, &problems, &problems_new, &pos );
 
 
   // Now revert any elements that have positive  volume.
@@ -5728,6 +5737,7 @@ int meshQuadToTriRegion( GRegion *gr, std::set<MVertex*, MVertexLessThanLexicogr
     std::set<std::pair<MVertex*, MVertex*> > lat_tri_diags;
     std::map<MElement*, std::set<std::pair<unsigned int,unsigned int> > > problems;
 
+    // first thing is first
     // data structure for boundary status-categorized source elements,
     // (member data containers defined in .h file)
     CategorizedSourceElements cat_src_elems( gr );
diff --git a/Mesh/QuadTriUtils.cpp b/Mesh/QuadTriUtils.cpp
index 91b9f72db1b504bd5037875af9d42c82502b17fc..2154a6a2e1ba77a56557c4635795ca435c0d9139 100644
--- a/Mesh/QuadTriUtils.cpp
+++ b/Mesh/QuadTriUtils.cpp
@@ -31,7 +31,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 ****************************************************************************************************/
-
+#include <stdlib.h>
 #include "QuadTriUtils.h"
 
 
@@ -59,6 +59,218 @@ ExtrusionElementMap::addExtrudedElemVector(MElement* source, std::vector<MElemen
 
 }*/
 
+
+// By Geuzaine, Remacle...
+static void addTriangle(MVertex* v1, MVertex* v2, MVertex* v3,
+                        GFace *to)
+{
+  MTriangle* newTri = new MTriangle(v1, v2, v3);
+  to->triangles.push_back(newTri);
+}
+
+// this determines if a face is a non-lateral face in a structured toroidal volume extrusion with at 
+// least one QuadToTri region...
+int IsInToroidalQuadToTri(GFace *face)
+{
+   if( !face )
+     return false;
+   
+   GModel *model = face->model();
+   
+   bool is_toroidal = false, is_quadtri = false, is_noaddverts = false;
+   
+   // Find the root face first...then step back through extrusions as far as can find
+   // another structured region.  If there is a single quadtri region, and this is a torus that
+   // extrudes back onto the root source surface, then return true.
+   GFace *root_face = 0;
+   root_face = findRootSourceFaceForFace(face);
+   unsigned int numRegions = 0;
+   std::vector<GRegion*> adj_extruded_reg;
+   
+   //find the two regions adjacent to the root face. If this is a structured torus, then both regions
+   // should be structured extrusions and BOTH should have the same root face
+   std::set<GRegion *, GEntityLessThan>::iterator itreg;
+   for( itreg = model->firstRegion(); itreg != model->lastRegion(); itreg++ ){
+      // save time
+      if( numRegions >= 2 )
+	break;
+
+      GRegion *region = (*itreg);
+
+      // is region in the current model's regions or is it deleted?
+      if( !FindVolume( ( region->tag() ) ) )
+	continue;
+
+      // does face belong to region and if so is it a structured extrusion?
+      std::list<GFace *> region_faces = std::list<GFace *>( region->faces() );
+      if( std::find( region_faces.begin(), region_faces.end(), root_face ) !=
+	    region_faces.end() && region->meshAttributes.extrude && 
+	  region->meshAttributes.extrude->mesh.ExtrudeMesh &&
+	  region->meshAttributes.extrude->geo.Mode == EXTRUDED_ENTITY ){
+	
+	adj_extruded_reg.push_back(region);
+	numRegions++;
+      }
+      else
+	continue;
+    }
+    // if there are two structured extruded regions adjacent to the root face,
+    // then find the one that is NOT extruded from the root directly.  Then follow this 
+    // face as far as possible back to the source.
+    
+    GRegion *last_region = 0;
+    GFace *last_reg_source = 0;
+    bool found_first = 0, found_last = 0;
+    if( numRegions == 2 ){
+      for( int ind = 0; ind <= 1; ind++ ){
+	ExtrudeParams *adj_ep = adj_extruded_reg[ind]->meshAttributes.extrude;
+	GFace *reg_source = 0;
+	
+	if( adj_ep && adj_ep->mesh.ExtrudeMesh ){
+	  reg_source = model->getFaceByTag(std::abs( adj_ep->geo.Source ) );
+          if( adj_ep->mesh.QuadToTri ){
+	    is_quadtri = true;
+	    if( adj_ep->mesh.QuadToTri == QUADTRI_NOVERTS_1 || 
+	        adj_ep->mesh.QuadToTri == QUADTRI_NOVERTS_1_RECOMB )
+	      is_noaddverts = true;
+	  }
+	}
+	if( reg_source ){
+	  if( reg_source != root_face ){
+	    last_region = adj_extruded_reg[ind];
+	    last_reg_source = reg_source;
+	    found_last = true;
+	  }
+	  else{
+	    found_first = true;
+	  }
+	}
+	else{
+	  Msg::Error("In IsInToroidalQuadToTri(), could not find source face of region %d",
+               adj_extruded_reg[ind]->tag() );
+	  return 0;
+	}
+      }
+    }
+
+    //walk back around to beginning if possible 
+    if( last_region && found_first && found_last ){
+      GFace *iter_face = last_reg_source;
+      GFace *iter_source_face = 0;
+      bool done = false;
+      unsigned int maxiter = model->getNumFaces() + 2;
+      unsigned int counter = 0;
+      while( !done && counter <= maxiter ){
+	counter++;
+	if( iter_face ){
+	  ExtrudeParams *iter_eps = iter_face->meshAttributes.extrude;
+	  if( iter_eps && iter_eps->mesh.ExtrudeMesh && 
+	      iter_eps->geo.Mode == COPIED_ENTITY ){
+	    if( iter_eps->mesh.QuadToTri )
+	      is_quadtri = true;
+	    iter_source_face = model->getFaceByTag(std::abs( iter_eps->geo.Source ));
+	    if( iter_source_face ){
+	      if( iter_source_face == root_face ){
+		is_toroidal = true;
+		done = true;
+	      }
+	      else
+		iter_face = iter_source_face;
+	    }
+	    else{
+	      Msg::Error("In IsInToroidalQuadToTri(), could not find source face of face %d",
+                          iter_face->tag() );
+	      return 0;
+	    }
+	  }
+	  else // if we found a source face not extruded as part of structured source (ie, not copied)
+	    return 0;
+	}
+	else{
+	  Msg::Error("In IsInToroidalQuadToTri(), could not find a face...");
+	  return 0;
+	}
+      }
+    }
+    
+    // now return
+    if( is_toroidal && is_quadtri ){
+      if( !is_noaddverts )
+        return 1;
+      else
+	return 2;
+    }
+    else
+      return 0;
+}
+
+// replace boundary quads in a source surface for toroidal quadtri extrusion
+void ReplaceBndQuadsInFace(GFace *face)
+{
+  ExtrudeParams *ep = face->meshAttributes.extrude;
+  bool is_struct = false;
+  if( (ep && ep->mesh.ExtrudeMesh && ep->geo.Mode == EXTRUDED_ENTITY) ||
+      face->meshAttributes.method == MESH_TRANSFINITE  )
+    is_struct = true;
+  GFace *root_face = findRootSourceFaceForFace( face );
+  if( root_face == face ){
+    std::set<MVertex*, MVertexLessThanLexicographic> pos_src_edge;
+    QuadToTriInsertFaceEdgeVertices(face, pos_src_edge);
+    std::vector<MQuadrangle*> quads2; 
+    //loop through source quads, if on boundary, delete them
+    for(unsigned int i = 0; i < face->quadrangles.size(); i++){
+      std::vector<MVertex*> verts;
+      int num_verts = face->quadrangles[i]->getNumVertices();
+      bool on_edge = false;
+      
+      for( int j = 0; j < num_verts; j++ )
+	verts.push_back(face->quadrangles[i]->getVertex(j));
+      
+      for( int j = 0; j < num_verts; j++ ){
+	if( pos_src_edge.find( verts[j] ) != pos_src_edge.end() ){
+	  on_edge = true;
+	  break;
+	}
+      }
+      if( on_edge ){
+	delete face->quadrangles[i];
+	if( is_struct ){
+	  addTriangle( verts[0],verts[2], verts[3],face);
+	  addTriangle( verts[0],verts[1], verts[2],face);
+	}
+	else{
+	  // draw other diagonals to minimize difference in average edge length with diagonal length, in quadrature
+
+	  double mag_sq_ave = 0.0;
+	  for( int p = 0; p < 4; p++ ){
+	    int d_leg = verts[p]->distance(verts[(p+1)%4]);
+	    mag_sq_ave += d_leg*d_leg;
+	  }
+	  mag_sq_ave /= 4.0;
+
+	  double d1 = verts[0]->distance(verts[2]);
+	  double d2 = verts[1]->distance(verts[3]);
+
+	  if(fabs(d1*d1-mag_sq_ave) <= fabs(d2*d2-mag_sq_ave) ){
+	    addTriangle(verts[0],verts[1],verts[2],face);
+	    addTriangle(verts[0],verts[2],verts[3],face);
+	  }
+	  else{
+	    addTriangle(verts[1],verts[2],verts[3],face);
+	    addTriangle(verts[1],verts[3],verts[0],face);
+	  }
+	}
+      }
+      else
+	quads2.push_back(face->quadrangles[i]);
+    }
+    face->quadrangles.clear();
+    face->quadrangles = quads2;
+  }
+  
+}
+
+
 // Insert all vertices on a region's source edge, including corners,
 // into pos_src_edge set.
 // Added 2010-01-09
@@ -405,7 +617,8 @@ std::pair<int, int> FindDiagonalEdgeIndices( std::vector<MVertex*> verts,
   for( int s = 0; s < s_max; s++ ){
     if( s != 0 && !wrong_guess  ){
       wrong_guess = true;
-      Msg::Error("FindDiagonalEdgeIndices() encountered unexpected surface configuration.");
+      if( !face->quadrangles.size() )
+	Msg::Error("FindDiagonalEdgeIndices() encountered unexpected surface configuration.");
     }
     int v_count0 = 0,  v_count1 = 0;
     elem_tmp = (MElement*)(face->triangles[(s+index_guess)%s_max]);
@@ -432,7 +645,8 @@ std::pair<int, int> FindDiagonalEdgeIndices( std::vector<MVertex*> verts,
     }
   }
 
-  Msg::Error("In FindDiagonalEdge(), could not "
+  if( !face->quadrangles.size() )
+    Msg::Error("In FindDiagonalEdgeIndices(), could not "
              "find a diagonal on surface %d.",
              face->tag() );
   return std::pair<int,int>(0,0);
@@ -463,7 +677,6 @@ int GetNeighborRegionsOfFace(GFace *face, std::vector<GRegion *> &neighbors)
     regions_count = 0;
 
   // pedantic search
-  std::vector<GRegion *> all_regions;
   std::set<GRegion *, GEntityLessThan>::iterator itreg;
   for( itreg = model->firstRegion(); itreg != model->lastRegion(); itreg++ ){
     std::list<GFace *> reg_faces = (*itreg)->faces();
@@ -593,7 +806,6 @@ int IsSurfaceALateralForRegion(GRegion *region, GFace *face)
   return 1; // if code executes here, passed all tests
 }
 
-
 // Function to determine if a face is a top surface for a region.  It returns 1
 // if the face is COPIED_ENTITY with source = region's source and if face belongs to region.
 // Otherwise, return 0 (NOTE: ReplaceDuplicateSurfaces() can remove a top surface
diff --git a/Mesh/QuadTriUtils.h b/Mesh/QuadTriUtils.h
index b7a139ad369aa3102de9220089f0ed5dc459e8ed..19645f9d635985910c5085da4ec37945c69c017c 100644
--- a/Mesh/QuadTriUtils.h
+++ b/Mesh/QuadTriUtils.h
@@ -35,6 +35,7 @@ GNU General Public License for more details.
 #if !defined(_QUADTRIUTILS_H_)
 #define _QUADTRIUTILS_H_
 
+#include <stdlib.h>
 #include "ExtrudeParams.h"
 #include "Geo.h"
 #include "GEntity.h"
@@ -106,6 +107,13 @@ struct CategorizedSourceElements{
   CategorizedSourceElements( GRegion *gr );
 };
 
+// this determines if a face is a non-lateral face in a structured toroidal volume extrusion with at 
+// least one QuadToTri region...
+int IsInToroidalQuadToTri(GFace *face);
+
+// replace boundary quads in a source surface for toroidal quadtri extrusion
+void ReplaceBndQuadsInFace(GFace *face);
+
 
 // This is a member function for the element map in ExtrudeParams.
 // This allows insertion of a whole vector at once.
diff --git a/Mesh/meshGFaceExtruded.cpp b/Mesh/meshGFaceExtruded.cpp
index b76f14543c8cb7d16cf686821e6fa255909d2cb0..b065a0aa81581f5443e8176574a230013d17e279 100644
--- a/Mesh/meshGFaceExtruded.cpp
+++ b/Mesh/meshGFaceExtruded.cpp
@@ -39,7 +39,23 @@ static void createQuaTri(std::vector<MVertex*> &v, GFace *to,
   else{
     // Trevor Strickler added the tri_quad_flag stuff here.
     if((ep->mesh.Recombine && tri_quad_flag != 2) || tri_quad_flag == 1){
-      addQuadrangle(v[0], v[1], v[3], v[2], to);
+      if(!constrainedEdges)
+	addQuadrangle(v[0], v[1], v[3], v[2], to);
+      else{
+	std::pair<MVertex*, MVertex*> p1(std::min(v[1], v[2]), std::max(v[1], v[2]));
+	std::pair<MVertex*, MVertex*> p2(std::min(v[0], v[3]), std::max(v[0], v[3]));
+	if(constrainedEdges->count(p1)){
+	  addTriangle(v[2], v[1], v[0], to);
+	  addTriangle(v[2], v[3], v[1], to);
+	}
+	else if(constrainedEdges->count(p2)){
+	  addTriangle(v[2], v[3], v[0], to);
+	  addTriangle(v[0], v[3], v[1], to);
+	}
+	else
+	  addQuadrangle(v[0], v[1], v[3], v[2], to);
+      }
+	
     }
     else if(!constrainedEdges){
       addTriangle(v[0], v[1], v[3], to);
@@ -88,6 +104,7 @@ static void extrudeMesh(GEdge *from, GFace *to,
     }
   }
 
+  // Trevor Strickler
   // figure out whether to recombine this surface or not in the event
   // of quadToTri region neighbors (if QuadToTri, tri_quad_flag is an
   // int flag that lets createQuadTri() override the surface's
@@ -153,7 +170,33 @@ static void copyMesh(GFace *from, GFace *to,
     pos.insert(newv);
   }
 
-  // create elements
+  // if performing QuadToTri mesh, cannot simply copy the mesh from
+  // the source.  The vertices and triangles can be copied directly
+  // though.  First, of course, do some checks and make sure this is a
+  // valid QuadToTri top surface before engaging in QuadToTri meshing.
+  int quadToTri= NO_QUADTRI;
+  bool detectQuadToTriTop = false;
+  int quadToTri_valid = IsValidQuadToTriTop(to, &quadToTri, &detectQuadToTriTop);
+  bool is_toroidal = quadToTri_valid >= 2 ? true : false;
+  bool is_noaddverts = quadToTri_valid == 3 ? true : false;
+  if( detectQuadToTriTop && !quadToTri_valid && !is_toroidal ){
+    Msg::Error("In MeshGFaceExtrudedSurface::copyMesh(), Mesh of QuadToTri top "
+               "surface %d likely has errors.", to->tag());
+  }
+  
+  // if this is toroidal No New Vertices QuadToTri, then replace the root dependency face's boundary
+  // quads with triangles for better meshing.
+  if( is_toroidal && is_noaddverts ){
+    GFace *root = findRootSourceFaceForFace( from );
+    if( root == from ){
+      ReplaceBndQuadsInFace( root );
+      Msg::Warning("To facilitate QuadToTri interface on surface %d, source surface %d was re-meshed "
+                "with all triangles on boundary.  To avoid this, use QuadTriAddVerts instead of "
+		 "QuadTriNoNewVerts.", to->tag(), root->tag());
+    }
+  }
+  
+  // create triangle elements
   std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp;
   for(unsigned int i = 0; i < from->triangles.size(); i++){
     std::vector<MVertex*> verts;
@@ -177,23 +220,17 @@ static void copyMesh(GFace *from, GFace *to,
     addTriangle(verts[0], verts[1], verts[2], to);
   }
 
-  // if performing QuadToTri mesh, cannot simply copy the mesh from
-  // the source.  The vertices and triangles can be copied directly
-  // though.  First, of course, do some checks and make sure this is a
-  // valid QuadToTri top surface before engaging in QuadToTri meshing.
-  int quadToTri= NO_QUADTRI;
-  bool detectQuadToTriTop = false;
-  bool quadToTri_valid = IsValidQuadToTriTop(to, &quadToTri, &detectQuadToTriTop);
-  if(detectQuadToTriTop){
-    if(!quadToTri_valid)
-      Msg::Error("In MeshGFaceExtrudedSurface::copyMesh(), Mesh of QuadToTri top "
-                 "surface %d likely has errors.", to->tag());
-    if(!MeshQuadToTriTopSurface(from, to, pos))
+  // Add triangles for divided quads for QuadTri -- Trevor Strickler
+  // if quadtotri and not part of a toroidal extrusion, mesh the top surface accordingly
+  if( detectQuadToTriTop && !is_toroidal ){
+    if( !MeshQuadToTriTopSurface(from, to, pos))
       Msg::Error("In MeshExtrudedSurface()::copyMesh(), mesh of QuadToTri top "
-                 "surface %d failed.", to->tag() );
+		  "surface %d failed.", to->tag() );
     return;
-  }
+  } 
+
 
+  // create quadrangle elements if NOT QuadToTri and NOT toroidal
   for(unsigned int i = 0; i < from->quadrangles.size(); i++){
     std::vector<MVertex*> verts;
     for(int j = 0; j < 4; j++){
diff --git a/Parser/Gmsh.l b/Parser/Gmsh.l
index d952de3f3fc95661afb26a570f59b81e40bbec1c..5d3b1e72b49194e76ac334d07488a7f2f1cb2f32 100644
--- a/Parser/Gmsh.l
+++ b/Parser/Gmsh.l
@@ -187,6 +187,9 @@ PolarSphere             return tPolarSphere;
 Printf                  return tPrintf;
 Plugin                  return tPlugin;
 
+Quad[tT]ri[aA]dd[vV]erts        return tQuadTriAddVerts;
+Quad[tT]ri[nN]o[nN]ew[vV]erts   return tQuadTriNoNewVerts;
+
 Quad[tT]ri[dD]bl        return tQuadTriDbl;
 Quad[tT]ri[sS]ngl       return tQuadTriSngl;
 
@@ -200,6 +203,7 @@ RefineMesh              return tRefineMesh;
 Return                  return tReturn;
 Reverse                 return tReverse;
 
+ScaleLastLayer          return tScaleLast;
 Smoother                return tSmoother;
 SetOrder                return tSetOrder;
 Sqrt                    return tSqrt;
diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp
index a3f5813eafb1b125b4490244889b30bb27054d7b..83eafabd286cb4ca70419c779af883cf7947ed77 100644
--- a/Parser/Gmsh.tab.cpp
+++ b/Parser/Gmsh.tab.cpp
@@ -170,61 +170,64 @@
      tMeshAlgorithm = 351,
      tReverse = 352,
      tLayers = 353,
-     tHole = 354,
-     tAlias = 355,
-     tAliasWithOptions = 356,
-     tQuadTriDbl = 357,
-     tQuadTriSngl = 358,
-     tRecombLaterals = 359,
-     tTransfQuadTri = 360,
-     tText2D = 361,
-     tText3D = 362,
-     tInterpolationScheme = 363,
-     tTime = 364,
-     tCombine = 365,
-     tBSpline = 366,
-     tBezier = 367,
-     tNurbs = 368,
-     tNurbsOrder = 369,
-     tNurbsKnots = 370,
-     tColor = 371,
-     tColorTable = 372,
-     tFor = 373,
-     tIn = 374,
-     tEndFor = 375,
-     tIf = 376,
-     tEndIf = 377,
-     tExit = 378,
-     tAbort = 379,
-     tField = 380,
-     tReturn = 381,
-     tCall = 382,
-     tFunction = 383,
-     tShow = 384,
-     tHide = 385,
-     tGetValue = 386,
-     tGetEnv = 387,
-     tGetString = 388,
-     tHomology = 389,
-     tCohomology = 390,
-     tBetti = 391,
-     tSetOrder = 392,
-     tGMSH_MAJOR_VERSION = 393,
-     tGMSH_MINOR_VERSION = 394,
-     tGMSH_PATCH_VERSION = 395,
-     tAFFECTDIVIDE = 396,
-     tAFFECTTIMES = 397,
-     tAFFECTMINUS = 398,
-     tAFFECTPLUS = 399,
-     tOR = 400,
-     tAND = 401,
-     tNOTEQUAL = 402,
-     tEQUAL = 403,
-     tGREATEROREQUAL = 404,
-     tLESSOREQUAL = 405,
-     UNARYPREC = 406,
-     tMINUSMINUS = 407,
-     tPLUSPLUS = 408
+     tScaleLast = 354,
+     tHole = 355,
+     tAlias = 356,
+     tAliasWithOptions = 357,
+     tQuadTriAddVerts = 358,
+     tQuadTriNoNewVerts = 359,
+     tQuadTriSngl = 360,
+     tQuadTriDbl = 361,
+     tRecombLaterals = 362,
+     tTransfQuadTri = 363,
+     tText2D = 364,
+     tText3D = 365,
+     tInterpolationScheme = 366,
+     tTime = 367,
+     tCombine = 368,
+     tBSpline = 369,
+     tBezier = 370,
+     tNurbs = 371,
+     tNurbsOrder = 372,
+     tNurbsKnots = 373,
+     tColor = 374,
+     tColorTable = 375,
+     tFor = 376,
+     tIn = 377,
+     tEndFor = 378,
+     tIf = 379,
+     tEndIf = 380,
+     tExit = 381,
+     tAbort = 382,
+     tField = 383,
+     tReturn = 384,
+     tCall = 385,
+     tFunction = 386,
+     tShow = 387,
+     tHide = 388,
+     tGetValue = 389,
+     tGetEnv = 390,
+     tGetString = 391,
+     tHomology = 392,
+     tCohomology = 393,
+     tBetti = 394,
+     tSetOrder = 395,
+     tGMSH_MAJOR_VERSION = 396,
+     tGMSH_MINOR_VERSION = 397,
+     tGMSH_PATCH_VERSION = 398,
+     tAFFECTDIVIDE = 399,
+     tAFFECTTIMES = 400,
+     tAFFECTMINUS = 401,
+     tAFFECTPLUS = 402,
+     tOR = 403,
+     tAND = 404,
+     tNOTEQUAL = 405,
+     tEQUAL = 406,
+     tGREATEROREQUAL = 407,
+     tLESSOREQUAL = 408,
+     UNARYPREC = 409,
+     tMINUSMINUS = 410,
+     tPLUSPLUS = 411
    };
 #endif
 /* Tokens.  */
@@ -324,61 +327,64 @@
 #define tMeshAlgorithm 351
 #define tReverse 352
 #define tLayers 353
-#define tHole 354
-#define tAlias 355
-#define tAliasWithOptions 356
-#define tQuadTriDbl 357
-#define tQuadTriSngl 358
-#define tRecombLaterals 359
-#define tTransfQuadTri 360
-#define tText2D 361
-#define tText3D 362
-#define tInterpolationScheme 363
-#define tTime 364
-#define tCombine 365
-#define tBSpline 366
-#define tBezier 367
-#define tNurbs 368
-#define tNurbsOrder 369
-#define tNurbsKnots 370
-#define tColor 371
-#define tColorTable 372
-#define tFor 373
-#define tIn 374
-#define tEndFor 375
-#define tIf 376
-#define tEndIf 377
-#define tExit 378
-#define tAbort 379
-#define tField 380
-#define tReturn 381
-#define tCall 382
-#define tFunction 383
-#define tShow 384
-#define tHide 385
-#define tGetValue 386
-#define tGetEnv 387
-#define tGetString 388
-#define tHomology 389
-#define tCohomology 390
-#define tBetti 391
-#define tSetOrder 392
-#define tGMSH_MAJOR_VERSION 393
-#define tGMSH_MINOR_VERSION 394
-#define tGMSH_PATCH_VERSION 395
-#define tAFFECTDIVIDE 396
-#define tAFFECTTIMES 397
-#define tAFFECTMINUS 398
-#define tAFFECTPLUS 399
-#define tOR 400
-#define tAND 401
-#define tNOTEQUAL 402
-#define tEQUAL 403
-#define tGREATEROREQUAL 404
-#define tLESSOREQUAL 405
-#define UNARYPREC 406
-#define tMINUSMINUS 407
-#define tPLUSPLUS 408
+#define tScaleLast 354
+#define tHole 355
+#define tAlias 356
+#define tAliasWithOptions 357
+#define tQuadTriAddVerts 358
+#define tQuadTriNoNewVerts 359
+#define tQuadTriSngl 360
+#define tQuadTriDbl 361
+#define tRecombLaterals 362
+#define tTransfQuadTri 363
+#define tText2D 364
+#define tText3D 365
+#define tInterpolationScheme 366
+#define tTime 367
+#define tCombine 368
+#define tBSpline 369
+#define tBezier 370
+#define tNurbs 371
+#define tNurbsOrder 372
+#define tNurbsKnots 373
+#define tColor 374
+#define tColorTable 375
+#define tFor 376
+#define tIn 377
+#define tEndFor 378
+#define tIf 379
+#define tEndIf 380
+#define tExit 381
+#define tAbort 382
+#define tField 383
+#define tReturn 384
+#define tCall 385
+#define tFunction 386
+#define tShow 387
+#define tHide 388
+#define tGetValue 389
+#define tGetEnv 390
+#define tGetString 391
+#define tHomology 392
+#define tCohomology 393
+#define tBetti 394
+#define tSetOrder 395
+#define tGMSH_MAJOR_VERSION 396
+#define tGMSH_MINOR_VERSION 397
+#define tGMSH_PATCH_VERSION 398
+#define tAFFECTDIVIDE 399
+#define tAFFECTTIMES 400
+#define tAFFECTMINUS 401
+#define tAFFECTPLUS 402
+#define tOR 403
+#define tAND 404
+#define tNOTEQUAL 405
+#define tEQUAL 406
+#define tGREATEROREQUAL 407
+#define tLESSOREQUAL 408
+#define UNARYPREC 409
+#define tMINUSMINUS 410
+#define tPLUSPLUS 411
 
 
 
@@ -508,7 +514,7 @@ typedef union YYSTYPE
   List_T *l;
 }
 /* Line 193 of yacc.c.  */
-#line 512 "Gmsh.tab.cpp"
+#line 518 "Gmsh.tab.cpp"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
@@ -521,7 +527,7 @@ typedef union YYSTYPE
 
 
 /* Line 216 of yacc.c.  */
-#line 525 "Gmsh.tab.cpp"
+#line 531 "Gmsh.tab.cpp"
 
 #ifdef short
 # undef short
@@ -736,20 +742,20 @@ union yyalloc
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  5
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   8505
+#define YYLAST   8716
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  174
+#define YYNTOKENS  177
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  91
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  462
+#define YYNRULES  467
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  1612
+#define YYNSTATES  1622
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   408
+#define YYMAXUTOK   411
 
 #define YYTRANSLATE(YYX)						\
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -760,16 +766,16 @@ static const yytype_uint8 yytranslate[] =
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,   159,     2,   169,     2,   158,     2,     2,
-     164,   165,   156,   154,   170,   155,   168,   157,     2,     2,
+       2,     2,     2,   162,     2,   172,     2,   161,     2,     2,
+     167,   168,   159,   157,   173,   158,   171,   160,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     150,     2,   151,   145,     2,     2,     2,     2,     2,     2,
+     153,     2,   154,   148,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,   166,     2,   167,   163,     2,     2,     2,     2,     2,
+       2,   169,     2,   170,   166,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,   171,     2,   172,   173,     2,     2,     2,
+       2,     2,     2,   174,     2,   175,   176,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -797,7 +803,8 @@ static const yytype_uint8 yytranslate[] =
      115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
      125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
      135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
-     146,   147,   148,   149,   152,   153,   160,   161,   162
+     145,   146,   147,   149,   150,   151,   152,   155,   156,   163,
+     164,   165
 };
 
 #if YYDEBUG
@@ -831,295 +838,296 @@ static const yytype_uint16 yyprhs[] =
     1351,  1352,  1359,  1368,  1377,  1386,  1399,  1412,  1425,  1440,
     1455,  1470,  1471,  1484,  1485,  1498,  1499,  1512,  1513,  1530,
     1531,  1548,  1549,  1566,  1567,  1586,  1587,  1606,  1607,  1626,
-    1628,  1631,  1637,  1645,  1655,  1658,  1661,  1665,  1668,  1672,
-    1682,  1689,  1690,  1694,  1695,  1697,  1698,  1701,  1702,  1705,
-    1713,  1720,  1729,  1735,  1739,  1747,  1753,  1758,  1765,  1772,
-    1785,  1796,  1807,  1818,  1829,  1840,  1845,  1850,  1853,  1857,
-    1864,  1866,  1868,  1870,  1873,  1879,  1887,  1898,  1900,  1904,
-    1907,  1910,  1913,  1917,  1921,  1925,  1929,  1933,  1937,  1941,
-    1945,  1949,  1953,  1957,  1961,  1965,  1969,  1975,  1980,  1985,
-    1990,  1995,  2000,  2005,  2010,  2015,  2020,  2025,  2032,  2037,
-    2042,  2047,  2052,  2057,  2062,  2069,  2076,  2083,  2088,  2093,
-    2098,  2103,  2108,  2113,  2118,  2123,  2128,  2133,  2138,  2145,
-    2150,  2155,  2160,  2165,  2170,  2175,  2182,  2189,  2196,  2201,
-    2203,  2205,  2207,  2209,  2211,  2213,  2215,  2217,  2219,  2221,
-    2227,  2232,  2237,  2240,  2246,  2250,  2257,  2262,  2270,  2277,
-    2284,  2291,  2296,  2298,  2301,  2304,  2308,  2312,  2324,  2334,
-    2342,  2350,  2352,  2356,  2358,  2360,  2363,  2367,  2372,  2378,
-    2380,  2382,  2385,  2389,  2393,  2399,  2404,  2407,  2410,  2413,
-    2416,  2422,  2428,  2434,  2440,  2442,  2444,  2448,  2452,  2457,
-    2464,  2471,  2473,  2475,  2479,  2483,  2493,  2501,  2503,  2509,
-    2513,  2520,  2522,  2526,  2528,  2530,  2534,  2541,  2543,  2545,
-    2550,  2557,  2564,  2569,  2574,  2583,  2588,  2593,  2598,  2603,
-    2610,  2617,  2619
+    1628,  1631,  1637,  1645,  1655,  1658,  1661,  1664,  1668,  1671,
+    1675,  1678,  1682,  1685,  1689,  1699,  1706,  1707,  1711,  1712,
+    1714,  1715,  1718,  1719,  1722,  1730,  1737,  1746,  1752,  1756,
+    1764,  1770,  1775,  1782,  1789,  1802,  1813,  1824,  1835,  1846,
+    1857,  1862,  1867,  1870,  1874,  1881,  1883,  1885,  1887,  1890,
+    1896,  1904,  1915,  1917,  1921,  1924,  1927,  1930,  1934,  1938,
+    1942,  1946,  1950,  1954,  1958,  1962,  1966,  1970,  1974,  1978,
+    1982,  1986,  1992,  1997,  2002,  2007,  2012,  2017,  2022,  2027,
+    2032,  2037,  2042,  2049,  2054,  2059,  2064,  2069,  2074,  2079,
+    2086,  2093,  2100,  2105,  2110,  2115,  2120,  2125,  2130,  2135,
+    2140,  2145,  2150,  2155,  2162,  2167,  2172,  2177,  2182,  2187,
+    2192,  2199,  2206,  2213,  2218,  2220,  2222,  2224,  2226,  2228,
+    2230,  2232,  2234,  2236,  2238,  2244,  2249,  2254,  2257,  2263,
+    2267,  2274,  2279,  2287,  2294,  2301,  2308,  2313,  2315,  2318,
+    2321,  2325,  2329,  2341,  2351,  2359,  2367,  2369,  2373,  2375,
+    2377,  2380,  2384,  2389,  2395,  2397,  2399,  2402,  2406,  2410,
+    2416,  2421,  2424,  2427,  2430,  2433,  2439,  2445,  2451,  2457,
+    2459,  2461,  2465,  2469,  2474,  2481,  2488,  2490,  2492,  2496,
+    2500,  2510,  2518,  2520,  2526,  2530,  2537,  2539,  2543,  2545,
+    2547,  2551,  2558,  2560,  2562,  2567,  2574,  2581,  2586,  2591,
+    2600,  2605,  2610,  2615,  2620,  2627,  2634,  2636
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int16 yyrhs[] =
 {
-     175,     0,    -1,   176,    -1,     1,     6,    -1,    -1,   176,
-     177,    -1,   180,    -1,   179,    -1,   198,    -1,   212,    -1,
-     217,    -1,   221,    -1,   222,    -1,   223,    -1,   226,    -1,
-     246,    -1,   247,    -1,   225,    -1,   224,    -1,   220,    -1,
-     249,    -1,   151,    -1,   151,   151,    -1,    36,   164,   262,
-     165,     6,    -1,    37,   164,   262,   165,     6,    -1,    36,
-     164,   262,   165,   178,   262,     6,    -1,    36,   164,   262,
-     170,   258,   165,     6,    -1,    37,   164,   262,   170,   258,
-     165,     6,    -1,    36,   164,   262,   170,   258,   165,   178,
-     262,     6,    -1,     4,   262,   171,   181,   172,     6,    -1,
-     100,     4,   166,   250,   167,     6,    -1,   101,     4,   166,
-     250,   167,     6,    -1,    -1,   181,   184,    -1,   181,   188,
-      -1,   181,   191,    -1,   181,   193,    -1,   181,   194,    -1,
-     250,    -1,   182,   170,   250,    -1,   250,    -1,   183,   170,
-     250,    -1,    -1,    -1,     4,   185,   164,   182,   165,   186,
-     171,   183,   172,     6,    -1,   262,    -1,   187,   170,   262,
-      -1,    -1,   106,   164,   250,   170,   250,   170,   250,   165,
-     189,   171,   187,   172,     6,    -1,   262,    -1,   190,   170,
-     262,    -1,    -1,   107,   164,   250,   170,   250,   170,   250,
-     170,   250,   165,   192,   171,   190,   172,     6,    -1,   108,
-     171,   254,   172,   171,   254,   172,     6,    -1,   108,   171,
-     254,   172,   171,   254,   172,   171,   254,   172,   171,   254,
-     172,     6,    -1,    -1,   109,   195,   171,   183,   172,     6,
-      -1,     7,    -1,   144,    -1,   143,    -1,   142,    -1,   141,
-      -1,   162,    -1,   161,    -1,    56,   166,   200,   167,     6,
-      -1,    57,   166,   203,   167,     6,    -1,     4,   196,   255,
-       6,    -1,     4,   166,   167,   196,   255,     6,    -1,     4,
-     166,   250,   167,   196,   250,     6,    -1,     4,   164,   250,
-     165,   196,   250,     6,    -1,     4,   166,   171,   258,   172,
-     167,   196,   255,     6,    -1,     4,   164,   171,   258,   172,
-     165,   196,   255,     6,    -1,     4,   197,     6,    -1,     4,
-     166,   250,   167,   197,     6,    -1,     4,     7,   263,     6,
-      -1,     4,   168,     4,     7,   263,     6,    -1,     4,   166,
-     250,   167,   168,     4,     7,   263,     6,    -1,     4,   168,
-       4,   196,   250,     6,    -1,     4,   166,   250,   167,   168,
-       4,   196,   250,     6,    -1,     4,   168,     4,   197,     6,
-      -1,     4,   166,   250,   167,   168,     4,   197,     6,    -1,
-       4,   168,   116,   168,     4,     7,   259,     6,    -1,     4,
-     166,   250,   167,   168,   116,   168,     4,     7,   259,     6,
-      -1,     4,   168,   117,     7,   260,     6,    -1,     4,   166,
-     250,   167,   168,   117,     7,   260,     6,    -1,     4,   125,
-       7,   250,     6,    -1,   125,   166,   250,   167,     7,     4,
-       6,    -1,   125,   166,   250,   167,   168,     4,     7,   250,
-       6,    -1,   125,   166,   250,   167,   168,     4,     7,   263,
-       6,    -1,   125,   166,   250,   167,   168,     4,     7,   171,
-     258,   172,     6,    -1,   125,   166,   250,   167,   168,     4,
-       6,    -1,    81,   164,     4,   165,   168,     4,     7,   250,
-       6,    -1,    81,   164,     4,   165,   168,     4,     7,   263,
-       6,    -1,    -1,   170,    -1,    -1,   200,   199,     4,    -1,
-     200,   199,     4,     7,   250,    -1,    -1,   200,   199,     4,
-       7,   171,   250,   201,   205,   172,    -1,   200,   199,     4,
-       7,   263,    -1,    -1,   200,   199,     4,     7,   171,   263,
-     202,   207,   172,    -1,    -1,   203,   199,   262,    -1,   250,
-       7,   263,    -1,   204,   170,   250,     7,   263,    -1,    -1,
-     205,   206,    -1,   170,     4,   255,    -1,   170,     4,   171,
-     204,   172,    -1,   170,     4,   263,    -1,    -1,   207,   208,
-      -1,   170,     4,   250,    -1,   170,     4,   263,    -1,   170,
-       4,   171,   264,   172,    -1,   250,    -1,   263,    -1,    -1,
-     119,    62,   171,   250,   172,    -1,    -1,    73,   252,    -1,
-      58,   164,   250,   165,     7,   252,     6,    -1,    -1,    77,
-      58,   213,   164,   209,   165,     7,   255,     6,    -1,    67,
-      68,   255,     7,   250,     6,    -1,    61,   164,   250,   165,
-       7,   255,     6,    -1,    82,    61,   255,     6,    -1,    65,
-     164,   250,   165,     7,   255,     6,    -1,    59,   164,   250,
-     165,     7,   255,   211,     6,    -1,    60,   164,   250,   165,
-       7,   255,   211,     6,    -1,   111,   164,   250,   165,     7,
-     255,     6,    -1,   112,   164,   250,   165,     7,   255,     6,
-      -1,   113,   164,   250,   165,     7,   255,   115,   255,   114,
-     250,     6,    -1,    61,     4,   164,   250,   165,     7,   255,
-       6,    -1,    78,    61,   164,   250,   165,     7,   255,     6,
-      -1,    -1,    77,    61,   214,   164,   209,   165,     7,   255,
-       6,    -1,    73,    64,   164,   250,   165,     7,   255,     6,
-      -1,    74,    64,   164,   250,   165,     7,   255,   210,     6,
-      -1,    12,    13,     6,    -1,    13,    64,   250,     6,    -1,
-      69,    64,   164,   250,   165,     7,     5,     5,     5,     6,
-      -1,    62,   164,   250,   165,     7,   255,     6,    -1,    63,
-     164,   250,   165,     7,   255,     6,    -1,    64,     4,   164,
-     250,   165,     7,   255,     6,    -1,    78,    64,   164,   250,
-     165,     7,   255,     6,    -1,    78,    64,   164,   250,   165,
-       7,   255,     4,   171,   254,   172,     6,    -1,    -1,    77,
-      64,   215,   164,   209,   165,     7,   255,     6,    -1,    76,
-      66,   164,   250,   165,     7,   255,     6,    -1,    66,   164,
-     250,   165,     7,   255,     6,    -1,    78,    66,   164,   250,
-     165,     7,   255,     6,    -1,    -1,    77,    66,   216,   164,
-     209,   165,     7,   255,     6,    -1,    85,   252,   171,   218,
-     172,    -1,    84,   171,   252,   170,   252,   170,   250,   172,
-     171,   218,   172,    -1,    86,   252,   171,   218,   172,    -1,
-      87,   171,   252,   170,   250,   172,   171,   218,   172,    -1,
-      87,   171,   252,   170,   252,   172,   171,   218,   172,    -1,
-       4,   171,   218,   172,    -1,    95,    61,   171,   258,   172,
-      64,   171,   250,   172,    -1,    92,    61,   164,   250,   165,
-     171,   258,   172,     6,    -1,   219,    -1,   217,    -1,    -1,
-     219,   212,    -1,   219,    58,   171,   258,   172,     6,    -1,
-     219,    61,   171,   258,   172,     6,    -1,   219,    64,   171,
-     258,   172,     6,    -1,   219,    66,   171,   258,   172,     6,
-      -1,    89,    73,   164,   250,   165,     7,   255,     6,    -1,
-      89,    58,   164,   250,   165,     7,   171,   254,   172,     6,
-      -1,    89,    73,   164,   250,   165,     7,   171,   252,   170,
-     252,   170,   258,   172,     6,    -1,    89,    73,   164,   250,
-     165,     7,   171,   252,   170,   252,   170,   252,   170,   258,
-     172,     6,    -1,    89,    62,   164,   250,   165,     7,   171,
-     252,   170,   258,   172,     6,    -1,    89,     4,   164,   250,
-     165,     7,   255,     6,    -1,    89,     4,   164,   250,   165,
-       7,     5,     6,    -1,    89,     4,   171,   250,   172,     6,
-      -1,    89,     4,   164,   250,   165,     7,   171,   252,   170,
-     252,   170,   258,   172,     6,    -1,    93,   171,   219,   172,
-      -1,    93,   125,   166,   250,   167,     6,    -1,    93,     4,
-     166,   250,   167,     6,    -1,    93,     4,     6,    -1,    93,
-       4,     4,     6,    -1,   116,   259,   171,   219,   172,    -1,
-      83,   116,   259,   171,   219,   172,    -1,   129,     5,     6,
-      -1,   130,     5,     6,    -1,   129,   171,   219,   172,    -1,
-      83,   129,   171,   219,   172,    -1,   130,   171,   219,   172,
-      -1,    83,   130,   171,   219,   172,    -1,     4,   263,     6,
-      -1,     4,     4,   166,   250,   167,   262,     6,    -1,     4,
-       4,     4,   166,   250,   167,     6,    -1,     4,   250,     6,
-      -1,    81,   164,     4,   165,   168,     4,     6,    -1,   110,
-       4,     6,    -1,   123,     6,    -1,   124,     6,    -1,    52,
-       6,    -1,    47,     6,    -1,    47,   171,   250,   170,   250,
-     170,   250,   170,   250,   170,   250,   170,   250,   172,     6,
+     178,     0,    -1,   179,    -1,     1,     6,    -1,    -1,   179,
+     180,    -1,   183,    -1,   182,    -1,   201,    -1,   215,    -1,
+     220,    -1,   224,    -1,   225,    -1,   226,    -1,   229,    -1,
+     249,    -1,   250,    -1,   228,    -1,   227,    -1,   223,    -1,
+     252,    -1,   154,    -1,   154,   154,    -1,    36,   167,   265,
+     168,     6,    -1,    37,   167,   265,   168,     6,    -1,    36,
+     167,   265,   168,   181,   265,     6,    -1,    36,   167,   265,
+     173,   261,   168,     6,    -1,    37,   167,   265,   173,   261,
+     168,     6,    -1,    36,   167,   265,   173,   261,   168,   181,
+     265,     6,    -1,     4,   265,   174,   184,   175,     6,    -1,
+     101,     4,   169,   253,   170,     6,    -1,   102,     4,   169,
+     253,   170,     6,    -1,    -1,   184,   187,    -1,   184,   191,
+      -1,   184,   194,    -1,   184,   196,    -1,   184,   197,    -1,
+     253,    -1,   185,   173,   253,    -1,   253,    -1,   186,   173,
+     253,    -1,    -1,    -1,     4,   188,   167,   185,   168,   189,
+     174,   186,   175,     6,    -1,   265,    -1,   190,   173,   265,
+      -1,    -1,   109,   167,   253,   173,   253,   173,   253,   168,
+     192,   174,   190,   175,     6,    -1,   265,    -1,   193,   173,
+     265,    -1,    -1,   110,   167,   253,   173,   253,   173,   253,
+     173,   253,   168,   195,   174,   193,   175,     6,    -1,   111,
+     174,   257,   175,   174,   257,   175,     6,    -1,   111,   174,
+     257,   175,   174,   257,   175,   174,   257,   175,   174,   257,
+     175,     6,    -1,    -1,   112,   198,   174,   186,   175,     6,
+      -1,     7,    -1,   147,    -1,   146,    -1,   145,    -1,   144,
+      -1,   165,    -1,   164,    -1,    56,   169,   203,   170,     6,
+      -1,    57,   169,   206,   170,     6,    -1,     4,   199,   258,
+       6,    -1,     4,   169,   170,   199,   258,     6,    -1,     4,
+     169,   253,   170,   199,   253,     6,    -1,     4,   167,   253,
+     168,   199,   253,     6,    -1,     4,   169,   174,   261,   175,
+     170,   199,   258,     6,    -1,     4,   167,   174,   261,   175,
+     168,   199,   258,     6,    -1,     4,   200,     6,    -1,     4,
+     169,   253,   170,   200,     6,    -1,     4,     7,   266,     6,
+      -1,     4,   171,     4,     7,   266,     6,    -1,     4,   169,
+     253,   170,   171,     4,     7,   266,     6,    -1,     4,   171,
+       4,   199,   253,     6,    -1,     4,   169,   253,   170,   171,
+       4,   199,   253,     6,    -1,     4,   171,     4,   200,     6,
+      -1,     4,   169,   253,   170,   171,     4,   200,     6,    -1,
+       4,   171,   119,   171,     4,     7,   262,     6,    -1,     4,
+     169,   253,   170,   171,   119,   171,     4,     7,   262,     6,
+      -1,     4,   171,   120,     7,   263,     6,    -1,     4,   169,
+     253,   170,   171,   120,     7,   263,     6,    -1,     4,   128,
+       7,   253,     6,    -1,   128,   169,   253,   170,     7,     4,
+       6,    -1,   128,   169,   253,   170,   171,     4,     7,   253,
+       6,    -1,   128,   169,   253,   170,   171,     4,     7,   266,
+       6,    -1,   128,   169,   253,   170,   171,     4,     7,   174,
+     261,   175,     6,    -1,   128,   169,   253,   170,   171,     4,
+       6,    -1,    81,   167,     4,   168,   171,     4,     7,   253,
+       6,    -1,    81,   167,     4,   168,   171,     4,     7,   266,
+       6,    -1,    -1,   173,    -1,    -1,   203,   202,     4,    -1,
+     203,   202,     4,     7,   253,    -1,    -1,   203,   202,     4,
+       7,   174,   253,   204,   208,   175,    -1,   203,   202,     4,
+       7,   266,    -1,    -1,   203,   202,     4,     7,   174,   266,
+     205,   210,   175,    -1,    -1,   206,   202,   265,    -1,   253,
+       7,   266,    -1,   207,   173,   253,     7,   266,    -1,    -1,
+     208,   209,    -1,   173,     4,   258,    -1,   173,     4,   174,
+     207,   175,    -1,   173,     4,   266,    -1,    -1,   210,   211,
+      -1,   173,     4,   253,    -1,   173,     4,   266,    -1,   173,
+       4,   174,   267,   175,    -1,   253,    -1,   266,    -1,    -1,
+     122,    62,   174,   253,   175,    -1,    -1,    73,   255,    -1,
+      58,   167,   253,   168,     7,   255,     6,    -1,    -1,    77,
+      58,   216,   167,   212,   168,     7,   258,     6,    -1,    67,
+      68,   258,     7,   253,     6,    -1,    61,   167,   253,   168,
+       7,   258,     6,    -1,    82,    61,   258,     6,    -1,    65,
+     167,   253,   168,     7,   258,     6,    -1,    59,   167,   253,
+     168,     7,   258,   214,     6,    -1,    60,   167,   253,   168,
+       7,   258,   214,     6,    -1,   114,   167,   253,   168,     7,
+     258,     6,    -1,   115,   167,   253,   168,     7,   258,     6,
+      -1,   116,   167,   253,   168,     7,   258,   118,   258,   117,
+     253,     6,    -1,    61,     4,   167,   253,   168,     7,   258,
+       6,    -1,    78,    61,   167,   253,   168,     7,   258,     6,
+      -1,    -1,    77,    61,   217,   167,   212,   168,     7,   258,
+       6,    -1,    73,    64,   167,   253,   168,     7,   258,     6,
+      -1,    74,    64,   167,   253,   168,     7,   258,   213,     6,
+      -1,    12,    13,     6,    -1,    13,    64,   253,     6,    -1,
+      69,    64,   167,   253,   168,     7,     5,     5,     5,     6,
+      -1,    62,   167,   253,   168,     7,   258,     6,    -1,    63,
+     167,   253,   168,     7,   258,     6,    -1,    64,     4,   167,
+     253,   168,     7,   258,     6,    -1,    78,    64,   167,   253,
+     168,     7,   258,     6,    -1,    78,    64,   167,   253,   168,
+       7,   258,     4,   174,   257,   175,     6,    -1,    -1,    77,
+      64,   218,   167,   212,   168,     7,   258,     6,    -1,    76,
+      66,   167,   253,   168,     7,   258,     6,    -1,    66,   167,
+     253,   168,     7,   258,     6,    -1,    78,    66,   167,   253,
+     168,     7,   258,     6,    -1,    -1,    77,    66,   219,   167,
+     212,   168,     7,   258,     6,    -1,    85,   255,   174,   221,
+     175,    -1,    84,   174,   255,   173,   255,   173,   253,   175,
+     174,   221,   175,    -1,    86,   255,   174,   221,   175,    -1,
+      87,   174,   255,   173,   253,   175,   174,   221,   175,    -1,
+      87,   174,   255,   173,   255,   175,   174,   221,   175,    -1,
+       4,   174,   221,   175,    -1,    95,    61,   174,   261,   175,
+      64,   174,   253,   175,    -1,    92,    61,   167,   253,   168,
+     174,   261,   175,     6,    -1,   222,    -1,   220,    -1,    -1,
+     222,   215,    -1,   222,    58,   174,   261,   175,     6,    -1,
+     222,    61,   174,   261,   175,     6,    -1,   222,    64,   174,
+     261,   175,     6,    -1,   222,    66,   174,   261,   175,     6,
+      -1,    89,    73,   167,   253,   168,     7,   258,     6,    -1,
+      89,    58,   167,   253,   168,     7,   174,   257,   175,     6,
+      -1,    89,    73,   167,   253,   168,     7,   174,   255,   173,
+     255,   173,   261,   175,     6,    -1,    89,    73,   167,   253,
+     168,     7,   174,   255,   173,   255,   173,   255,   173,   261,
+     175,     6,    -1,    89,    62,   167,   253,   168,     7,   174,
+     255,   173,   261,   175,     6,    -1,    89,     4,   167,   253,
+     168,     7,   258,     6,    -1,    89,     4,   167,   253,   168,
+       7,     5,     6,    -1,    89,     4,   174,   253,   175,     6,
+      -1,    89,     4,   167,   253,   168,     7,   174,   255,   173,
+     255,   173,   261,   175,     6,    -1,    93,   174,   222,   175,
+      -1,    93,   128,   169,   253,   170,     6,    -1,    93,     4,
+     169,   253,   170,     6,    -1,    93,     4,     6,    -1,    93,
+       4,     4,     6,    -1,   119,   262,   174,   222,   175,    -1,
+      83,   119,   262,   174,   222,   175,    -1,   132,     5,     6,
+      -1,   133,     5,     6,    -1,   132,   174,   222,   175,    -1,
+      83,   132,   174,   222,   175,    -1,   133,   174,   222,   175,
+      -1,    83,   133,   174,   222,   175,    -1,     4,   266,     6,
+      -1,     4,     4,   169,   253,   170,   265,     6,    -1,     4,
+       4,     4,   169,   253,   170,     6,    -1,     4,   253,     6,
+      -1,    81,   167,     4,   168,   171,     4,     6,    -1,   113,
+       4,     6,    -1,   126,     6,    -1,   127,     6,    -1,    52,
+       6,    -1,    47,     6,    -1,    47,   174,   253,   173,   253,
+     173,   253,   173,   253,   173,   253,   173,   253,   175,     6,
       -1,    48,     6,    -1,    53,     6,    -1,    54,     6,    -1,
-      71,     6,    -1,    72,   171,   258,   172,   171,   258,   172,
-     171,   254,   172,   171,   250,   170,   250,   172,     6,    -1,
-     137,   250,     6,    -1,   118,   164,   250,     8,   250,   165,
-      -1,   118,   164,   250,     8,   250,     8,   250,   165,    -1,
-     118,     4,   119,   171,   250,     8,   250,   172,    -1,   118,
-       4,   119,   171,   250,     8,   250,     8,   250,   172,    -1,
-     120,    -1,   128,     4,    -1,   126,    -1,   127,     4,     6,
-      -1,   121,   164,   250,   165,    -1,   122,    -1,    88,   252,
-     171,   219,   172,    -1,    88,   171,   252,   170,   252,   170,
-     250,   172,   171,   219,   172,    -1,    88,   171,   252,   170,
-     252,   170,   252,   170,   250,   172,   171,   219,   172,    -1,
-      -1,    88,   252,   171,   219,   227,   240,   172,    -1,    -1,
-      88,   171,   252,   170,   252,   170,   250,   172,   171,   219,
-     228,   240,   172,    -1,    -1,    88,   171,   252,   170,   252,
-     170,   252,   170,   250,   172,   171,   219,   229,   240,   172,
-      -1,    -1,    88,   171,   219,   230,   240,   172,    -1,    88,
-      58,   171,   250,   170,   252,   172,     6,    -1,    88,    61,
-     171,   250,   170,   252,   172,     6,    -1,    88,    64,   171,
-     250,   170,   252,   172,     6,    -1,    88,    58,   171,   250,
-     170,   252,   170,   252,   170,   250,   172,     6,    -1,    88,
-      61,   171,   250,   170,   252,   170,   252,   170,   250,   172,
-       6,    -1,    88,    64,   171,   250,   170,   252,   170,   252,
-     170,   250,   172,     6,    -1,    88,    58,   171,   250,   170,
-     252,   170,   252,   170,   252,   170,   250,   172,     6,    -1,
-      88,    61,   171,   250,   170,   252,   170,   252,   170,   252,
-     170,   250,   172,     6,    -1,    88,    64,   171,   250,   170,
-     252,   170,   252,   170,   252,   170,   250,   172,     6,    -1,
-      -1,    88,    58,   171,   250,   170,   252,   172,   231,   171,
-     240,   172,     6,    -1,    -1,    88,    61,   171,   250,   170,
-     252,   172,   232,   171,   240,   172,     6,    -1,    -1,    88,
-      64,   171,   250,   170,   252,   172,   233,   171,   240,   172,
-       6,    -1,    -1,    88,    58,   171,   250,   170,   252,   170,
-     252,   170,   250,   172,   234,   171,   240,   172,     6,    -1,
-      -1,    88,    61,   171,   250,   170,   252,   170,   252,   170,
-     250,   172,   235,   171,   240,   172,     6,    -1,    -1,    88,
-      64,   171,   250,   170,   252,   170,   252,   170,   250,   172,
-     236,   171,   240,   172,     6,    -1,    -1,    88,    58,   171,
-     250,   170,   252,   170,   252,   170,   252,   170,   250,   172,
-     237,   171,   240,   172,     6,    -1,    -1,    88,    61,   171,
-     250,   170,   252,   170,   252,   170,   252,   170,   250,   172,
-     238,   171,   240,   172,     6,    -1,    -1,    88,    64,   171,
-     250,   170,   252,   170,   252,   170,   252,   170,   250,   172,
-     239,   171,   240,   172,     6,    -1,   241,    -1,   240,   241,
-      -1,    98,   171,   250,   172,     6,    -1,    98,   171,   255,
-     170,   255,   172,     6,    -1,    98,   171,   255,   170,   255,
-     170,   255,   172,     6,    -1,    90,     6,    -1,   102,     6,
-      -1,   102,   104,     6,    -1,   103,     6,    -1,   103,   104,
-       6,    -1,    99,   164,   250,   165,     7,   255,    80,   250,
-       6,    -1,    80,     4,   166,   250,   167,     6,    -1,    -1,
-      80,     4,   250,    -1,    -1,     4,    -1,    -1,     7,   255,
-      -1,    -1,     7,   250,    -1,    75,    61,   256,     7,   250,
-     242,     6,    -1,    75,    64,   256,   244,   243,     6,    -1,
-      70,    64,   171,   250,   172,     7,   255,     6,    -1,    75,
-      66,   256,   244,     6,    -1,   105,   256,     6,    -1,    96,
-      64,   171,   258,   172,   250,     6,    -1,    90,    64,   256,
-     245,     6,    -1,    90,    66,   256,     6,    -1,    91,    64,
-     255,     7,   250,     6,    -1,    79,    61,   255,     7,   255,
-       6,    -1,    79,    64,   250,   171,   258,   172,     7,   250,
-     171,   258,   172,     6,    -1,    58,   171,   258,   172,   119,
-      64,   171,   250,   172,     6,    -1,    61,   171,   258,   172,
-     119,    64,   171,   250,   172,     6,    -1,    58,   171,   258,
-     172,   119,    66,   171,   250,   172,     6,    -1,    61,   171,
-     258,   172,   119,    66,   171,   250,   172,     6,    -1,    64,
-     171,   258,   172,   119,    66,   171,   250,   172,     6,    -1,
-      97,    64,   256,     6,    -1,    97,    61,   256,     6,    -1,
-      94,     6,    -1,    94,     4,     6,    -1,    94,    58,   171,
-     258,   172,     6,    -1,   134,    -1,   135,    -1,   136,    -1,
-     248,     6,    -1,   248,   171,   255,   172,     6,    -1,   248,
-     171,   255,   170,   255,   172,     6,    -1,   248,   164,   255,
-     165,   171,   255,   170,   255,   172,     6,    -1,   251,    -1,
-     164,   250,   165,    -1,   155,   250,    -1,   154,   250,    -1,
-     159,   250,    -1,   250,   155,   250,    -1,   250,   154,   250,
-      -1,   250,   156,   250,    -1,   250,   157,   250,    -1,   250,
-     158,   250,    -1,   250,   163,   250,    -1,   250,   150,   250,
-      -1,   250,   151,   250,    -1,   250,   153,   250,    -1,   250,
-     152,   250,    -1,   250,   149,   250,    -1,   250,   148,   250,
-      -1,   250,   147,   250,    -1,   250,   146,   250,    -1,   250,
-     145,   250,     8,   250,    -1,    14,   164,   250,   165,    -1,
-      15,   164,   250,   165,    -1,    16,   164,   250,   165,    -1,
-      17,   164,   250,   165,    -1,    18,   164,   250,   165,    -1,
-      19,   164,   250,   165,    -1,    20,   164,   250,   165,    -1,
-      21,   164,   250,   165,    -1,    22,   164,   250,   165,    -1,
-      24,   164,   250,   165,    -1,    25,   164,   250,   170,   250,
-     165,    -1,    26,   164,   250,   165,    -1,    27,   164,   250,
-     165,    -1,    28,   164,   250,   165,    -1,    29,   164,   250,
-     165,    -1,    30,   164,   250,   165,    -1,    31,   164,   250,
-     165,    -1,    32,   164,   250,   170,   250,   165,    -1,    33,
-     164,   250,   170,   250,   165,    -1,    34,   164,   250,   170,
-     250,   165,    -1,    23,   164,   250,   165,    -1,    14,   166,
-     250,   167,    -1,    15,   166,   250,   167,    -1,    16,   166,
-     250,   167,    -1,    17,   166,   250,   167,    -1,    18,   166,
-     250,   167,    -1,    19,   166,   250,   167,    -1,    20,   166,
-     250,   167,    -1,    21,   166,   250,   167,    -1,    22,   166,
-     250,   167,    -1,    24,   166,   250,   167,    -1,    25,   166,
-     250,   170,   250,   167,    -1,    26,   166,   250,   167,    -1,
-      27,   166,   250,   167,    -1,    28,   166,   250,   167,    -1,
-      29,   166,   250,   167,    -1,    30,   166,   250,   167,    -1,
-      31,   166,   250,   167,    -1,    32,   166,   250,   170,   250,
-     167,    -1,    33,   166,   250,   170,   250,   167,    -1,    34,
-     166,   250,   170,   250,   167,    -1,    23,   166,   250,   167,
-      -1,     3,    -1,     9,    -1,    10,    -1,    11,    -1,   138,
-      -1,   139,    -1,   140,    -1,    50,    -1,    51,    -1,     4,
-      -1,     4,   173,   171,   250,   172,    -1,     4,   166,   250,
-     167,    -1,   169,     4,   166,   167,    -1,     4,   197,    -1,
-       4,   166,   250,   167,   197,    -1,     4,   168,     4,    -1,
-       4,   166,   250,   167,   168,     4,    -1,     4,   168,     4,
-     197,    -1,     4,   166,   250,   167,   168,     4,   197,    -1,
-     131,   164,   262,   170,   250,   165,    -1,    44,   164,   262,
-     170,   262,   165,    -1,    45,   164,   262,   170,   262,   165,
-      -1,    46,   164,   264,   165,    -1,   253,    -1,   155,   252,
-      -1,   154,   252,    -1,   252,   155,   252,    -1,   252,   154,
-     252,    -1,   171,   250,   170,   250,   170,   250,   170,   250,
-     170,   250,   172,    -1,   171,   250,   170,   250,   170,   250,
-     170,   250,   172,    -1,   171,   250,   170,   250,   170,   250,
-     172,    -1,   164,   250,   170,   250,   170,   250,   165,    -1,
-     255,    -1,   254,   170,   255,    -1,   250,    -1,   257,    -1,
-     171,   172,    -1,   171,   258,   172,    -1,   155,   171,   258,
-     172,    -1,   250,   156,   171,   258,   172,    -1,   255,    -1,
-       5,    -1,   155,   257,    -1,   250,   156,   257,    -1,   250,
-       8,   250,    -1,   250,     8,   250,     8,   250,    -1,    58,
-     171,   250,   172,    -1,    58,     5,    -1,    61,     5,    -1,
-      64,     5,    -1,    66,     5,    -1,    77,    58,   171,   258,
-     172,    -1,    77,    61,   171,   258,   172,    -1,    77,    64,
-     171,   258,   172,    -1,    77,    66,   171,   258,   172,    -1,
-     217,    -1,   226,    -1,     4,   166,   167,    -1,     4,   164,
-     165,    -1,    35,   166,     4,   167,    -1,     4,   166,   171,
-     258,   172,   167,    -1,     4,   164,   171,   258,   172,   165,
-      -1,   250,    -1,   257,    -1,   258,   170,   250,    -1,   258,
-     170,   257,    -1,   171,   250,   170,   250,   170,   250,   170,
-     250,   172,    -1,   171,   250,   170,   250,   170,   250,   172,
-      -1,     4,    -1,     4,   168,   116,   168,     4,    -1,   171,
-     261,   172,    -1,     4,   166,   250,   167,   168,   117,    -1,
-     259,    -1,   261,   170,   259,    -1,   263,    -1,     4,    -1,
-       4,   168,     4,    -1,     4,   166,   250,   167,   168,     4,
-      -1,     5,    -1,    49,    -1,   132,   164,   262,   165,    -1,
-     133,   164,   262,   170,   262,   165,    -1,    40,   164,   262,
-     170,   262,   165,    -1,    41,   164,   262,   165,    -1,    42,
-     164,   262,   165,    -1,    43,   164,   262,   170,   262,   170,
-     262,   165,    -1,    38,   164,   264,   165,    -1,    38,   166,
-     264,   167,    -1,    39,   164,   262,   165,    -1,    39,   166,
-     262,   167,    -1,    39,   164,   262,   170,   258,   165,    -1,
-      39,   166,   262,   170,   258,   167,    -1,   262,    -1,   264,
-     170,   262,    -1
+      71,     6,    -1,    72,   174,   261,   175,   174,   261,   175,
+     174,   257,   175,   174,   253,   173,   253,   175,     6,    -1,
+     140,   253,     6,    -1,   121,   167,   253,     8,   253,   168,
+      -1,   121,   167,   253,     8,   253,     8,   253,   168,    -1,
+     121,     4,   122,   174,   253,     8,   253,   175,    -1,   121,
+       4,   122,   174,   253,     8,   253,     8,   253,   175,    -1,
+     123,    -1,   131,     4,    -1,   129,    -1,   130,     4,     6,
+      -1,   124,   167,   253,   168,    -1,   125,    -1,    88,   255,
+     174,   222,   175,    -1,    88,   174,   255,   173,   255,   173,
+     253,   175,   174,   222,   175,    -1,    88,   174,   255,   173,
+     255,   173,   255,   173,   253,   175,   174,   222,   175,    -1,
+      -1,    88,   255,   174,   222,   230,   243,   175,    -1,    -1,
+      88,   174,   255,   173,   255,   173,   253,   175,   174,   222,
+     231,   243,   175,    -1,    -1,    88,   174,   255,   173,   255,
+     173,   255,   173,   253,   175,   174,   222,   232,   243,   175,
+      -1,    -1,    88,   174,   222,   233,   243,   175,    -1,    88,
+      58,   174,   253,   173,   255,   175,     6,    -1,    88,    61,
+     174,   253,   173,   255,   175,     6,    -1,    88,    64,   174,
+     253,   173,   255,   175,     6,    -1,    88,    58,   174,   253,
+     173,   255,   173,   255,   173,   253,   175,     6,    -1,    88,
+      61,   174,   253,   173,   255,   173,   255,   173,   253,   175,
+       6,    -1,    88,    64,   174,   253,   173,   255,   173,   255,
+     173,   253,   175,     6,    -1,    88,    58,   174,   253,   173,
+     255,   173,   255,   173,   255,   173,   253,   175,     6,    -1,
+      88,    61,   174,   253,   173,   255,   173,   255,   173,   255,
+     173,   253,   175,     6,    -1,    88,    64,   174,   253,   173,
+     255,   173,   255,   173,   255,   173,   253,   175,     6,    -1,
+      -1,    88,    58,   174,   253,   173,   255,   175,   234,   174,
+     243,   175,     6,    -1,    -1,    88,    61,   174,   253,   173,
+     255,   175,   235,   174,   243,   175,     6,    -1,    -1,    88,
+      64,   174,   253,   173,   255,   175,   236,   174,   243,   175,
+       6,    -1,    -1,    88,    58,   174,   253,   173,   255,   173,
+     255,   173,   253,   175,   237,   174,   243,   175,     6,    -1,
+      -1,    88,    61,   174,   253,   173,   255,   173,   255,   173,
+     253,   175,   238,   174,   243,   175,     6,    -1,    -1,    88,
+      64,   174,   253,   173,   255,   173,   255,   173,   253,   175,
+     239,   174,   243,   175,     6,    -1,    -1,    88,    58,   174,
+     253,   173,   255,   173,   255,   173,   255,   173,   253,   175,
+     240,   174,   243,   175,     6,    -1,    -1,    88,    61,   174,
+     253,   173,   255,   173,   255,   173,   255,   173,   253,   175,
+     241,   174,   243,   175,     6,    -1,    -1,    88,    64,   174,
+     253,   173,   255,   173,   255,   173,   255,   173,   253,   175,
+     242,   174,   243,   175,     6,    -1,   244,    -1,   243,   244,
+      -1,    98,   174,   253,   175,     6,    -1,    98,   174,   258,
+     173,   258,   175,     6,    -1,    98,   174,   258,   173,   258,
+     173,   258,   175,     6,    -1,    99,     6,    -1,    90,     6,
+      -1,   105,     6,    -1,   105,   107,     6,    -1,   106,     6,
+      -1,   106,   107,     6,    -1,   103,     6,    -1,   103,   107,
+       6,    -1,   104,     6,    -1,   104,   107,     6,    -1,   100,
+     167,   253,   168,     7,   258,    80,   253,     6,    -1,    80,
+       4,   169,   253,   170,     6,    -1,    -1,    80,     4,   253,
+      -1,    -1,     4,    -1,    -1,     7,   258,    -1,    -1,     7,
+     253,    -1,    75,    61,   259,     7,   253,   245,     6,    -1,
+      75,    64,   259,   247,   246,     6,    -1,    70,    64,   174,
+     253,   175,     7,   258,     6,    -1,    75,    66,   259,   247,
+       6,    -1,   108,   259,     6,    -1,    96,    64,   174,   261,
+     175,   253,     6,    -1,    90,    64,   259,   248,     6,    -1,
+      90,    66,   259,     6,    -1,    91,    64,   258,     7,   253,
+       6,    -1,    79,    61,   258,     7,   258,     6,    -1,    79,
+      64,   253,   174,   261,   175,     7,   253,   174,   261,   175,
+       6,    -1,    58,   174,   261,   175,   122,    64,   174,   253,
+     175,     6,    -1,    61,   174,   261,   175,   122,    64,   174,
+     253,   175,     6,    -1,    58,   174,   261,   175,   122,    66,
+     174,   253,   175,     6,    -1,    61,   174,   261,   175,   122,
+      66,   174,   253,   175,     6,    -1,    64,   174,   261,   175,
+     122,    66,   174,   253,   175,     6,    -1,    97,    64,   259,
+       6,    -1,    97,    61,   259,     6,    -1,    94,     6,    -1,
+      94,     4,     6,    -1,    94,    58,   174,   261,   175,     6,
+      -1,   137,    -1,   138,    -1,   139,    -1,   251,     6,    -1,
+     251,   174,   258,   175,     6,    -1,   251,   174,   258,   173,
+     258,   175,     6,    -1,   251,   167,   258,   168,   174,   258,
+     173,   258,   175,     6,    -1,   254,    -1,   167,   253,   168,
+      -1,   158,   253,    -1,   157,   253,    -1,   162,   253,    -1,
+     253,   158,   253,    -1,   253,   157,   253,    -1,   253,   159,
+     253,    -1,   253,   160,   253,    -1,   253,   161,   253,    -1,
+     253,   166,   253,    -1,   253,   153,   253,    -1,   253,   154,
+     253,    -1,   253,   156,   253,    -1,   253,   155,   253,    -1,
+     253,   152,   253,    -1,   253,   151,   253,    -1,   253,   150,
+     253,    -1,   253,   149,   253,    -1,   253,   148,   253,     8,
+     253,    -1,    14,   167,   253,   168,    -1,    15,   167,   253,
+     168,    -1,    16,   167,   253,   168,    -1,    17,   167,   253,
+     168,    -1,    18,   167,   253,   168,    -1,    19,   167,   253,
+     168,    -1,    20,   167,   253,   168,    -1,    21,   167,   253,
+     168,    -1,    22,   167,   253,   168,    -1,    24,   167,   253,
+     168,    -1,    25,   167,   253,   173,   253,   168,    -1,    26,
+     167,   253,   168,    -1,    27,   167,   253,   168,    -1,    28,
+     167,   253,   168,    -1,    29,   167,   253,   168,    -1,    30,
+     167,   253,   168,    -1,    31,   167,   253,   168,    -1,    32,
+     167,   253,   173,   253,   168,    -1,    33,   167,   253,   173,
+     253,   168,    -1,    34,   167,   253,   173,   253,   168,    -1,
+      23,   167,   253,   168,    -1,    14,   169,   253,   170,    -1,
+      15,   169,   253,   170,    -1,    16,   169,   253,   170,    -1,
+      17,   169,   253,   170,    -1,    18,   169,   253,   170,    -1,
+      19,   169,   253,   170,    -1,    20,   169,   253,   170,    -1,
+      21,   169,   253,   170,    -1,    22,   169,   253,   170,    -1,
+      24,   169,   253,   170,    -1,    25,   169,   253,   173,   253,
+     170,    -1,    26,   169,   253,   170,    -1,    27,   169,   253,
+     170,    -1,    28,   169,   253,   170,    -1,    29,   169,   253,
+     170,    -1,    30,   169,   253,   170,    -1,    31,   169,   253,
+     170,    -1,    32,   169,   253,   173,   253,   170,    -1,    33,
+     169,   253,   173,   253,   170,    -1,    34,   169,   253,   173,
+     253,   170,    -1,    23,   169,   253,   170,    -1,     3,    -1,
+       9,    -1,    10,    -1,    11,    -1,   141,    -1,   142,    -1,
+     143,    -1,    50,    -1,    51,    -1,     4,    -1,     4,   176,
+     174,   253,   175,    -1,     4,   169,   253,   170,    -1,   172,
+       4,   169,   170,    -1,     4,   200,    -1,     4,   169,   253,
+     170,   200,    -1,     4,   171,     4,    -1,     4,   169,   253,
+     170,   171,     4,    -1,     4,   171,     4,   200,    -1,     4,
+     169,   253,   170,   171,     4,   200,    -1,   134,   167,   265,
+     173,   253,   168,    -1,    44,   167,   265,   173,   265,   168,
+      -1,    45,   167,   265,   173,   265,   168,    -1,    46,   167,
+     267,   168,    -1,   256,    -1,   158,   255,    -1,   157,   255,
+      -1,   255,   158,   255,    -1,   255,   157,   255,    -1,   174,
+     253,   173,   253,   173,   253,   173,   253,   173,   253,   175,
+      -1,   174,   253,   173,   253,   173,   253,   173,   253,   175,
+      -1,   174,   253,   173,   253,   173,   253,   175,    -1,   167,
+     253,   173,   253,   173,   253,   168,    -1,   258,    -1,   257,
+     173,   258,    -1,   253,    -1,   260,    -1,   174,   175,    -1,
+     174,   261,   175,    -1,   158,   174,   261,   175,    -1,   253,
+     159,   174,   261,   175,    -1,   258,    -1,     5,    -1,   158,
+     260,    -1,   253,   159,   260,    -1,   253,     8,   253,    -1,
+     253,     8,   253,     8,   253,    -1,    58,   174,   253,   175,
+      -1,    58,     5,    -1,    61,     5,    -1,    64,     5,    -1,
+      66,     5,    -1,    77,    58,   174,   261,   175,    -1,    77,
+      61,   174,   261,   175,    -1,    77,    64,   174,   261,   175,
+      -1,    77,    66,   174,   261,   175,    -1,   220,    -1,   229,
+      -1,     4,   169,   170,    -1,     4,   167,   168,    -1,    35,
+     169,     4,   170,    -1,     4,   169,   174,   261,   175,   170,
+      -1,     4,   167,   174,   261,   175,   168,    -1,   253,    -1,
+     260,    -1,   261,   173,   253,    -1,   261,   173,   260,    -1,
+     174,   253,   173,   253,   173,   253,   173,   253,   175,    -1,
+     174,   253,   173,   253,   173,   253,   175,    -1,     4,    -1,
+       4,   171,   119,   171,     4,    -1,   174,   264,   175,    -1,
+       4,   169,   253,   170,   171,   120,    -1,   262,    -1,   264,
+     173,   262,    -1,   266,    -1,     4,    -1,     4,   171,     4,
+      -1,     4,   169,   253,   170,   171,     4,    -1,     5,    -1,
+      49,    -1,   135,   167,   265,   168,    -1,   136,   167,   265,
+     173,   265,   168,    -1,    40,   167,   265,   173,   265,   168,
+      -1,    41,   167,   265,   168,    -1,    42,   167,   265,   168,
+      -1,    43,   167,   265,   173,   265,   173,   265,   168,    -1,
+      38,   167,   267,   168,    -1,    38,   169,   267,   170,    -1,
+      39,   167,   265,   168,    -1,    39,   169,   265,   170,    -1,
+      39,   167,   265,   173,   261,   168,    -1,    39,   169,   265,
+     173,   261,   170,    -1,   265,    -1,   267,   173,   265,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
@@ -1139,39 +1147,39 @@ static const yytype_uint16 yyrline[] =
     1282,  1297,  1307,  1308,  1313,  1321,  1330,  1348,  1352,  1363,
     1366,  1379,  1382,  1392,  1416,  1415,  1435,  1457,  1475,  1496,
     1514,  1544,  1574,  1592,  1610,  1636,  1654,  1673,  1672,  1695,
-    1713,  1752,  1758,  1764,  1771,  1796,  1821,  1838,  1855,  1887,
-    1886,  1910,  1928,  1945,  1962,  1961,  1987,  1992,  1997,  2002,
-    2007,  2012,  2035,  2041,  2052,  2053,  2058,  2061,  2065,  2088,
-    2111,  2134,  2162,  2183,  2209,  2230,  2252,  2272,  2384,  2403,
-    2441,  2550,  2559,  2565,  2580,  2608,  2625,  2634,  2648,  2654,
-    2660,  2669,  2678,  2687,  2701,  2746,  2763,  2778,  2797,  2809,
-    2833,  2837,  2842,  2849,  2855,  2860,  2866,  2870,  2874,  2879,
-    2934,  2947,  2964,  2981,  3002,  3023,  3058,  3066,  3072,  3079,
-    3083,  3092,  3100,  3108,  3117,  3116,  3130,  3129,  3143,  3142,
-    3156,  3155,  3168,  3175,  3182,  3189,  3196,  3203,  3210,  3217,
-    3224,  3232,  3231,  3244,  3243,  3256,  3255,  3268,  3267,  3280,
-    3279,  3292,  3291,  3304,  3303,  3316,  3315,  3328,  3327,  3343,
-    3346,  3352,  3364,  3384,  3407,  3411,  3415,  3419,  3423,  3427,
-    3446,  3459,  3462,  3478,  3481,  3498,  3501,  3507,  3510,  3517,
-    3573,  3643,  3648,  3715,  3751,  3759,  3802,  3841,  3861,  3888,
-    3928,  3951,  3974,  3978,  3982,  4005,  4044,  4089,  4093,  4103,
-    4138,  4139,  4140,  4144,  4150,  4162,  4180,  4208,  4209,  4210,
-    4211,  4212,  4213,  4214,  4215,  4216,  4223,  4224,  4225,  4226,
-    4227,  4228,  4229,  4230,  4231,  4232,  4233,  4234,  4235,  4236,
-    4237,  4238,  4239,  4240,  4241,  4242,  4243,  4244,  4245,  4246,
-    4247,  4248,  4249,  4250,  4251,  4252,  4253,  4254,  4257,  4258,
-    4259,  4260,  4261,  4262,  4263,  4264,  4265,  4266,  4267,  4268,
-    4269,  4270,  4271,  4272,  4273,  4274,  4275,  4276,  4277,  4286,
-    4287,  4288,  4289,  4290,  4291,  4292,  4293,  4294,  4298,  4319,
-    4338,  4356,  4368,  4385,  4406,  4411,  4416,  4426,  4436,  4441,
-    4450,  4455,  4482,  4486,  4490,  4494,  4498,  4505,  4509,  4513,
-    4517,  4524,  4529,  4536,  4541,  4545,  4550,  4554,  4562,  4573,
-    4577,  4589,  4597,  4605,  4612,  4622,  4642,  4646,  4650,  4654,
-    4658,  4687,  4716,  4745,  4774,  4784,  4794,  4807,  4819,  4831,
-    4850,  4871,  4876,  4880,  4884,  4896,  4900,  4912,  4919,  4929,
-    4933,  4948,  4953,  4960,  4964,  4977,  4985,  4996,  5000,  5008,
-    5016,  5024,  5032,  5046,  5060,  5072,  5089,  5105,  5110,  5114,
-    5134,  5156,  5161
+    1713,  1752,  1758,  1764,  1771,  1796,  1821,  1838,  1857,  1892,
+    1891,  1915,  1933,  1950,  1967,  1966,  1992,  1997,  2002,  2007,
+    2012,  2017,  2040,  2046,  2057,  2058,  2063,  2066,  2070,  2093,
+    2116,  2139,  2167,  2188,  2214,  2235,  2257,  2277,  2389,  2408,
+    2446,  2555,  2564,  2570,  2585,  2613,  2630,  2639,  2653,  2659,
+    2665,  2674,  2683,  2692,  2706,  2751,  2768,  2783,  2802,  2814,
+    2838,  2842,  2847,  2854,  2860,  2865,  2871,  2875,  2879,  2884,
+    2939,  2952,  2969,  2986,  3007,  3028,  3063,  3071,  3077,  3084,
+    3088,  3097,  3105,  3113,  3122,  3121,  3136,  3135,  3150,  3149,
+    3164,  3163,  3177,  3184,  3191,  3198,  3205,  3212,  3219,  3226,
+    3233,  3241,  3240,  3254,  3253,  3267,  3266,  3280,  3279,  3293,
+    3292,  3306,  3305,  3319,  3318,  3332,  3331,  3345,  3344,  3361,
+    3364,  3370,  3382,  3402,  3426,  3431,  3435,  3439,  3443,  3447,
+    3451,  3455,  3459,  3463,  3467,  3486,  3499,  3502,  3518,  3521,
+    3538,  3541,  3547,  3550,  3557,  3613,  3683,  3688,  3755,  3791,
+    3799,  3842,  3881,  3901,  3928,  3968,  3991,  4014,  4018,  4022,
+    4045,  4084,  4129,  4133,  4143,  4178,  4179,  4180,  4184,  4190,
+    4202,  4220,  4248,  4249,  4250,  4251,  4252,  4253,  4254,  4255,
+    4256,  4263,  4264,  4265,  4266,  4267,  4268,  4269,  4270,  4271,
+    4272,  4273,  4274,  4275,  4276,  4277,  4278,  4279,  4280,  4281,
+    4282,  4283,  4284,  4285,  4286,  4287,  4288,  4289,  4290,  4291,
+    4292,  4293,  4294,  4297,  4298,  4299,  4300,  4301,  4302,  4303,
+    4304,  4305,  4306,  4307,  4308,  4309,  4310,  4311,  4312,  4313,
+    4314,  4315,  4316,  4317,  4326,  4327,  4328,  4329,  4330,  4331,
+    4332,  4333,  4334,  4338,  4359,  4378,  4396,  4408,  4425,  4446,
+    4451,  4456,  4466,  4476,  4481,  4490,  4495,  4522,  4526,  4530,
+    4534,  4538,  4545,  4549,  4553,  4557,  4564,  4569,  4576,  4581,
+    4585,  4590,  4594,  4602,  4613,  4617,  4629,  4637,  4645,  4652,
+    4662,  4682,  4686,  4690,  4694,  4698,  4727,  4756,  4785,  4814,
+    4824,  4834,  4847,  4859,  4871,  4890,  4911,  4916,  4920,  4924,
+    4936,  4940,  4952,  4959,  4969,  4973,  4988,  4993,  5000,  5004,
+    5017,  5025,  5036,  5040,  5048,  5056,  5064,  5072,  5086,  5100,
+    5112,  5129,  5145,  5150,  5154,  5174,  5196,  5201
 };
 #endif
 
@@ -1197,8 +1205,9 @@ static const char *const yytname[] =
   "tUsing", "tPlugin", "tDegenerated", "tRecursive", "tRotate",
   "tTranslate", "tSymmetry", "tDilate", "tExtrude", "tLevelset",
   "tRecombine", "tSmoother", "tSplit", "tDelete", "tCoherence",
-  "tIntersect", "tMeshAlgorithm", "tReverse", "tLayers", "tHole", "tAlias",
-  "tAliasWithOptions", "tQuadTriDbl", "tQuadTriSngl", "tRecombLaterals",
+  "tIntersect", "tMeshAlgorithm", "tReverse", "tLayers", "tScaleLast",
+  "tHole", "tAlias", "tAliasWithOptions", "tQuadTriAddVerts",
+  "tQuadTriNoNewVerts", "tQuadTriSngl", "tQuadTriDbl", "tRecombLaterals",
   "tTransfQuadTri", "tText2D", "tText3D", "tInterpolationScheme", "tTime",
   "tCombine", "tBSpline", "tBezier", "tNurbs", "tNurbsOrder",
   "tNurbsKnots", "tColor", "tColorTable", "tFor", "tIn", "tEndFor", "tIf",
@@ -1251,63 +1260,63 @@ static const yytype_uint16 yytoknum[] =
      365,   366,   367,   368,   369,   370,   371,   372,   373,   374,
      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
      385,   386,   387,   388,   389,   390,   391,   392,   393,   394,
-     395,   396,   397,   398,   399,    63,   400,   401,   402,   403,
-      60,    62,   404,   405,    43,    45,    42,    47,    37,    33,
-     406,   407,   408,    94,    40,    41,    91,    93,    46,    35,
-      44,   123,   125,   126
+     395,   396,   397,   398,   399,   400,   401,   402,    63,   403,
+     404,   405,   406,    60,    62,   407,   408,    43,    45,    42,
+      47,    37,    33,   409,   410,   411,    94,    40,    41,    91,
+      93,    46,    35,    44,   123,   125,   126
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint16 yyr1[] =
 {
-       0,   174,   175,   175,   176,   176,   177,   177,   177,   177,
-     177,   177,   177,   177,   177,   177,   177,   177,   177,   177,
-     177,   178,   178,   179,   179,   179,   179,   179,   179,   180,
-     180,   180,   181,   181,   181,   181,   181,   181,   182,   182,
-     183,   183,   185,   186,   184,   187,   187,   189,   188,   190,
-     190,   192,   191,   193,   193,   195,   194,   196,   196,   196,
-     196,   196,   197,   197,   198,   198,   198,   198,   198,   198,
-     198,   198,   198,   198,   198,   198,   198,   198,   198,   198,
-     198,   198,   198,   198,   198,   198,   198,   198,   198,   198,
-     198,   198,   198,   199,   199,   200,   200,   200,   201,   200,
-     200,   202,   200,   203,   203,   204,   204,   205,   205,   206,
-     206,   206,   207,   207,   208,   208,   208,   209,   209,   210,
-     210,   211,   211,   212,   213,   212,   212,   212,   212,   212,
-     212,   212,   212,   212,   212,   212,   212,   214,   212,   212,
-     212,   212,   212,   212,   212,   212,   212,   212,   212,   215,
-     212,   212,   212,   212,   216,   212,   217,   217,   217,   217,
-     217,   217,   217,   217,   218,   218,   219,   219,   219,   219,
-     219,   219,   220,   220,   220,   220,   220,   220,   220,   220,
-     220,   221,   221,   221,   221,   221,   222,   222,   223,   223,
-     223,   223,   223,   223,   224,   224,   224,   224,   224,   224,
-     224,   224,   224,   224,   224,   224,   224,   224,   224,   224,
-     224,   225,   225,   225,   225,   225,   225,   225,   225,   225,
-     225,   226,   226,   226,   227,   226,   228,   226,   229,   226,
-     230,   226,   226,   226,   226,   226,   226,   226,   226,   226,
-     226,   231,   226,   232,   226,   233,   226,   234,   226,   235,
-     226,   236,   226,   237,   226,   238,   226,   239,   226,   240,
-     240,   241,   241,   241,   241,   241,   241,   241,   241,   241,
-     241,   242,   242,   243,   243,   244,   244,   245,   245,   246,
-     246,   246,   246,   246,   246,   246,   246,   246,   246,   246,
-     246,   246,   246,   246,   246,   246,   246,   247,   247,   247,
-     248,   248,   248,   249,   249,   249,   249,   250,   250,   250,
-     250,   250,   250,   250,   250,   250,   250,   250,   250,   250,
-     250,   250,   250,   250,   250,   250,   250,   250,   250,   250,
-     250,   250,   250,   250,   250,   250,   250,   250,   250,   250,
-     250,   250,   250,   250,   250,   250,   250,   250,   250,   250,
-     250,   250,   250,   250,   250,   250,   250,   250,   250,   250,
-     250,   250,   250,   250,   250,   250,   250,   250,   250,   251,
-     251,   251,   251,   251,   251,   251,   251,   251,   251,   251,
-     251,   251,   251,   251,   251,   251,   251,   251,   251,   251,
-     251,   251,   252,   252,   252,   252,   252,   253,   253,   253,
-     253,   254,   254,   255,   255,   255,   255,   255,   255,   256,
-     256,   257,   257,   257,   257,   257,   257,   257,   257,   257,
-     257,   257,   257,   257,   257,   257,   257,   257,   257,   257,
-     257,   258,   258,   258,   258,   259,   259,   259,   259,   260,
-     260,   261,   261,   262,   262,   262,   262,   263,   263,   263,
-     263,   263,   263,   263,   263,   263,   263,   263,   263,   263,
-     263,   264,   264
+       0,   177,   178,   178,   179,   179,   180,   180,   180,   180,
+     180,   180,   180,   180,   180,   180,   180,   180,   180,   180,
+     180,   181,   181,   182,   182,   182,   182,   182,   182,   183,
+     183,   183,   184,   184,   184,   184,   184,   184,   185,   185,
+     186,   186,   188,   189,   187,   190,   190,   192,   191,   193,
+     193,   195,   194,   196,   196,   198,   197,   199,   199,   199,
+     199,   199,   200,   200,   201,   201,   201,   201,   201,   201,
+     201,   201,   201,   201,   201,   201,   201,   201,   201,   201,
+     201,   201,   201,   201,   201,   201,   201,   201,   201,   201,
+     201,   201,   201,   202,   202,   203,   203,   203,   204,   203,
+     203,   205,   203,   206,   206,   207,   207,   208,   208,   209,
+     209,   209,   210,   210,   211,   211,   211,   212,   212,   213,
+     213,   214,   214,   215,   216,   215,   215,   215,   215,   215,
+     215,   215,   215,   215,   215,   215,   215,   217,   215,   215,
+     215,   215,   215,   215,   215,   215,   215,   215,   215,   218,
+     215,   215,   215,   215,   219,   215,   220,   220,   220,   220,
+     220,   220,   220,   220,   221,   221,   222,   222,   222,   222,
+     222,   222,   223,   223,   223,   223,   223,   223,   223,   223,
+     223,   224,   224,   224,   224,   224,   225,   225,   226,   226,
+     226,   226,   226,   226,   227,   227,   227,   227,   227,   227,
+     227,   227,   227,   227,   227,   227,   227,   227,   227,   227,
+     227,   228,   228,   228,   228,   228,   228,   228,   228,   228,
+     228,   229,   229,   229,   230,   229,   231,   229,   232,   229,
+     233,   229,   229,   229,   229,   229,   229,   229,   229,   229,
+     229,   234,   229,   235,   229,   236,   229,   237,   229,   238,
+     229,   239,   229,   240,   229,   241,   229,   242,   229,   243,
+     243,   244,   244,   244,   244,   244,   244,   244,   244,   244,
+     244,   244,   244,   244,   244,   244,   245,   245,   246,   246,
+     247,   247,   248,   248,   249,   249,   249,   249,   249,   249,
+     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
+     249,   249,   250,   250,   250,   251,   251,   251,   252,   252,
+     252,   252,   253,   253,   253,   253,   253,   253,   253,   253,
+     253,   253,   253,   253,   253,   253,   253,   253,   253,   253,
+     253,   253,   253,   253,   253,   253,   253,   253,   253,   253,
+     253,   253,   253,   253,   253,   253,   253,   253,   253,   253,
+     253,   253,   253,   253,   253,   253,   253,   253,   253,   253,
+     253,   253,   253,   253,   253,   253,   253,   253,   253,   253,
+     253,   253,   253,   253,   254,   254,   254,   254,   254,   254,
+     254,   254,   254,   254,   254,   254,   254,   254,   254,   254,
+     254,   254,   254,   254,   254,   254,   254,   255,   255,   255,
+     255,   255,   256,   256,   256,   256,   257,   257,   258,   258,
+     258,   258,   258,   258,   259,   259,   260,   260,   260,   260,
+     260,   260,   260,   260,   260,   260,   260,   260,   260,   260,
+     260,   260,   260,   260,   260,   260,   261,   261,   261,   261,
+     262,   262,   262,   262,   263,   263,   264,   264,   265,   265,
+     265,   265,   266,   266,   266,   266,   266,   266,   266,   266,
+     266,   266,   266,   266,   266,   266,   267,   267
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -1339,27 +1348,27 @@ static const yytype_uint8 yyr2[] =
        0,     6,     8,     8,     8,    12,    12,    12,    14,    14,
       14,     0,    12,     0,    12,     0,    12,     0,    16,     0,
       16,     0,    16,     0,    18,     0,    18,     0,    18,     1,
-       2,     5,     7,     9,     2,     2,     3,     2,     3,     9,
-       6,     0,     3,     0,     1,     0,     2,     0,     2,     7,
-       6,     8,     5,     3,     7,     5,     4,     6,     6,    12,
-      10,    10,    10,    10,    10,     4,     4,     2,     3,     6,
-       1,     1,     1,     2,     5,     7,    10,     1,     3,     2,
-       2,     2,     3,     3,     3,     3,     3,     3,     3,     3,
-       3,     3,     3,     3,     3,     3,     5,     4,     4,     4,
-       4,     4,     4,     4,     4,     4,     4,     6,     4,     4,
-       4,     4,     4,     4,     6,     6,     6,     4,     4,     4,
-       4,     4,     4,     4,     4,     4,     4,     4,     6,     4,
-       4,     4,     4,     4,     4,     6,     6,     6,     4,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     5,
-       4,     4,     2,     5,     3,     6,     4,     7,     6,     6,
-       6,     4,     1,     2,     2,     3,     3,    11,     9,     7,
-       7,     1,     3,     1,     1,     2,     3,     4,     5,     1,
-       1,     2,     3,     3,     5,     4,     2,     2,     2,     2,
-       5,     5,     5,     5,     1,     1,     3,     3,     4,     6,
-       6,     1,     1,     3,     3,     9,     7,     1,     5,     3,
-       6,     1,     3,     1,     1,     3,     6,     1,     1,     4,
-       6,     6,     4,     4,     8,     4,     4,     4,     4,     6,
-       6,     1,     3
+       2,     5,     7,     9,     2,     2,     2,     3,     2,     3,
+       2,     3,     2,     3,     9,     6,     0,     3,     0,     1,
+       0,     2,     0,     2,     7,     6,     8,     5,     3,     7,
+       5,     4,     6,     6,    12,    10,    10,    10,    10,    10,
+       4,     4,     2,     3,     6,     1,     1,     1,     2,     5,
+       7,    10,     1,     3,     2,     2,     2,     3,     3,     3,
+       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
+       3,     5,     4,     4,     4,     4,     4,     4,     4,     4,
+       4,     4,     6,     4,     4,     4,     4,     4,     4,     6,
+       6,     6,     4,     4,     4,     4,     4,     4,     4,     4,
+       4,     4,     4,     6,     4,     4,     4,     4,     4,     4,
+       6,     6,     6,     4,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     5,     4,     4,     2,     5,     3,
+       6,     4,     7,     6,     6,     6,     4,     1,     2,     2,
+       3,     3,    11,     9,     7,     7,     1,     3,     1,     1,
+       2,     3,     4,     5,     1,     1,     2,     3,     3,     5,
+       4,     2,     2,     2,     2,     5,     5,     5,     5,     1,
+       1,     3,     3,     4,     6,     6,     1,     1,     3,     3,
+       9,     7,     1,     5,     3,     6,     1,     3,     1,     1,
+       3,     6,     1,     1,     4,     6,     6,     4,     4,     8,
+       4,     4,     4,     4,     6,     6,     1,     3
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -1374,154 +1383,155 @@ static const yytype_uint16 yydefact[] =
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,   215,     0,   220,     0,     0,
-       0,   217,     0,     0,     0,     0,   300,   301,   302,     0,
+       0,   217,     0,     0,     0,     0,   305,   306,   307,     0,
        5,     7,     6,     8,     9,    10,    19,    11,    12,    13,
-      18,    17,    14,    15,    16,     0,    20,   369,   378,   447,
-      57,   370,   371,   372,     0,     0,     0,     0,     0,     0,
+      18,    17,    14,    15,    16,     0,    20,   374,   383,   452,
+      57,   375,   376,   377,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   448,   376,   377,     0,     0,     0,
-       0,   373,   374,   375,    61,    60,    59,    58,     0,     0,
+       0,     0,     0,     0,   453,   381,   382,     0,     0,     0,
+       0,   378,   379,   380,    61,    60,    59,    58,     0,     0,
        0,    63,    62,     0,     0,     0,     0,   166,     0,     0,
-       0,   307,     0,   443,     0,     0,     0,     0,   203,     0,
+       0,   312,     0,   448,     0,     0,     0,     0,   203,     0,
      205,   202,   206,   207,    95,   103,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,   208,     0,     0,     0,     0,     0,     0,     0,
      124,   137,   149,   154,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     392,     0,     0,     0,     0,     0,   166,     0,     0,     0,
+     397,     0,     0,     0,     0,     0,   166,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,   166,     0,
-     297,     0,     0,     0,     0,     0,     0,     0,   378,   410,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   424,
-     425,   403,   409,     0,   404,     0,     0,     0,     0,   437,
+     302,     0,     0,     0,     0,     0,     0,     0,   383,   415,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   429,
+     430,   408,   414,     0,   409,     0,     0,     0,     0,   442,
        0,     0,     0,     0,     0,   200,   201,     0,     0,   216,
-       0,   166,     0,   166,   378,     0,   303,     0,     0,     0,
-       0,     0,     0,   382,     0,     0,     0,     0,     0,     0,
+       0,   166,     0,   166,   383,     0,   308,     0,     0,     0,
+       0,     0,     0,   387,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   310,   309,   311,     0,     0,     0,     0,     0,
+       0,     0,   315,   314,   316,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,   165,     0,   164,     0,    72,
      197,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,    32,   194,   141,     0,
-     444,     0,   443,     0,     0,    93,    93,     0,     0,   431,
-     432,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     449,     0,   448,     0,     0,    93,    93,     0,     0,   436,
+     437,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     275,   275,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   166,   166,     0,   394,   393,
+     280,   280,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   166,   166,     0,   399,   398,
        0,     0,     0,     0,   166,   166,     0,     0,     0,     0,
        0,     0,     0,   230,     0,   166,     0,     0,     0,     0,
-       0,   277,     0,     0,     0,     0,   184,     0,     0,     0,
-     298,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   416,     0,   417,   418,   419,     0,     0,     0,
-       0,     0,   309,   411,     0,   405,     0,     0,     0,   283,
+       0,   282,     0,     0,     0,     0,   184,     0,     0,     0,
+     303,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   421,     0,   422,   423,   424,     0,     0,     0,
+       0,     0,   314,   416,     0,   410,     0,     0,     0,   288,
      199,     0,     0,     0,     0,     0,   166,     0,     0,     0,
        0,   218,   188,     0,   189,     0,     0,   210,     0,     0,
-       0,     0,   384,     0,    74,     0,     0,     0,     0,     0,
+       0,     0,   389,     0,    74,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   461,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   466,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   308,    57,     0,     0,     0,    57,
+       0,     0,     0,     0,   313,    57,     0,     0,     0,    57,
        0,     0,     0,     0,     0,   161,     0,     0,     0,     0,
-     167,    66,     0,   325,   324,   323,   322,   318,   319,   321,
-     320,   313,   312,   314,   315,   316,   317,     0,   142,     0,
+     167,    66,     0,   330,   329,   328,   327,   323,   324,   326,
+     325,   318,   317,   319,   320,   321,   322,     0,   142,     0,
        0,     0,     0,     0,     0,     0,     0,    94,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   273,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   278,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,   128,   166,     0,
-       0,     0,     0,     0,   396,   395,     0,     0,     0,     0,
+       0,     0,     0,     0,   401,   400,     0,     0,     0,     0,
        0,     0,     0,     0,     0,   224,     0,     0,     0,     0,
-       0,     0,     0,   286,     0,     0,   185,     0,     0,   181,
-       0,     0,     0,   296,   295,     0,     0,   427,     0,   426,
-       0,     0,   384,     0,     0,     0,     0,     0,     0,     0,
-     308,   406,   413,     0,   314,   412,     0,     0,     0,     0,
+       0,     0,     0,   291,     0,     0,   185,     0,     0,   181,
+       0,     0,     0,   301,   300,     0,     0,   432,     0,   431,
+       0,     0,   389,     0,     0,     0,     0,     0,     0,     0,
+     313,   411,   418,     0,   319,   417,     0,     0,     0,     0,
        0,     0,     0,     0,   219,     0,   190,   192,     0,     0,
-       0,     0,   380,   386,     0,   327,   348,   328,   349,   329,
-     350,   330,   351,   331,   352,   332,   353,   333,   354,   334,
-     355,   335,   356,   347,   368,   336,   357,     0,     0,   338,
-     359,   339,   360,   340,   361,   341,   362,   342,   363,   343,
-     364,     0,     0,     0,     0,     0,     0,   455,     0,   456,
-     457,     0,   458,     0,     0,   452,   453,     0,     0,     0,
-     391,    85,     0,   449,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    79,     0,     0,     0,     0,   381,
+       0,     0,   385,   391,     0,   332,   353,   333,   354,   334,
+     355,   335,   356,   336,   357,   337,   358,   338,   359,   339,
+     360,   340,   361,   352,   373,   341,   362,     0,     0,   343,
+     364,   344,   365,   345,   366,   346,   367,   347,   368,   348,
+     369,     0,     0,     0,     0,     0,     0,   460,     0,   461,
+     462,     0,   463,     0,     0,   457,   458,     0,     0,     0,
+     396,    85,     0,   454,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    79,     0,     0,     0,     0,   386,
        0,     0,     0,     0,     0,    42,     0,     0,     0,    55,
-       0,    33,    34,    35,    36,    37,     0,   445,    23,    21,
+       0,    33,    34,    35,    36,    37,     0,   450,    23,    21,
        0,     0,    24,     0,     0,    64,    96,    65,   104,     0,
-     433,   434,     0,     0,     0,     0,     0,     0,     0,     0,
+     438,   439,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     271,   276,   274,     0,   282,     0,     0,   117,   118,     0,
+     276,   281,   279,     0,   287,     0,     0,   117,   118,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,   191,
      193,     0,     0,     0,   156,   158,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   259,     0,
-     221,     0,     0,     0,     0,     0,     0,   278,   285,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     380,   428,   415,     0,     0,     0,     0,   407,     0,     0,
-       0,     0,     0,     0,     0,   186,     0,     0,     0,     0,
-       0,     0,   304,     0,     0,   383,     0,   379,     0,     0,
-       0,     0,     0,     0,     0,     0,   462,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    67,     0,     0,
-       0,     0,     0,    73,    75,    77,     0,     0,   441,     0,
-      83,     0,     0,     0,     0,   326,     0,     0,     0,     0,
-       0,    29,     0,    22,     0,     0,     0,     0,     0,     0,
-       0,     0,   121,   121,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   126,     0,     0,     0,     0,     0,
-       0,     0,   280,     0,     0,     0,     0,     0,     0,     0,
-       0,   288,     0,     0,   187,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   264,     0,     0,   265,     0,   267,
-       0,   231,   260,     0,     0,     0,   179,     0,     0,     0,
-     287,     0,   183,   182,   299,     0,     0,    30,    31,     0,
-       0,     0,   420,   421,   422,   423,   414,   408,     0,     0,
-       0,   438,     0,     0,     0,   211,     0,     0,     0,     0,
-     196,   385,   195,   337,   358,   344,   365,   345,   366,   346,
-     367,   459,   460,   451,     0,   389,   390,   388,   450,     0,
-      69,     0,    57,     0,     0,     0,     0,    68,     0,     0,
-       0,   439,     0,     0,     0,     0,     0,     0,     0,     0,
-     401,     0,     0,    25,    26,     0,    27,     0,     0,    97,
-     100,   123,     0,     0,     0,     0,     0,     0,   127,     0,
-       0,   144,   145,     0,     0,   129,   152,     0,     0,     0,
-       0,   119,     0,   279,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   198,     0,     0,     0,     0,   166,   166,
-       0,   241,     0,   243,     0,   245,     0,   403,     0,     0,
-     266,   268,     0,     0,   225,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   284,   430,   429,   385,   132,   133,
-       0,     0,     0,     0,    86,    90,     0,     0,   305,   387,
+       0,   259,     0,   221,     0,     0,     0,     0,     0,     0,
+     283,   290,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   385,   433,   420,     0,     0,     0,     0,
+     412,     0,     0,     0,     0,     0,     0,     0,   186,     0,
+       0,     0,     0,     0,     0,   309,     0,     0,   388,     0,
+     384,     0,     0,     0,     0,     0,     0,     0,     0,   467,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      67,     0,     0,     0,     0,     0,    73,    75,    77,     0,
+       0,   446,     0,    83,     0,     0,     0,     0,   331,     0,
+       0,     0,     0,     0,    29,     0,    22,     0,     0,     0,
+       0,     0,     0,     0,     0,   121,   121,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   126,     0,     0,
+       0,     0,     0,     0,     0,   285,     0,     0,     0,     0,
+       0,     0,     0,     0,   293,     0,     0,   187,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   265,     0,   264,
+       0,   270,     0,   272,     0,   266,     0,   268,     0,   231,
+     260,     0,     0,     0,   179,     0,     0,     0,   292,     0,
+     183,   182,   304,     0,     0,    30,    31,     0,     0,     0,
+     425,   426,   427,   428,   419,   413,     0,     0,     0,   443,
+       0,     0,     0,   211,     0,     0,     0,     0,   196,   390,
+     195,   342,   363,   349,   370,   350,   371,   351,   372,   464,
+     465,   456,     0,   394,   395,   393,   455,     0,    69,     0,
+      57,     0,     0,     0,     0,    68,     0,     0,     0,   444,
+       0,     0,     0,     0,     0,     0,     0,     0,   406,     0,
+       0,    25,    26,     0,    27,     0,     0,    97,   100,   123,
+       0,     0,     0,     0,     0,     0,   127,     0,     0,   144,
+     145,     0,     0,   129,   152,     0,     0,     0,     0,   119,
+       0,   284,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   198,     0,     0,     0,     0,   166,   166,     0,   241,
+       0,   243,     0,   245,     0,   408,     0,     0,   271,   273,
+     267,   269,     0,     0,   225,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   289,   435,   434,   390,   132,   133,
+       0,     0,     0,     0,    86,    90,     0,     0,   310,   392,
        0,     0,     0,     0,     0,    80,     0,     0,    81,     0,
-     442,   168,   169,   170,   171,     0,    38,     0,     0,     0,
-       0,     0,    40,   446,     0,     0,    98,   101,     0,     0,
-     122,   130,   131,   135,     0,     0,   146,     0,     0,   281,
-       0,   139,     0,     0,   272,   151,     0,     0,     0,     0,
-     136,     0,   147,   153,     0,     0,     0,     0,   400,     0,
-     399,     0,     0,     0,   232,     0,     0,   233,     0,     0,
+     447,   168,   169,   170,   171,     0,    38,     0,     0,     0,
+       0,     0,    40,   451,     0,     0,    98,   101,     0,     0,
+     122,   130,   131,   135,     0,     0,   146,     0,     0,   286,
+       0,   139,     0,     0,   277,   151,     0,     0,     0,     0,
+     136,     0,   147,   153,     0,     0,     0,     0,   405,     0,
+     404,     0,     0,     0,   232,     0,     0,   233,     0,     0,
      234,     0,     0,     0,     0,     0,     0,     0,   178,     0,
        0,   177,     0,     0,     0,   172,     0,     0,     0,     0,
-     436,     0,   213,   212,     0,     0,     0,     0,   454,    71,
+     441,     0,   213,   212,     0,     0,     0,     0,   459,    71,
       70,    76,    78,     0,    84,     0,    43,     0,     0,     0,
-     402,     0,     0,     0,    28,     0,   107,   112,     0,     0,
+     407,     0,     0,     0,    28,     0,   107,   112,     0,     0,
        0,     0,     0,     0,     0,     0,   140,   125,   138,   150,
      155,     0,     0,    91,    92,   166,     0,   159,   160,     0,
        0,     0,     0,     0,     0,     0,   261,     0,     0,   166,
        0,     0,     0,     0,     0,   163,   162,     0,     0,     0,
-       0,    87,    88,     0,     0,   440,     0,    39,     0,     0,
-       0,    41,    56,     0,     0,     0,   290,   292,   291,   293,
-     294,   143,     0,     0,     0,     0,     0,     0,   398,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   270,     0,
-       0,     0,   226,     0,     0,   173,     0,     0,     0,   435,
-     214,     0,   306,    82,     0,     0,     0,     0,     0,     0,
+       0,    87,    88,     0,     0,   445,     0,    39,     0,     0,
+       0,    41,    56,     0,     0,     0,   295,   297,   296,   298,
+     299,   143,     0,     0,     0,     0,     0,     0,   403,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   275,     0,
+       0,     0,   226,     0,     0,   173,     0,     0,     0,   440,
+     214,     0,   311,    82,     0,     0,     0,     0,     0,     0,
       99,   108,     0,   102,   113,     0,     0,     0,     0,   157,
        0,   247,     0,     0,   249,     0,     0,   251,     0,     0,
        0,   262,     0,   222,     0,   166,     0,     0,     0,   134,
       89,     0,    47,     0,    53,     0,     0,     0,     0,     0,
-     120,   148,   289,   397,   235,     0,     0,   242,   236,     0,
+     120,   148,   294,   402,   235,     0,     0,   242,   236,     0,
        0,   244,   237,     0,     0,   246,     0,     0,     0,   228,
        0,   176,     0,     0,     0,     0,     0,     0,     0,     0,
      109,   111,     0,   114,   115,     0,     0,   253,     0,   255,
-       0,   257,   263,   269,   227,   223,     0,     0,     0,     0,
-      44,     0,    51,     0,     0,     0,   431,     0,     0,     0,
+       0,   257,   263,   274,   227,   223,     0,     0,     0,     0,
+      44,     0,    51,     0,     0,     0,   436,     0,     0,     0,
      238,     0,     0,   239,     0,     0,   240,     0,     0,   180,
        0,   174,     0,    45,     0,     0,   204,     0,   110,     0,
      116,     0,     0,     0,     0,     0,     0,     0,   229,     0,
@@ -1534,531 +1544,511 @@ static const yytype_uint16 yydefact[] =
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,     2,     3,    80,   840,    81,    82,   617,  1245,  1251,
-     831,   996,  1396,  1562,   832,  1515,  1596,   833,  1564,   834,
-     835,  1000,   158,   293,    83,   628,   395,  1346,  1347,   396,
-    1545,  1404,  1451,  1405,  1454,   876,  1273,  1155,   600,   423,
+      -1,     2,     3,    80,   840,    81,    82,   617,  1255,  1261,
+     831,   999,  1406,  1572,   832,  1525,  1606,   833,  1574,   834,
+     835,  1003,   158,   293,    83,   628,   395,  1356,  1357,   396,
+    1555,  1414,  1461,  1415,  1464,   876,  1283,  1163,   600,   423,
      424,   425,   426,   259,   366,   367,    86,    87,    88,    89,
-      90,    91,   260,   911,  1474,  1536,   683,  1295,  1298,  1301,
-    1495,  1499,  1503,  1551,  1554,  1557,   907,   908,  1031,   873,
+      90,    91,   260,   914,  1484,  1546,   683,  1305,  1308,  1311,
+    1505,  1509,  1513,  1561,  1564,  1567,   910,   911,  1034,   873,
      654,   692,    93,    94,    95,    96,   261,   161,   439,   220,
-    1139,   262,   263,   264,   496,   271,   818,   989,   567,   392,
+    1147,   262,   263,   264,   496,   271,   818,   992,   567,   392,
      568
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -1204
+#define YYPACT_NINF -1208
 static const yytype_int16 yypact[] =
 {
-    4748,    20,    62,  4843, -1204, -1204,  2459,   124,   -17,  -130,
-      -9,    -3,   143,   160,   198,   228,   100,   109,   -82,    51,
-      95,     9,   117,   137,    21,   149,   167,   239,   299,   308,
-     373,   238,   350,   360,   244,   379,   548,   472,   210,   274,
-     388,   -16,   315,    82,    82,   341,   297,    34,   -21,   456,
-     406,    19,    40,   478,   465,   432,   559,   569,  2659,   594,
-     392,   440,   463,    23,    37, -1204,   473, -1204,   607,   613,
-     491, -1204,   659,   665,    13,    27, -1204, -1204, -1204,  1418,
-   -1204, -1204, -1204, -1204, -1204, -1204, -1204, -1204, -1204, -1204,
-   -1204, -1204, -1204, -1204, -1204,    36, -1204, -1204,     8, -1204,
-     662, -1204, -1204, -1204,   190,   296,   309,   403,   430,   457,
-     467,   508,   528,   551,   552,   571,   593,   617,   623,   636,
-     637,   640,   641,   646,   647,   650,   672,   512,   529,   543,
-     570,   612,   616,   622, -1204, -1204, -1204,   751,   626,   651,
-     654, -1204, -1204, -1204, -1204, -1204, -1204, -1204,  1418,  1418,
-    1418, -1204, -1204,  4240,  2405,    47,   767,   355,  3000,   840,
-    1015, -1204,   684,   850,   870,  1418,   475,   475, -1204,  1418,
-   -1204, -1204, -1204, -1204, -1204, -1204,  1418,  4447,  1418,  1418,
-     669,  1418,  4447,  1418,  1418,   713,  4447,  1418,  1418,  3000,
-     716,   714, -1204,  4447,   773,   789,  2659,  2659,  2659,   794,
-   -1204, -1204, -1204, -1204,   795,   813,   814,  3000,  1418,   927,
-    3000,    23,   757,   819,    82,    82,    82,  1418,  1418,  -115,
-   -1204,   -97,    82,   820,   833,   836,  4284,   -78,   -62,   834,
-     837,   848,  2659,  2659,  3000,   868,    25,   778, -1204,  1011,
-   -1204,   845,   851,   874,  2659,  2659,   880,   888,   138, -1204,
-     894,    28,  1031,  1067,  1075,   600,  3163,  1418,   371, -1204,
-   -1204,   169, -1204,  1055, -1204,  1059,  1418,  1418,  1418,   898,
-    1418,   928,   984,  1418,  1418, -1204, -1204,  1418,  1080, -1204,
-    1103, -1204,  1104, -1204,   303,  1184, -1204,  3000,  3000,   947,
-    1418,  1116,   950, -1204,  1127,  1418,  1418,  1418,  1418,  1418,
-    1418,  1418,  1418,  1418,  1418,  1418,  1418,  1418,  1418,  1418,
-    1418,  1418,  1418,  1418,  1418,  1418,  1418,  1418,  1418,  1418,
-    1418,  1418,  1418,  1418,  1418,  1418,  1418,  1418,  1418,  1418,
-    1418,  1418,  1418,  1418,  1418,  1418,  1418,   475,   475,   475,
-     475,   475,   475,   475,   475,   475,   475,   475,  1418,   475,
-     475,   475,   977,   977,   977,  4447,  7187,   136,  4447,  6428,
-     209,   976,  1145,   987,  1004, -1204,  1023,  3899,  1170, -1204,
-   -1204,  1418,  1418,  1418,  1418,  1418,  1418,  1418,  1418,  1418,
-    1418,  1418,  1418,  1418,  1418,  1418, -1204, -1204, -1204,  1348,
-     673,   -71, -1204,    41,  5700,   468,   479,  7208,  4447,   575,
-   -1204,   670,  7229,  7250,  1418,  7271,   680,  7292,  7313,  1418,
-     681,  7334,  7355,  1192,  1418,  1418,   699,  1418,  1418,  1195,
-    1212,  1212,  1418,  1058,  1062,  1071,  1078,  1418,  1418,  1418,
-    1232,  5620,  1081,  1241,  1090, -1204, -1204,    88, -1204, -1204,
-    5726,  5752,    82,    82,   355,   355,   113,  1418,  1418,  1418,
-    4284,  4284,  1418,  3899,   187, -1204,  1418,  1418,  1418,  1418,
-    1418,  1245,  1256,  1276,  1418,  1278, -1204,  1418,  1418,   488,
-   -1204,  4447,  4447,  4447,  1297,  1298,  1418,  1418,    80,  4071,
-    1301,  1306, -1204,  1418, -1204, -1204, -1204,  1142,  1144,  1146,
-    1147,  4447,   977, -1204,  7376, -1204,   702,  1418,  3326, -1204,
-   -1204,  7397,  7418,  7439,  1196,  5778, -1204,  1148,  4511,  7460,
-    6451, -1204, -1204,  2035, -1204,  2119,  1418, -1204,  1157,   703,
-    1418,  6474,   265,  1418, -1204,  7481,  6497,  7502,  6520,  7523,
-    6543,  7544,  6566,  7565,  6589,  7586,  6612,  7607,  6635,  7628,
-    6658,  7649,  6681,  7670,  6704,  7691,  6727,  5804,  5830,  7712,
-    6750,  7733,  6773,  7754,  6796,  7775,  6819,  7796,  6842,  7817,
-    6865,  5856,  5882,  5908,  5934,  5960,  5986, -1204,   213,   480,
-     255,   481,  1155,  1161,  1163,  1173,  1174,  1175,   263,  1518,
-    1176,  1183,  1179,   771,   136, -1204,  3000,   775,   205,   662,
-    1418,  1344,  1347,    24,  1185, -1204,    67,    11,    26,    83,
-   -1204, -1204,  4530,  1123,  1139,   830,   830,   592,   592,   592,
-     592,   106,   106,   977,   977,   977,   977,    33, -1204,  1418,
-    1349,     3,  4447,  1350,  4447,  1418,  1351, -1204,  1356,  1355,
-     475,  1358,  4447,  4447,  1236,  1359,  1360,  7838,  1361,  1243,
-    1362,  1363,  7859,  1244,  1364,  1371,  1418,  7880,  4892,  1208,
-    7901,  7922,  1418,  3000,  1376,  1375,  7943,  4604,  4604,  4604,
-    4604,  7964,  7985,  8006,  3000,  4447,  1215, -1204, -1204,  2887,
-    3040,    82,  1418,  1418, -1204, -1204,  1213,  1214,  4284,  6012,
-    6038,  6064,  5674,   -30,    82,  3203,  8027,  4920,  8048,  8069,
-    8090,  1418,  1381, -1204,  1418,  8111, -1204,  6888,  6911, -1204,
-     824,   827,   853, -1204, -1204,  6934,  6957, -1204,  4447, -1204,
-    4447,  6980,   -91,  1221,  4948,  4447,  4447,  4447,  4447,   856,
-   -1204, -1204,  4551,  4447,   977, -1204,  1382,  1384,  1387,  1227,
-    1418,  3366,  1418,  1418, -1204,    15, -1204, -1204,  1225,  3000,
-    1392,  7003,   449, -1204,  4976, -1204, -1204, -1204, -1204, -1204,
-   -1204, -1204, -1204, -1204, -1204, -1204, -1204, -1204, -1204, -1204,
-   -1204, -1204, -1204, -1204, -1204, -1204, -1204,  1418,  1418, -1204,
-   -1204, -1204, -1204, -1204, -1204, -1204, -1204, -1204, -1204, -1204,
-   -1204,  1418,  1418,  1418,  1418,  1418,  1418, -1204,   475, -1204,
-   -1204,  4447, -1204,  4447,   475, -1204, -1204,   475,   475,   475,
-   -1204, -1204,  1418, -1204,   475,  1234,  1418,  1394,  1235,    93,
-    1418,  1397,  1399,  1736, -1204,  1400,  1251,    23,  1403, -1204,
-    4447,  4447,  4447,  4447,  1418, -1204,  1246,  1254,  1249, -1204,
-    1417, -1204, -1204, -1204, -1204, -1204,  7026, -1204, -1204,  1273,
-     475,   362, -1204,   372,  6090, -1204,  1419, -1204, -1204,    82,
-     575, -1204,   779,  3000,  3000,  1423,  3000,   963,  3000,  3000,
-    1424,  1388,  3000,  3000,  1789,  1446,  1448,  4447,  1449,  1450,
-     674, -1204, -1204,  1453, -1204,  1454,  1260,  8342, -1204,  1295,
-    1300,  1302,  1459,  1463,  1464,  1466,   861,  1469,  3529, -1204,
-   -1204,   214,  6116,  6142, -1204, -1204,  5004,  -119,    82,    82,
-      82,  1470,  1471,  1304,  1312,    46,    49,   -15, -1204,   253,
-   -1204,   -30,  1472,  1474,  1477,  1478,  1479,  8342, -1204,  2202,
-    1307,  1475,  1481,  1482,  1426,  1418,  1485,  1501,   865,   899,
-     424, -1204, -1204,   903,   906,   907,   911, -1204,  1418,   915,
-    3000,  3000,  3000,  1504,  6168, -1204,  4571,   533,  1505,  1506,
-    3000,  1340, -1204,  1508,  1513, -1204,  1509, -1204,  8132,  7049,
-    8153,  7072,  8174,  7095,  8195,  7118, -1204,   455,   501,  1353,
-    1352,  1354,  1365,  8216,  1366,   136,  2488, -1204,   136,   269,
-    1357,  1514,  2610, -1204, -1204, -1204,    23,  1418, -1204,   920,
-   -1204,   921,   924,   925,   930,  8342,  1369,  1418,  1418,  3000,
-    1367, -1204,  1368, -1204,  1517,    57,  1520,  1418,  3815,    48,
-    1370,  1372,  1447,  1447,  3000,  1521,  1373,  1374,  1522,  1528,
-    3000,  1377,  1531,  1533, -1204,  1535,  3000,   934,  3000,  3000,
-    1538,  1540, -1204,  3000,  1543,  1544,  1545,  1547,  3000,  3000,
-    3000, -1204,  1548,   745, -1204,  1418,  1418,  1418,  1389,  1390,
-    -106,   -69,   -64,  1393, -1204,  3000,  1418, -1204,  1541, -1204,
-    1556, -1204, -1204,  4284,   542,  2837, -1204,  1395,  1396,  3489,
-   -1204,  4447, -1204, -1204, -1204,  1398,  3603, -1204, -1204,  1405,
-    1401,  1559, -1204, -1204, -1204, -1204,  8342, -1204,  1565,  1569,
-    1465, -1204,  1418,  1418,  1418, -1204,  1573,   790,  1411,  1577,
-   -1204,   397, -1204, -1204, -1204, -1204, -1204, -1204, -1204, -1204,
-   -1204, -1204, -1204, -1204,   475, -1204, -1204, -1204, -1204,  3000,
-   -1204,  3000,   662,  1418,  1578,  1561,    24, -1204,  1579,  7141,
-      23, -1204,  1580,  1584,  1585,  1586,  1418,  6194,  6220,   946,
-   -1204,  1418,  1589, -1204, -1204,   475, -1204,  6246,  4604,  8342,
-   -1204, -1204,  1418,  1418,    82,  1590,  1594,  1595, -1204,  1418,
-    1418, -1204, -1204,  1596,  1418, -1204, -1204,  1598,  1602,  1433,
-    1603,  1476,  1418, -1204,  1604,  3000,  3000,  3000,  3000,  1605,
-    1141,  1606,  1418, -1204,  4604,  5032,  8237,  2630,   355,   355,
-      82,  1607,    82,  1608,    82,  1609,  1418,    72,  1451,  8258,
-   -1204, -1204,  5060,   264, -1204,  1610,   101,  1611,  3000,    82,
-     101,  1612,   978,  1418, -1204, -1204, -1204,   -91, -1204, -1204,
-    3000,  4836,   140,  8279, -1204, -1204,  3864,  3000, -1204, -1204,
-    1457,  1613,  1617,  1618,  3624, -1204,  1619,  1621, -1204,  1460,
-   -1204, -1204, -1204, -1204, -1204,   464,  8342,  1418,  1418,  3000,
-    1458,   979,  8342, -1204,  1624,  1418,  8342, -1204,  5088,  5116,
-     340, -1204, -1204, -1204,  5144,  5172, -1204,  5200,  1628, -1204,
-    3000, -1204,  1572,  1629,  8342, -1204,  1633,  1634,  1635,  1636,
-   -1204,  1473, -1204, -1204,  5647,  3778,  1637,  1480, -1204,  1418,
-   -1204,  1483,  1484,   327, -1204,  1486,   329, -1204,  1487,   349,
-   -1204,  1488,  7164,  1639,  3000,  1641,  1489,  1418, -1204,  3652,
-     351, -1204,  1010,   353,   390, -1204,  1643,  5228,  1536,  1418,
-   -1204,  1418, -1204, -1204,  4447,  3981,  1646,  1507, -1204, -1204,
-   -1204, -1204, -1204,    23, -1204,  1560, -1204,  1418,  6272,  6298,
-   -1204,  3000,  1418,  1647, -1204,  6324, -1204, -1204,  1655,  1672,
-    1674,  1676,  1680,  1681,  1013,  1519, -1204, -1204, -1204, -1204,
-   -1204,  3000,  4447, -1204, -1204,   355,  4864, -1204, -1204,  4284,
-     -30,  4284,   -30,  4284,   -30,  1683, -1204,  1014,  3000, -1204,
-    5256,    82,  1685,  4447,    82, -1204, -1204,  1418,  5284,  5312,
-    1021, -1204, -1204,  1686,  1688, -1204,  1524,  8342,  1418,  1418,
-    1024,  8342, -1204,  1418,  1028,  1033, -1204, -1204, -1204, -1204,
-   -1204, -1204,  1525,  1418,  1036,  1037,  1526,  1418, -1204,  5340,
-     417,   663,  5368,   421,   764,  5396,   423,   780, -1204,  3000,
-    1693,  1620,  4111,  1530,   425, -1204,  1042,   435,  4193, -1204,
-   -1204,  1696, -1204, -1204,  1418,  8300,  6350,     1,  6376,  1699,
-   -1204, -1204,  1701, -1204, -1204,  1418,  5424,  1702,  1703, -1204,
-    5452,  1704,  1418,  1705,  1706,  1418,  1707,  1709,  1418,  1710,
-    1546, -1204,  1418, -1204,   -30, -1204,  4447,  1711,  3652, -1204,
-   -1204,  1048, -1204,  1418, -1204,  3000,  1418,  2235,  4027,  6402,
-   -1204, -1204, -1204, -1204, -1204,  1549,  5480, -1204, -1204,  1550,
-    5508, -1204, -1204,  1551,  5536, -1204,  1713,  4212,   852,  4324,
-    1060, -1204,   448,  1061,  1717,  1553,  8321,  1064,  5564,   371,
-   -1204, -1204,   475,  8342, -1204,  1418,   -30,  1719,   -30,  1720,
-     -30,  1722, -1204, -1204, -1204, -1204,   -30,  1723,  4447,  1724,
-   -1204,   475, -1204,  1562,  1725,  1068,  4400,  1087,  5592,   858,
-   -1204,  1563,   912, -1204,  1564,   954, -1204,  1566,  1025, -1204,
-    1088, -1204,  1095, -1204,  1567,  3000, -1204,  1418, -1204,   662,
-   -1204,  1730,  1734,   -30,  1735,   -30,  1739,   -30, -1204,  1740,
-     475,  1741,   475,  1096,  4419, -1204, -1204, -1204,  1032, -1204,
-    1039, -1204,  1056, -1204, -1204, -1204,  1128, -1204,  1742,   662,
-    1743,  1746,  1747,   475,  1748, -1204, -1204, -1204, -1204, -1204,
-   -1204, -1204
+    4862,     4,    76,  4961, -1208, -1208,  2615,     7,   -22,   -82,
+     -78,    22,   205,   212,   240,   250,   -59,   118,  -129,    99,
+     103,     5,   124,   130,     9,   161,   165,   252,   327,   355,
+     407,   248,   366,   378,   265,   372,   214,   308,    95,   302,
+     416,   -70,   312,    63,    63,   315,   218,    36,   143,   435,
+     439,     8,    33,   444,   442,   101,   567,   579,  2787,   582,
+     452,   458,   466,    11,    30, -1208,   470, -1208,   600,   603,
+     471, -1208,   652,   667,    16,    17, -1208, -1208, -1208,  4672,
+   -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
+   -1208, -1208, -1208, -1208, -1208,    19, -1208, -1208,     2, -1208,
+     762, -1208, -1208, -1208,   259,   436,   453,   461,   469,   474,
+     490,   493,   494,   503,   511,   534,   543,   544,   575,   587,
+     594,   595,   601,   605,   609,   610,   614,   512,   515,   516,
+     519,   520,   528,   539, -1208, -1208, -1208,   700,   563,   564,
+     572, -1208, -1208, -1208, -1208, -1208, -1208, -1208,  4672,  4672,
+    4672, -1208, -1208,  4258,    97,    20,   739,   472,  3119,   752,
+     568, -1208,   573,   759,   763,  4672,   419,   419, -1208,  4672,
+   -1208, -1208, -1208, -1208, -1208, -1208,  4672,  4468,  4672,  4672,
+     623,  4672,  4468,  4672,  4672,   627,  4468,  4672,  4672,  3119,
+     632,   648, -1208,  4468,   642,   647,  2787,  2787,  2787,   656,
+   -1208, -1208, -1208, -1208,   680,   681,   684,  3119,  4672,   785,
+    3119,    11,   653,   663,    63,    63,    63,  4672,  4672,    84,
+   -1208,    91,    63,   678,   694,   713,  4424,    94,     3,   721,
+     729,   732,  2787,  2787,  3119,   733,    26,   650, -1208,   866,
+   -1208,   736,   743,   756,  2787,  2787,   696,   734,   581, -1208,
+     754,    18,   913,   926,   931,   502,  3285,  4672,  2233, -1208,
+   -1208,  1675, -1208,   965, -1208,   969,  4672,  4672,  4672,   809,
+    4672,   814,   861,  4672,  4672, -1208, -1208,  4672,   985, -1208,
+     998, -1208,  1006, -1208,   533,  1020, -1208,  3119,  3119,   827,
+    4672,  1013,   847, -1208,  1019,  4672,  4672,  4672,  4672,  4672,
+    4672,  4672,  4672,  4672,  4672,  4672,  4672,  4672,  4672,  4672,
+    4672,  4672,  4672,  4672,  4672,  4672,  4672,  4672,  4672,  4672,
+    4672,  4672,  4672,  4672,  4672,  4672,  4672,  4672,  4672,  4672,
+    4672,  4672,  4672,  4672,  4672,  4672,  4672,   419,   419,   419,
+     419,   419,   419,   419,   419,   419,   419,   419,  4672,   419,
+     419,   419,   898,   898,   898,  4468,  7395,    80,  4468,  6636,
+     177,   897,  1058,   917,   935, -1208,   907,  5047,  1067, -1208,
+   -1208,  4672,  4672,  4672,  4672,  4672,  4672,  4672,  4672,  4672,
+    4672,  4672,  4672,  4672,  4672,  4672, -1208, -1208, -1208,  1154,
+     615,  -102, -1208,   113,  5908,   -71,    49,  7416,  4468,  3904,
+   -1208,   612,  7437,  7458,  4672,  7479,   622,  7500,  7521,  4672,
+     640,  7542,  7563,  1084,  4672,  4672,   645,  4672,  4672,  1098,
+    1103,  1103,  4672,   944,   945,   947,   948,  4672,  4672,  4672,
+    1110,  5828,   950,  1113,   946, -1208, -1208,   -83, -1208, -1208,
+    5934,  5960,    63,    63,   472,   472,    71,  4672,  4672,  4672,
+    4424,  4424,  4672,  5047,   104, -1208,  4672,  4672,  4672,  4672,
+    4672,  1114,  1116,  1117,  4672,  1121, -1208,  4672,  4672,   900,
+   -1208,  4468,  4468,  4468,  1122,  1123,  4672,  4672,  -127,  4208,
+    1131,  1137, -1208,  4672, -1208, -1208, -1208,   968,   970,   972,
+     978,  4468,   898, -1208,  7584, -1208,   660,  4672,  3451, -1208,
+   -1208,  7605,  7626,  7647,  1024,  5986, -1208,   983,  4576,  7668,
+    6659, -1208, -1208,  1603, -1208,  1805,  4672, -1208,   991,   665,
+    4672,  6682,   153,  4672, -1208,  7689,  6705,  7710,  6728,  7731,
+    6751,  7752,  6774,  7773,  6797,  7794,  6820,  7815,  6843,  7836,
+    6866,  7857,  6889,  7878,  6912,  7899,  6935,  6012,  6038,  7920,
+    6958,  7941,  6981,  7962,  7004,  7983,  7027,  8004,  7050,  8025,
+    7073,  6064,  6090,  6116,  6142,  6168,  6194, -1208,   117,    90,
+     210,   190,   989,   993,   996,  1009,  1011,  1012,   211,  1774,
+    1017,  1023,  1021,   670,    80, -1208,  3119,   671,   148,   762,
+    4672,  1160,  1188,    14,  1025, -1208,    38,    13,    15,    41,
+   -1208, -1208,  4595,  2046,  1866,   701,   701,   421,   421,   421,
+     421,   457,   457,   898,   898,   898,   898,    23, -1208,  4672,
+    1189,    27,  4468,  1192,  4468,  4672,  1194, -1208,  1197,  1196,
+     419,  1198,  4468,  4468,  1081,  1199,  1202,  8046,  1203,  1082,
+    1204,  1205,  8067,  1091,  1207,  1208,  4672,  8088,  5100,  1042,
+    8109,  8130,  4672,  3119,  1216,  1218,  8151,  4628,  4628,  4628,
+    4628,  8172,  8193,  8214,  3119,  4468,  1051, -1208, -1208,  1836,
+    1926,    63,  4672,  4672, -1208, -1208,  1054,  1055,  4424,  6220,
+    6246,  6272,  5882,   349,    63,  2650,  8235,  5128,  8256,  8277,
+    8298,  4672,  1220, -1208,  4672,  8319, -1208,  7096,  7119, -1208,
+     691,   698,   705, -1208, -1208,  7142,  7165, -1208,  4468, -1208,
+    4468,  7188,   -27,  1062,  5156,  4468,  4468,  4468,  4468,   706,
+   -1208, -1208,  4699,  4468,   898, -1208,  1226,  1227,  1228,  1065,
+    4672,  2827,  4672,  4672, -1208,    29, -1208, -1208,  1064,  3119,
+    1233,  7211,    39, -1208,  5184, -1208, -1208, -1208, -1208, -1208,
+   -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
+   -1208, -1208, -1208, -1208, -1208, -1208, -1208,  4672,  4672, -1208,
+   -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
+   -1208,  4672,  4672,  4672,  4672,  4672,  4672, -1208,   419, -1208,
+   -1208,  4468, -1208,  4468,   419, -1208, -1208,   419,   419,   419,
+   -1208, -1208,  4672, -1208,   419,  1074,  4672,  1237,  1075,    31,
+    4672,  1238,  1241,  2004, -1208,  1242,  1079,    11,  1244, -1208,
+    4468,  4468,  4468,  4468,  4672, -1208,  1085,  1086,  1080, -1208,
+    1250, -1208, -1208, -1208, -1208, -1208,  7234, -1208, -1208,  1104,
+     419,   229, -1208,   264,  6298, -1208,  1254, -1208, -1208,    63,
+    3904, -1208,   744,  3119,  3119,  1257,  3119,   819,  3119,  3119,
+    1261,  1206,  3119,  3119,  2181,  1262,  1266,  4468,  1267,  1269,
+    4984, -1208, -1208,  1265, -1208,  1275,  1119,  8550, -1208,  1124,
+    1125,  1126,  1282,  1283,  1284,  1289,   711,  1293,  2993, -1208,
+   -1208,   116,  6324,  6350, -1208, -1208,  5212,   -12,    63,    63,
+      63,  1294,  1295,  1142,  1315,  1132,    42,    45,    46,    47,
+     398, -1208,   157, -1208,   349,  1316,  1318,  1319,  1321,  1339,
+    8550, -1208,  2263,  1148,  1343,  1350,  1351,  1296,  4672,  1353,
+    1365,   718,   719,   -68, -1208, -1208,   731,   741,   749,   753,
+   -1208,  4672,   766,  3119,  3119,  3119,  1368,  6376, -1208,  4730,
+     894,  1370,  1376,  3119,  1201, -1208,  1375,  1378, -1208,  1377,
+   -1208,  8340,  7257,  8361,  7280,  8382,  7303,  8403,  7326, -1208,
+     297,   236,  1219,  1213,  1222,  1223,  8424,  1224,    80,  2420,
+   -1208,    80,   243,  1217,  1386,  2519, -1208, -1208, -1208,    11,
+    4672, -1208,   769, -1208,   770,   773,   778,   782,  8550,  1229,
+    4672,  4672,  3119,  1221, -1208,  1230, -1208,  1388,    40,  1392,
+    4672,  3949,    44,  1225,  1231,  1330,  1330,  3119,  1400,  1234,
+    1236,  1405,  1407,  3119,  1240,  1410,  1411, -1208,  1413,  3119,
+     797,  3119,  3119,  1415,  1414, -1208,  3119,  1416,  1418,  1422,
+    1423,  3119,  3119,  3119, -1208,  1424,   162, -1208,  4672,  4672,
+    4672,  1248,  1260,  -103,   -89,    59,  1272, -1208,  3119, -1208,
+    4672, -1208,  1429, -1208,  1430, -1208,  1432, -1208,  1436, -1208,
+   -1208,  4424,   726,  2953, -1208,  1270,  1271,  3617, -1208,  4468,
+   -1208, -1208, -1208,  1273,  2539, -1208, -1208,  1278,  1279,  1444,
+   -1208, -1208, -1208, -1208,  8550, -1208,  1445,  1446,  1332, -1208,
+    4672,  4672,  4672, -1208,  1448,   374,  1286,  1455, -1208,   484,
+   -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
+   -1208, -1208,   419, -1208, -1208, -1208, -1208,  3119, -1208,  3119,
+     762,  4672,  1456,  1459,    14, -1208,  1458,  7349,    11, -1208,
+    1460,  1462,  1463,  1466,  4672,  6402,  6428,   806, -1208,  4672,
+    1461, -1208, -1208,   419, -1208,  6454,  4628,  8550, -1208, -1208,
+    4672,  4672,    63,  1467,  1470,  1471, -1208,  4672,  4672, -1208,
+   -1208,  1481,  4672, -1208, -1208,  1494,  1495,  1326,  1497,  1382,
+    4672, -1208,  1499,  3119,  3119,  3119,  3119,  1504,   988,  1509,
+    4672, -1208,  4628,  5240,  8445,  5016,   472,   472,    63,  1511,
+      63,  1513,    63,  1529,  4672,   150,  1364,  8466, -1208, -1208,
+   -1208, -1208,  5268,   204, -1208,  1533,  2052,  1537,  3119,    63,
+    2052,  1538,   822,  4672, -1208, -1208, -1208,   -27, -1208, -1208,
+    3119,  5044,   198,  8487, -1208, -1208,  3998,  3119, -1208, -1208,
+    1379,  1543,  1544,  1547,  3399, -1208,  1549,  1548, -1208,  1387,
+   -1208, -1208, -1208, -1208, -1208,   299,  8550,  4672,  4672,  3119,
+    1383,   832,  8550, -1208,  1553,  4672,  8550, -1208,  5296,  5324,
+     324, -1208, -1208, -1208,  5352,  5380, -1208,  5408,  1556, -1208,
+    3119, -1208,  1501,  1559,  8550, -1208,  1562,  1567,  1573,  1574,
+   -1208,  1417, -1208, -1208,  5855,  3418,  1575,  1419, -1208,  4672,
+   -1208,  1412,  1420,   254, -1208,  1425,   258, -1208,  1427,   260,
+   -1208,  1428,  7372,  1576,  3119,  1578,  1431,  4672, -1208,  3783,
+     263, -1208,   836,   283,   293, -1208,  1582,  5436,  1473,  4672,
+   -1208,  4672, -1208, -1208,  4468,  3574,  1586,  1433, -1208, -1208,
+   -1208, -1208, -1208,    11, -1208,  1474, -1208,  4672,  6480,  6506,
+   -1208,  3119,  4672,  1591, -1208,  6532, -1208, -1208,  1597,  1600,
+    1605,  1606,  1607,  1611,   845,  1435, -1208, -1208, -1208, -1208,
+   -1208,  3119,  4468, -1208, -1208,   472,  5072, -1208, -1208,  4424,
+     349,  4424,   349,  4424,   349,  1612, -1208,   849,  3119, -1208,
+    5464,    63,  1613,  4468,    63, -1208, -1208,  4672,  5492,  5520,
+     855, -1208, -1208,  1614,  1615, -1208,  1449,  8550,  4672,  4672,
+     856,  8550, -1208,  4672,   859,   860, -1208, -1208, -1208, -1208,
+   -1208, -1208,  1450,  4672,   883,   884,  1447,  4672, -1208,  5548,
+     322,   990,  5576,   335,  1033,  5604,   404,  1050, -1208,  3119,
+    1621,  1551,  3159,  1454,   412, -1208,   888,   454,  3731, -1208,
+   -1208,  1623, -1208, -1208,  4672,  8508,  6558,    25,  6584,  1630,
+   -1208, -1208,  1632, -1208, -1208,  4672,  5632,  1633,  1637, -1208,
+    5660,  1639,  4672,  1640,  1642,  4672,  1643,  1644,  4672,  1645,
+    1477, -1208,  4672, -1208,   349, -1208,  4468,  1647,  3783, -1208,
+   -1208,   896, -1208,  4672, -1208,  3119,  4672,  2449,  4164,  6610,
+   -1208, -1208, -1208, -1208, -1208,  1480,  5688, -1208, -1208,  1482,
+    5716, -1208, -1208,  1483,  5744, -1208,  1649,  3750,  1180,  3325,
+     899, -1208,   456,   903,  1652,  1485,  8529,   904,  5772,  2233,
+   -1208, -1208,   419,  8550, -1208,  4672,   349,  1654,   349,  1667,
+     349,  1668, -1208, -1208, -1208, -1208,   349,  1669,  4468,  1672,
+   -1208,   419, -1208,  1510,  1680,   908,  1181,   912,  5800,  1264,
+   -1208,  1514,  1380, -1208,  1516,  1391, -1208,  1520,  1408, -1208,
+     924, -1208,   925, -1208,  1522,  3119, -1208,  4672, -1208,   762,
+   -1208,  1681,  1691,   349,  1692,   349,  1694,   349, -1208,  1698,
+     419,  1700,   419,   928,  1372, -1208, -1208, -1208,  1472, -1208,
+    1663, -1208,  1868, -1208, -1208, -1208,   929, -1208,  1701,   762,
+    1702,  1703,  1705,   419,  1706, -1208, -1208, -1208, -1208, -1208,
+   -1208, -1208
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-   -1204, -1204, -1204, -1204,   752, -1204, -1204, -1204, -1204,   316,
-   -1204, -1204, -1204, -1204, -1204, -1204, -1204, -1204, -1204, -1204,
-   -1204, -1204,  -336,     0, -1204,  1311, -1204, -1204, -1204, -1204,
-   -1204, -1204, -1204, -1204, -1204,    50, -1204,   746,  1758, -1204,
-   -1204, -1204, -1204,    -1,  -425,  -222, -1204, -1204, -1204, -1204,
-   -1204, -1204,  1759, -1204, -1204, -1204, -1204, -1204, -1204, -1204,
-   -1204, -1204, -1204, -1204, -1204, -1204,  -900,  -893, -1204, -1204,
-    1343, -1204, -1204, -1204, -1204, -1204,   591, -1204,    35, -1204,
-   -1203,   967,   132,  1134,  1511,  -201,   639, -1204,    -6,    -5,
-    -330
+   -1208, -1208, -1208, -1208,   708, -1208, -1208, -1208, -1208,   266,
+   -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
+   -1208, -1208,  -331,    54, -1208,  1325, -1208, -1208, -1208, -1208,
+   -1208, -1208, -1208, -1208, -1208,  -149, -1208,   709,  1723, -1208,
+   -1208, -1208, -1208,     0,  -437,  -222, -1208, -1208, -1208, -1208,
+   -1208, -1208,  1724, -1208, -1208, -1208, -1208, -1208, -1208, -1208,
+   -1208, -1208, -1208, -1208, -1208, -1208,  -631,  -827, -1208, -1208,
+    1307, -1208, -1208, -1208, -1208, -1208,   217, -1208,    21, -1208,
+   -1207,   779,  -140,  1069,   635,  -209,   596, -1208,    -6,    -5,
+    -333
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    positive, shift that token.  If negative, reduce the rule which
    number is the opposite.  If zero, do what YYDEFACT says.
    If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -447
+#define YYTABLE_NINF -452
 static const yytype_int16 yytable[] =
 {
-     162,   163,    85,   168,   453,  1312,   159,  1484,   569,   838,
-     434,  1064,   289,   180,  1062,   180,   469,   578,   280,   676,
-     677,   586,   948,   236,   590,   185,     4,   269,   816,   465,
-     185,   466,   282,   482,   166,   442,   443,   825,   228,   442,
-     443,   272,   286,   232,   239,   233,   240,   165,   442,   443,
-     901,   360,  1057,  1049,  1151,  1059,   444,   442,   443,   513,
-     902,   515,     5,  1144,  1190,   901,  1191,  1354,   903,   904,
-     151,   152,   905,   906,   445,   902,   442,   443,   219,   221,
-     497,   227,   176,   903,   904,   442,   443,   905,   906,   177,
-     442,   443,   229,   455,   621,   294,   230,   979,   241,   622,
-     211,  1192,   456,  1193,    97,   248,  1194,   231,  1195,   457,
-     101,   102,   103,   212,   213,   104,   105,   106,   107,   108,
-     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
-     119,   120,   121,   122,   123,   124,   250,   164,  1400,   826,
-     827,   828,   829,   585,   237,   131,   132,   133,  1321,   170,
-    1058,   135,   136,  1060,   839,   167,   365,  1061,  1414,   251,
-     391,   393,   252,   361,   362,   253,   171,   254,   169,   151,
-     152,  1062,  1485,   181,   290,   181,   291,   497,   255,  -444,
-     182,   292,   821,   949,   281,    42,    43,    44,    45,    46,
-     238,   467,   186,    50,   270,   817,    53,   822,   283,   483,
-     287,   273,   442,   443,   172,   830,   623,   288,   839,   980,
-     981,   624,   585,   669,   670,   178,   589,   371,   372,   373,
-     374,   375,   376,   377,   378,   379,   380,   381,   498,   383,
-     384,   176,   138,   685,   173,   385,   215,   216,   820,   141,
-     142,   143,   442,   443,  1303,   707,   217,   188,   806,   437,
-     438,   708,   810,   218,   823,   450,  1309,   446,   671,   179,
-     150,   454,   382,   383,   384,   452,   174,   442,   443,   385,
-     156,   207,   218,   495,   208,   175,  1122,   144,   145,   146,
-     147,   183,  1517,   678,   731,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,   151,
-     152,   184,   478,   385,   479,   196,   480,   189,   197,   157,
-     198,   292,  1322,   187,   371,   372,   373,   374,   375,   376,
-     377,   378,   379,   380,   381,   498,   383,   384,   419,   420,
-     421,   188,   385,   570,   571,   572,   573,   574,   575,   576,
-     577,   442,   443,   580,   581,   582,   144,   145,   146,   147,
-     144,   145,   146,   147,   295,   223,   296,   684,   224,   364,
-     591,   225,  1583,   190,   461,   462,   151,   152,   442,   443,
-     151,   152,   191,   809,    97,   248,   474,   475,   787,   192,
-     101,   102,   103,   788,  1045,   104,   105,   106,   107,   108,
-     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
-     119,   120,   121,   122,   123,   124,   250,   442,   443,   193,
-     144,   145,   146,   147,   194,   131,   132,   133,   442,   443,
-     790,   135,   136,  1063,   195,   791,   151,   152,   800,   251,
-     151,   152,   252,   788,  1307,   253,  -445,   254,   209,    42,
-      43,    44,    45,   365,   365,   199,   888,    50,   255,   210,
-      53,   215,   216,   390,    99,    42,    43,    44,    45,    46,
-     297,   217,   298,    50,   151,   152,    53,   235,   226,   516,
-    1421,   480,  1424,   299,  1427,   300,   292,   674,   675,   390,
-      99,   442,   443,   442,   443,   438,   214,   125,   126,   127,
-     128,   129,   130,   244,   442,   443,   245,  1369,   134,  1371,
-       7,     8,   138,   442,   443,   442,   443,   442,   443,   141,
-     142,   143,   222,   125,   126,   127,   128,   129,   130,  1373,
-     234,  1381,   743,  1383,   134,   148,   398,  1005,  1062,   243,
-     150,  1062,   633,   204,  1062,   257,   205,  1006,   206,   242,
-     156,  1094,   633,   495,   442,   443,   596,    19,    20,   597,
-      22,    23,   598,    25,   599,    27,   266,    28,   151,   152,
-    1384,    32,    33,   246,    35,    36,    37,   301,  -446,   302,
-      40,   442,   443,   247,  1508,   442,   443,   442,   443,   442,
-     443,   139,   140,   497,   812,   151,   152,  1462,   811,   442,
-     443,  1465,  1081,  1468,   303,  1476,   304,   160,   265,    60,
-      61,    62,   442,   443,   267,  1478,   200,   139,   140,   201,
-     151,   152,   202,   275,   203,  1062,   988,   954,  1538,   276,
-    1111,   305,   901,   306,   848,   633,  1549,   268,  1552,  1336,
-    1555,   307,   902,   308,  1337,   626,  1558,   274,   627,  1119,
-     903,   904,  1121,  1123,   905,   906,   629,   789,   792,   627,
-     788,   793,   878,   878,   878,   878,  1062,   277,   487,  1062,
-     699,   488,  1062,   278,   489,  1062,   490,    99,  1112,   279,
-     285,   633,   309,  1588,   310,  1590,   341,  1592,   371,   372,
+     162,   163,   434,    85,   453,   569,   289,   676,   677,   180,
+       4,  1322,   236,   185,   578,   269,   469,   180,   816,   185,
+     164,   280,   282,   482,   360,   286,   586,   825,   168,   590,
+     465,  1494,   466,   838,   272,   982,   951,   239,   176,   240,
+     228,   707,   165,   390,    99,   177,  1152,   708,  1061,   211,
+    1159,  1063,  1065,  1067,   442,   443,   419,   420,   421,   513,
+     159,   515,   212,   213,   219,   221,   621,   227,   442,   443,
+    1198,   622,  1199,  1364,   442,   443,     5,   125,   126,   127,
+     128,   129,   130,  1070,  1200,   166,  1201,   585,   134,   167,
+     671,   241,   461,   462,   229,   294,   151,   152,   230,   626,
+      97,   284,   627,  1089,   474,   475,   101,   102,   103,   231,
+     174,   104,   105,   106,   107,   108,   109,   110,   111,   112,
+     113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
+     123,   124,   826,   827,   828,   829,   237,   151,   152,   361,
+     362,   131,   132,   133,  1410,   442,   443,   135,   136,  1062,
+     983,   984,  1064,  1066,  1068,   585,   207,   365,   497,   208,
+     391,   393,   244,  1052,  1424,   245,   151,   152,  1191,  1192,
+     456,   290,   181,   291,   139,   140,  -449,   457,   292,   182,
+     181,   839,   238,   186,   589,   270,   287,   821,   817,   822,
+     281,   283,   483,   288,   839,   467,   169,   273,   830,  1495,
+     952,   442,   443,   151,   152,   176,  1331,   232,   188,   233,
+     957,   170,   820,   669,   670,   823,   442,   443,   171,   629,
+     215,   216,   627,   160,   144,   145,   146,   147,   442,   443,
+     217,   138,  1202,   685,  1203,   437,   438,   218,   141,   142,
+     143,   442,   443,   446,   678,  1070,   172,   454,   442,   443,
+    1130,   442,   443,   806,   148,   149,   173,   810,   444,   150,
+     789,   442,   443,   788,   257,   445,   178,   357,   455,   156,
+     179,   358,   200,   442,   443,   201,   223,   684,   202,   224,
+     203,   623,   225,  1072,   731,   787,   624,   175,  1527,  1048,
+     788,   183,   144,   145,   146,   147,   285,   184,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   498,
+     383,   384,   151,   152,   442,   443,   385,   151,   152,   809,
+     189,   144,   145,   146,   147,  1313,   196,  -450,   187,   197,
+    1071,   198,   188,   570,   571,   572,   573,   574,   575,   576,
+     577,   151,   152,   580,   581,   582,   371,   372,   373,   374,
+     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
+     792,   442,   443,   793,   385,   352,   353,   354,  1593,   204,
+     356,   359,   205,  1332,   206,   215,   216,  1317,   790,   800,
+    1235,  1236,   389,   791,   788,   217,   394,   144,   145,   146,
+     147,   190,   226,   397,   399,   402,   403,  1008,   405,   399,
+     407,   408,   633,   399,   411,   412,  1120,   151,   152,   633,
+     399,   442,   443,   192,   591,   442,   443,   442,   443,   191,
+     442,   443,   193,   390,    99,   431,   295,  1379,   296,   901,
+     194,  1381,  1009,  1383,   440,   441,  1391,   633,   199,   902,
+     442,   443,   195,   441,   365,   365,   888,   903,   904,   905,
+     442,   443,   906,   907,   908,   909,  1393,   125,   126,   127,
+     128,   129,   130,   674,   675,  1119,  1394,  1346,   134,   209,
+     633,   438,  1347,   492,   494,   399,   364,   210,   901,   442,
+     443,   442,   443,   501,   502,   503,   214,   505,   902,   222,
+     508,   509,   442,   443,   510,  1472,   903,   904,   905,   234,
+     235,   906,   907,   908,   909,   242,   243,   521,  1475,   879,
+     880,   881,   525,   526,   527,   528,   529,   530,   531,   532,
+     533,   534,   535,   536,   537,   538,   539,   540,   541,   542,
+     543,   544,   545,   546,   547,   548,   549,   550,   551,   552,
+     553,   554,   555,   556,   557,   558,   559,   560,   561,   562,
+     563,   564,   565,   566,   139,   140,    42,    43,    44,    45,
+     487,   442,   443,   488,    50,   579,   489,    53,   490,   442,
+     443,   246,   399,  1069,   370,   399,   743,  1478,   380,   381,
+     382,   383,   384,   247,   812,  1486,   265,   385,   602,   603,
+     604,   605,   606,   607,   608,   609,   610,   611,   612,   613,
+     614,   615,   616,   297,  1070,   298,   275,  1070,   991,   276,
+    1070,   442,   443,   442,   443,   492,   382,   383,   384,   266,
+     299,   637,   300,   385,   848,   267,   642,  1488,   301,  1548,
+     302,   647,   648,   268,   650,   651,   303,   274,   304,   656,
+     277,   305,   811,   306,   661,   662,   663,  1127,   151,   152,
+    1129,  1131,   878,   878,   878,   878,   278,   307,  -451,   308,
+     309,   311,   310,   312,   679,   680,   681,   352,   353,   682,
+     313,   279,   314,   686,   687,   688,   689,   690,   315,   341,
+     316,   695,   342,   343,   697,   698,   344,   345,   399,   399,
+     399,  1070,   891,   705,   706,   346,   711,   151,   152,   897,
+     714,   317,   516,   318,   480,   912,   347,   348,   399,   292,
+     319,   321,   320,   322,   722,   724,   371,   372,   373,   374,
+     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
+     349,   350,  1070,   711,   385,  1070,   959,   741,  1070,   351,
+     744,  1070,   323,   363,   324,   151,   152,   386,   478,  1431,
+     479,  1434,   480,  1437,   325,   157,   326,   292,   369,  1301,
+    1302,   327,   329,   328,   330,   387,   743,    99,   331,   388,
+     332,  1070,   333,  1070,   334,  1070,   335,   337,   336,   338,
+    1136,   339,   969,   340,   619,   633,   620,   634,   972,   432,
+     404,   973,   974,   975,   409,   633,   958,   639,   977,   414,
+     125,   126,   127,   128,   129,   130,   901,   813,  1013,   417,
+    1014,   134,   401,   633,   418,   643,   902,   406,   633,   468,
+     649,   410,   415,   422,   903,   904,   905,   435,   416,   906,
+     907,   908,   909,   633,  1007,   721,   836,   436,   739,   399,
+     740,   399,   844,   633,   633,   805,   808,   427,   428,   724,
+     850,   429,   447,  1518,   376,   377,   378,   379,   380,   381,
+     382,   383,   384,   864,   633,   476,   926,   385,   448,   870,
+    1012,   633,   470,   927,   877,   877,   877,   877,   633,   633,
+     928,   940,   399,  1019,   633,  1020,  1045,   449,   458,   892,
+     893,   633,   633,  1087,  1088,   896,   459,   139,   140,   460,
+     464,  1214,  1102,   477,   633,  1559,  1090,  1562,   920,  1565,
+     471,   922,     7,     8,   633,  1568,  1091,   472,   484,  1053,
+    1054,  1055,   633,   481,  1092,   399,   633,   399,  1093,  1250,
+     473,   485,   399,   399,   399,   399,   486,   368,  1426,   633,
+     399,  1095,  1138,   633,  1139,  1140,   633,   947,  1141,   949,
+     950,   633,  1598,  1142,  1600,   633,  1602,  1143,   596,    19,
+      20,   597,    22,    23,   598,    25,   599,    27,   413,    28,
+     633,   499,  1177,    32,    33,   500,    35,    36,    37,  1259,
+     504,  1260,    40,   507,   961,   962,   430,   958,   506,   433,
+     583,   511,  1291,   587,  1292,   633,   520,  1326,   963,   964,
+     965,   966,   967,   968,   512,  1352,  1158,  1353,   399,  1259,
+     399,  1392,   514,   463,    60,    61,    62,   522,  1259,   976,
+    1422,   523,  1439,   979,  1440,   524,   517,   985,   633,  1259,
+    1451,  1457,  1459,  1462,  1460,  1463,  1132,   399,   399,   399,
+     399,   998,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,  1259,   633,  1467,  1468,
+     385,   633,  1103,  1487,   385,   593,   518,   519,   592,  1352,
+     901,  1524,   633,   601,  1547,   699,   633,  1259,  1549,  1553,
+     902,  1577,   595,  1578,   399,   788,   594,  1580,   903,   904,
+     905,   646,  1213,   906,   907,   908,   909,   633,  1590,  1589,
+    1591,  1259,  1613,  1608,  1614,   652,   700,   701,   702,   157,
+     653,   657,   658,   901,   659,   660,  1240,   664,   666,   667,
+     668,   691,   693,   902,   694,  1243,   719,   696,   703,   704,
+     901,   903,   904,   905,  1404,   712,   906,   907,   908,   909,
+     902,   713,   715,   729,   716,  1084,   717,  1264,   903,   904,
+     905,  1267,   718,   906,   907,   908,   909,   732,  1094,   738,
+     618,   795,   794,  1239,   796,  1473,   814,  1442,   371,   372,
      373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
-     383,   384,   311,   342,   312,  1062,   385,  1062,  1095,  1062,
-     125,   126,   127,   128,   129,   130,   891,   343,   879,   880,
-     881,   134,   743,   897,  1204,   313,   315,   314,   316,   909,
-     371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
-     381,   632,   383,   384,   344,   317,   956,   318,   385,   352,
-     353,   354,   955,   901,   356,   359,   380,   381,   382,   383,
-     384,  1183,  1184,   902,  1030,   385,   389,   319,   348,   320,
-     394,   903,   904,  1291,  1292,   905,   906,   397,   399,   402,
-     403,   363,   405,   399,   407,   408,   345,   399,   411,   412,
-     346,   321,   966,   322,   399,  1128,   347,   323,   969,   324,
-     349,   970,   971,   972,   139,   140,  1225,  1226,   974,   431,
-     325,   327,   326,   328,   329,   331,   330,   332,   440,   441,
-     333,   335,   334,   336,   337,   350,   338,   441,   351,   371,
+     383,   384,   797,  1270,   798,   799,   385,  1296,  1579,   497,
+     802,   803,   815,   837,   804,   819,   365,   365,   842,  1557,
+     845,   846,   847,   852,   857,   849,   853,  1137,  1476,   854,
+     856,   858,   859,   861,   862,   863,   867,  1145,  1146,  1303,
+     872,  1306,   887,  1309,   874,  1479,   921,  1155,  1157,   894,
+     895,  1336,   934,   943,   944,   945,   946,  1320,   953,   955,
+    1323,  1324,   978,   980,   986,   981,   400,   987,   990,   989,
+     993,   400,  1000,  1001,  1002,   400,  1004,   841,  1006,   843,
+     901,  1011,   400,  1519,  1017,  1193,  1194,  1195,  1023,  1028,
+     902,  1035,  1024,  1029,  1031,  1205,  1032,  1207,   903,   904,
+     905,  1239,  1036,   906,   907,   908,   909,  1037,  1212,  1041,
+    1042,  1043,  1038,  1039,  1040,  1044,   399,  1046,  1056,  1060,
+     886,  1057,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,  1058,  1231,  1232,  1233,
+     385,  1059,  1079,  1073,  1074,   493,  1075,   400,  1076,   371,
      372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,   404,  1004,  1463,   339,   385,   340,   619,
-     633,   620,   634,  1010,   901,  1011,   369,   492,   494,   399,
-     633,   633,   639,   643,   902,   386,   387,   501,   502,   503,
-     901,   505,   903,   904,   508,   509,   905,   906,   510,   633,
-     902,   649,   633,   739,   721,   740,   388,   409,   903,   904,
-     414,   521,   905,   906,  1009,   415,   525,   526,   527,   528,
-     529,   530,   531,   532,   533,   534,   535,   536,   537,   538,
-     539,   540,   541,   542,   543,   544,   545,   546,   547,   548,
-     549,   550,   551,   552,   553,   554,   555,   556,   557,   558,
-     559,   560,   561,   562,   563,   564,   565,   566,   435,  1240,
-     955,   432,   901,  1050,  1051,  1052,  1466,   417,   901,   579,
-    1416,   633,   902,   805,   468,   633,   399,   808,   902,   399,
-     903,   904,  1469,   418,   905,   906,   903,   904,   422,   427,
-     905,   906,   602,   603,   604,   605,   606,   607,   608,   609,
-     610,   611,   612,   613,   614,   615,   616,   428,   429,  1124,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,   492,
-     436,   447,   901,   385,   633,   637,   923,   633,   458,   924,
-     642,   459,   902,  1150,   448,   647,   648,   449,   650,   651,
-     903,   904,   460,   656,   905,   906,   471,   470,   661,   662,
-     663,   370,   472,   633,  1534,   925,   633,  1016,   937,  1017,
-    1572,   633,   464,  1042,   901,   633,   484,  1079,   679,   680,
-     681,   352,   353,   682,   902,   473,   476,   686,   687,   688,
-     689,   690,   903,   904,   477,   695,   905,   906,   697,   698,
-     481,   499,   399,   399,   399,   500,   504,   705,   706,   633,
-     711,  1080,   485,   633,   714,  1082,   633,   633,  1083,  1084,
-     486,   633,   399,  1085,  1574,   633,   511,  1087,   722,   724,
-    1130,   633,  1131,  1132,   633,   633,  1133,  1134,  1203,   506,
-     633,  1229,  1135,   507,   633,   901,  1169,   711,  1230,   512,
-     514,   741,   901,   520,   744,   902,  1249,  1233,  1250,   901,
-     522,   523,   902,   903,   904,   368,  1576,   905,   906,   902,
-     903,   904,  1394,   524,   905,   906,   901,   903,   904,  1254,
-     385,   905,   906,  1257,   592,  1281,   902,  1282,   633,  1342,
-    1316,  1343,   593,   594,   903,   904,   413,  1432,   905,   906,
+     632,   383,   384,   931,   901,   932,  1077,   385,  1244,  1080,
+     936,   937,   938,   939,   902,  1544,  1081,  1082,   942,  1085,
+    1083,  1256,   903,   904,   905,   807,  1262,   906,   907,   908,
+     909,  1086,  1099,  1266,  1104,   365,  1107,  1268,  1269,  1609,
+    1105,  1108,  1109,  1110,  1274,  1275,  1122,  1121,  1133,  1277,
+    1123,  1124,  1126,  1134,  1151,  1149,  1144,  1284,  1154,  1160,
+    1430,  1150,  1433,  1162,  1436,  1161,  1166,  1294,  1167,  1295,
+    1168,  1169,  1444,  1170,  1172,  1447,  1173,  1174,  1175,  1180,
+    1181,  1312,  1196,  1183,   400,  1184,   970,   400,   971,  1185,
+    1186,  1190,   871,   399,  1197,  1208,  1209,   399,  1210,  1582,
+    1327,  1204,  1211,   885,  1218,  1219,  1225,  1223,  1227,  1226,
+    1230,  1228,  1229,  1335,  1234,   994,   995,   996,   997,  1237,
+     901,  1238,  1245,  1246,  1248,  1263,  1251,   493,  1252,  1253,
+     902,   901,  1254,  1271,  1348,  1349,  1272,  1273,   903,   904,
+     905,   902,  1355,   906,   907,   908,   909,  1276,   901,   903,
+     904,   905,  1531,  1534,   906,   907,   908,   909,   902,  1278,
+    1280,  1279,  1030,  1281,  1282,  1285,   903,   904,   905,  1522,
+    1290,   906,   907,   908,   909,  1293,  1376,  1304,   954,  1307,
      371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
-     381,   382,   383,   384,   430,   157,   601,   433,   385,  1286,
-    1249,   813,  1382,  1249,  1429,  1412,  1430,   365,   365,  1260,
-     517,   633,  1547,  1441,  1249,   595,  1447,  1578,  1449,   646,
-    1450,   463,   652,  1452,  1600,  1453,  1249,   633,  1457,  1458,
-     836,  1601,   633,   399,  1477,   399,   844,  1229,  1342,   653,
-    1514,  1326,   657,   724,   850,  1293,   658,  1296,  1602,  1299,
-     633,   633,  1537,  1539,  1249,   659,  1543,   864,  1567,   664,
-    1568,  1310,   660,   870,  1313,  1314,   666,   667,   877,   877,
-     877,   877,   691,  1509,   518,   519,   399,   788,   633,  1570,
-    1579,   668,   693,   892,   893,  1580,  1249,  1581,  1598,   896,
-     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
-     383,   384,   917,   694,   696,   919,   385,   374,   375,   376,
-     377,   378,   379,   380,   381,   382,   383,   384,  1603,   399,
-    1604,   399,   385,   703,   704,   712,   399,   399,   399,   399,
-     713,   400,   729,   715,   399,   716,   400,   717,   718,   732,
-     400,   944,   738,   946,   947,   794,   795,   400,   796,   371,
-     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,   797,   798,   799,   802,   385,   803,   804,
-     814,   815,   819,   837,   618,   852,   842,   845,   958,   959,
-     846,   847,   857,   861,   365,   849,   853,   854,   856,   858,
-     859,   862,   960,   961,   962,   963,   964,   965,   863,   867,
-     872,   874,   399,   887,   399,   894,   895,   918,   931,   940,
-     493,   941,   400,   973,   942,   943,   950,   976,   952,   975,
-     977,   982,   978,   983,  1420,   984,  1423,   986,  1426,   990,
-     997,   399,   399,   399,   399,   995,  1434,   987,   998,  1437,
-     999,    97,   284,  1001,  1003,  1034,  1008,   101,   102,   103,
-    1014,  1020,   104,   105,   106,   107,   108,   109,   110,   111,
-     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
-     122,   123,   124,  1025,  1021,  1026,  1028,  1029,   399,  1032,
-    1035,  1033,   131,   132,   133,  1036,  1038,  1037,   135,   136,
-    1039,  1040,  1041,  1043,  1053,  1055,  1056,  1054,  1071,  1065,
-    1066,  1072,  1521,  1524,  1067,  1068,  1069,  1073,  1074,   400,
-    1075,  1077,   400,   371,   372,   373,   374,   375,   376,   377,
-     378,   379,   380,   381,   382,   383,   384,  1078,  1091,  1096,
-    1097,   385,  1099,  1512,  1100,  1102,  1076,  1101,  1113,  1115,
-    1154,  1126,  1114,  1143,   801,  1125,  1146,  1158,  1161,  1086,
-    1116,  1118,   493,  1136,  1162,  1563,  1142,  1165,  1141,  1166,
-    1167,  1152,  1172,  1153,  1159,  1160,  1173,  1200,  1164,   138,
-    1175,  1176,  1177,   807,  1178,  1182,   141,   142,   143,  1196,
-    1188,  1189,  1201,  1217,  1585,  1236,  1208,  1209,  1216,  1213,
-    1215,  1218,   148,   149,  1594,  1219,  1597,   150,  1129,  1224,
-    1220,  1227,   257,  1228,  1235,  1238,  1241,   156,  1137,  1138,
-    1242,  1243,  1244,  1253,  1606,  1272,  1261,  1610,  1147,  1149,
-    1262,  1263,  1266,  1268,  1270,   400,   400,   400,  1269,  1271,
-    1275,  1280,  1283,  1294,  1297,  1300,  1308,  1311,  1315,  1329,
-     871,  1304,  1328,  1330,  1331,   400,  1333,  1334,  1335,  1341,
-    1344,   885,   725,  1353,  1355,  1356,  1185,  1186,  1187,  1357,
-    1358,  1359,  1360,  1364,  1361,  1376,  1197,  1199,  1378,  1385,
-    1387,  1365,  1392,  1402,  1202,  1367,  1368,  1370,  1372,  1374,
-    1379,  1406,   399,   371,   372,   373,   374,   375,   376,   377,
-     378,   379,   380,   381,   382,   383,   384,  1395,  1407,  1393,
-    1408,   385,  1409,  1221,  1222,  1223,  1410,  1411,   401,  1428,
-    1413,  1435,  1442,   406,  1443,  1444,  1455,   410,  1459,  1471,
-    1472,  1475,  1480,  1487,   416,  1488,   951,   630,  1491,  1492,
-    1494,  1497,  1498,  1501,  1234,  1502,  1505,  1511,  1506,  1532,
-    1526,  1528,  1530,  1540,  1541,  1550,  1553,  1246,  1556,  1559,
-    1561,  1566,  1252,  1565,  1573,  1575,  1586,  1577,  1582,  1256,
-    1587,  1589,   985,  1258,  1259,  1591,  1593,  1595,  1605,  1607,
-    1264,  1265,  1608,  1609,  1611,  1267,   400,  1145,   400,  1156,
-    1481,    84,    92,  1274,   655,  1237,   725,   851,     0,     0,
-       0,     0,     0,  1284,     0,  1285,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,  1302,     0,     0,
-       0,     0,     0,     0,     0,  1024,     0,   399,     0,   400,
-       0,   399,     0,     0,  1317,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,  1325,     0,     0,
-    1012,  1013,     0,  1015,     0,  1018,  1019,     0,     0,  1022,
-    1023,     0,     0,     0,     0,     0,     0,     0,  1338,  1339,
-       0,     0,   400,     0,   400,     0,  1345,     0,     0,   400,
-     400,   400,   400,     0,     0,     0,     0,   400,     0,     0,
-       0,     0,     0,     0,     0,     0,   583,     0,     0,   587,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-    1366,   371,   372,   373,   374,   375,   376,   377,   378,   379,
-     380,   381,   382,   383,   384,     0,     0,     0,  1380,   385,
-     492,     0,     0,     0,     0,     0,     0,  1088,  1089,  1090,
-    1388,     0,  1389,     0,     0,   399,     0,  1098,     0,     0,
-       0,     0,     0,     0,     0,   400,     0,   400,  1397,     0,
-       0,     0,     0,  1401,   371,   372,   373,   374,   375,   376,
-     377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
-       0,     0,   385,   399,   400,   400,   400,   400,     0,     0,
-    1419,     0,  1422,     0,  1425,     0,  1140,     0,     0,     0,
-       0,     0,     0,     0,   399,     0,     0,     0,  1438,     0,
-       0,  1157,   700,   701,   702,     0,     0,  1163,     0,  1445,
-    1446,     0,     0,  1168,  1448,  1170,  1171,     0,     0,     0,
-    1174,   400,   719,     0,  1456,  1179,  1180,  1181,  1460,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,  1198,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,  1207,     0,     0,  1252,  1211,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,  1489,     7,     8,     0,
-       0,     0,     0,  1496,     0,     0,  1500,     0,     0,  1504,
-       0,     0,     0,  1507,     0,     0,     0,   399,     0,   399,
-       0,     0,     0,     0,  1516,     0,     0,  1518,     0,  1523,
-       0,     0,     0,     0,     0,     0,  1231,     0,  1232,     0,
-       0,     0,     0,   596,    19,    20,   597,    22,    23,   598,
+     381,   382,   383,   384,  1390,  1310,   492,  1314,   385,  1318,
+     400,   400,   400,  1321,  1325,  1573,  1398,  1338,  1399,  1339,
+    1340,   399,   901,  1341,  1344,  1584,  1343,  1351,  1345,  1354,
+     400,  1363,   902,  1365,  1407,  1366,  1586,   725,  1367,  1411,
+     903,   904,   905,  1368,  1595,   906,   907,   908,   909,  1369,
+    1370,  1374,  1386,  1588,  1604,  1388,  1607,  1377,  1395,   399,
+    1397,  1371,  1402,  1375,  1405,  1378,  1429,  1412,  1432,  1380,
+    1435,  1382,  1384,  1416,  1616,  1389,  1417,  1620,  1403,  1423,
+     399,  1418,  1419,  1420,  1448,     7,     8,  1421,  1438,  1445,
+    1452,  1453,  1469,  1454,  1465,  1455,  1456,  1481,  1485,  1490,
+    1458,  1482,  1015,  1016,  1497,  1018,  1498,  1021,  1022,  1501,
+    1466,  1025,  1026,  1502,  1470,  1504,  1507,  1610,  1508,  1511,
+    1512,  1515,  1516,  1521,  1536,  1542,  1538,  1540,  1550,  1551,
+    1560,   596,    19,    20,   597,    22,    23,   598,    25,   599,
+      27,  1262,    28,  1563,  1566,  1569,    32,    33,  1571,    35,
+      36,    37,  1499,   497,  1575,    40,  1576,  1596,  1583,  1506,
+    1585,   400,  1510,   400,  1587,  1514,  1592,  1597,  1599,  1517,
+    1601,   725,   851,   399,  1603,   399,  1605,  1615,  1617,  1618,
+    1526,  1619,  1621,  1528,  1222,  1533,  1153,    60,    61,    62,
+    1491,   630,  1096,  1097,  1098,  1164,    84,    92,   655,     0,
+    1247,     0,  1106,     0,   400,     0,     0,     0,     0,     0,
+       0,     0,     0,   901,     0,     0,  1556,     0,     0,     0,
+       0,     0,  1558,   902,     0,     0,     0,     0,     0,     0,
+       0,   903,   904,   905,     0,   399,   906,   907,   908,   909,
+       0,     0,     0,     0,     0,     0,     0,   400,   736,   400,
+     801,  1148,     0,     0,   400,   400,   400,   400,     0,     0,
+       0,     0,   400,     0,  1594,     0,  1165,     0,     0,     0,
+       0,     0,  1171,     0,     0,     0,     0,     0,  1176,     0,
+    1178,  1179,     0,     0,     0,  1182,     0,     7,     8,     0,
+    1187,  1188,  1189,   371,   372,   373,   374,   375,   376,   377,
+     378,   379,   380,   381,   498,   383,   384,  1206,  1611,     0,
+       0,   385,     0,     0,     0,     0,     0,     0,     7,     8,
+       0,     0,  1217,     0,     0,     0,  1221,     0,     0,     0,
+     400,     0,   400,   596,    19,    20,   597,    22,    23,   598,
       25,   599,    27,     0,    28,     0,     0,     0,    32,    33,
-    1546,    35,    36,    37,     0,     0,  1548,    40,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   399,
-       0,     7,     8,   841,     0,   843,     0,     0,     0,     0,
-       0,     0,  1276,  1277,  1278,  1279,    60,    61,    62,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,  1584,     0,
+       0,    35,    36,    37,     0,     0,     0,    40,     0,   400,
+     400,   400,   400,     0,   596,    19,    20,   597,    22,    23,
+     598,    25,   599,    27,     0,    28,  1241,     0,  1242,    32,
+      33,     0,    35,    36,    37,     0,     0,     0,    40,    60,
+      61,    62,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,   400,     0,     7,     8,
+     385,     0,     0,     0,     0,     0,     0,     0,   901,     0,
+      60,    61,    62,     0,     0,     0,     0,     0,   902,     0,
+       0,     0,  1286,  1287,  1288,  1289,   903,   904,   905,  1400,
+       0,   906,   907,   908,   909,     0,     0,     0,     0,     0,
+     737,     0,     0,     0,   596,    19,    20,   597,    22,    23,
+     598,    25,   599,    27,     0,    28,     0,  1148,     0,    32,
+      33,     0,    35,    36,    37,     0,     0,  1425,    40,  1328,
+     988,   889,     0,     0,     0,     0,  1337,   374,   375,   376,
+     377,   378,   379,   380,   381,   382,   383,   384,  1446,     0,
+       0,     0,   385,     0,     0,     0,     0,     0,  1350,     0,
+      60,    61,    62,  1612,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    97,   248,     0,     0,  1148,
+       0,   101,   102,   103,     0,     0,   104,   105,   106,   107,
+     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
+     118,   119,   120,   121,   122,   123,   124,   250,     0,     0,
+       0,     0,     0,  1387,     0,     0,   131,   132,   133,     0,
+       0,   890,   135,   136,     0,     0,     0,     0,     0,     0,
+     251,     0,     0,   252,     0,     0,   253,     0,   254,     0,
+       0,  1520,     0,  1523,     0,     0,     0,     0,     0,   255,
+    1148,     0,     0,     0,     0,     0,    42,    43,    44,    45,
+      46,     0,     0,     0,    50,     0,     0,    53,   400,     0,
+    1148,     0,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,     0,  1441,     0,     0,
+     385,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,  1570,     0,     0,   138,  1027,     0,     0,
+       0,     0,     0,   141,   142,   143,   373,   374,   375,   376,
+     377,   378,   379,   380,   381,   382,   383,   384,     0,   450,
+    1319,     0,   385,     0,   150,     0,     0,     0,  1480,   452,
+       0,     0,     0,     0,   156,     0,   218,   495,     0,     0,
+       0,     0,     0,     0,     0,     0,    97,   248,     0,     0,
+       0,     0,   101,   102,   103,     0,     0,   104,   105,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
+     117,   118,   119,   120,   121,   122,   123,   124,   250,  1078,
+       0,     0,     0,     0,  1148,     0,  1530,   131,   132,   133,
+       0,     0,     0,   135,   136,   400,     0,     0,     0,   400,
+       0,   251,     0,     0,   252,     0,     0,   253,     0,   254,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,  1140,   886,   596,    19,    20,
-     597,    22,    23,   598,    25,   599,    27,  1318,    28,     0,
-       0,     0,    32,    33,  1327,    35,    36,    37,     0,     0,
-       0,    40,     0,     0,     0,   400,     0,   736,  1070,     0,
-       0,     0,     0,     0,     0,     0,  1340,     0,     0,   928,
-       0,   929,     0,     0,     0,     0,   933,   934,   935,   936,
-      60,    61,    62,     0,   939,     0,     0,  1140,    97,   248,
-      99,     0,     0,     0,   101,   102,   103,     0,     0,   104,
-     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
-     250,  1377,     0,   125,   126,   127,   128,   129,   130,   131,
-     132,   133,     0,     0,   134,   135,   136,     0,     0,     0,
-       0,   737,     0,   251,     0,     0,   252,     0,     0,   253,
-       0,   254,   967,     0,   968,     0,     0,     0,  1140,     0,
-       0,     0,   255,     0,     0,     0,     0,     0,     0,    42,
-      43,    44,    45,    46,     0,     0,     0,    50,  1140,     0,
-      53,   991,   992,   993,   994,     0,     0,     0,     0,     0,
-     400,     0,     0,     0,   400,  1431,     0,   371,   372,   373,
-     374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,   138,   139,   140,     0,
-       0,     0,     0,   141,   142,   143,     0,     0,  1027,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   148,
-     256,     0,     0,     0,   150,     0,  1470,     0,     0,   257,
-       0,     0,     0,     0,   156,     0,  1519,     0,    97,   284,
-       0,     0,     0,     0,   101,   102,   103,     0,     0,   104,
-     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
-       0,     0,     0,   493,     0,     0,     0,     0,     0,   131,
-     132,   133,  1140,     0,  1520,   135,   136,     0,   400,     0,
-       0,     0,    97,    98,    99,     0,   100,     0,   101,   102,
-     103,     0,     0,   104,   105,   106,   107,   108,   109,   110,
-     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
-     121,   122,   123,   124,  1120,     0,   400,   125,   126,   127,
-     128,   129,   130,   131,   132,   133,     0,     0,   134,   135,
-     136,     0,     0,     0,     0,     0,     0,   400,     0,     0,
+     255,     0,     0,     0,     0,     0,     0,    42,    43,    44,
+      45,    46,     0,     0,     0,    50,     0,     0,    53,   371,
+     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
+     382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
+       0,     0,     0,     0,  1148,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   138,     0,     0,
+       0,     0,     0,     0,   141,   142,   143,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   493,     0,
+     148,   398,     0,     0,     0,   150,     0,     0,     0,     0,
+     257,     0,     0,   400,     0,   156,     0,     0,   495,     0,
+       0,   371,   372,   373,   374,   375,   376,   377,   378,   379,
+     380,   381,   382,   383,   384,     0,  1128,     0,     0,   385,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,  1140,     0,     0,     0,   138,     0,     0,     0,
-       0,     0,     0,   141,   142,   143,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   148,
-     149,     0,     0,     0,   150,     0,     0,     0,     0,   257,
-       0,     0,   357,     0,   156,     0,   358,     0,     0,     0,
-       0,     0,  1212,     0,   137,     0,     0,     0,     0,     0,
-     138,   139,   140,     0,     0,     0,     0,   141,   142,   143,
-     144,   145,   146,   147,     0,     0,     0,     0,     0,     0,
-     400,     0,   400,   148,   149,     0,  1127,     0,   150,     0,
-     151,   152,     0,   153,     0,   154,     0,   155,   156,     0,
-     157,     0,     0,   371,   372,   373,   374,   375,   376,   377,
-     378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,   400,     0,     0,     0,     0,     0,     0,
-       0,     0,    97,   248,   249,     0,     0,     0,   101,   102,
+       0,   400,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    97,   248,    99,     0,     0,     0,   101,   102,
      103,     0,   400,   104,   105,   106,   107,   108,   109,   110,
      111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
-     121,   122,   123,   124,   250,     0,     0,     0,     0,     0,
-       0,     0,     0,   131,   132,   133,     0,     0,     0,   135,
+     121,   122,   123,   124,   250,     0,     0,   125,   126,   127,
+     128,   129,   130,   131,   132,   133,     0,     0,   134,   135,
      136,     0,     0,     0,     0,     0,     0,   251,     0,     0,
      252,     0,     0,   253,     0,   254,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   255,     0,     0,     0,
+       0,     0,     0,     0,     0,  1135,   255,     0,     0,     0,
        0,     0,     0,    42,    43,    44,    45,    46,     0,     0,
-       0,    50,     0,     0,    53,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-     138,     0,     0,   385,     0,     0,     0,   141,   142,   143,
-    1289,     0,  1290,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   148,   256,     0,     0,     0,   150,     0,
-       0,     0,     0,   257,     0,     0,     0,     0,   156,     0,
-     258,     0,     0,     0,     0,  1390,     0,     0,     0,     0,
-      97,   248,  1205,     0,     0,     0,   101,   102,   103,     0,
+       0,    50,     0,     0,    53,  1224,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   400,     0,   400,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,     0,   138,   139,   140,   385,     0,     0,     0,
+     141,   142,   143,     0,     0,     0,     0,     0,   400,     0,
+       0,     0,     0,     0,     0,     0,   148,   256,     0,     0,
+       0,   150,     0,     0,     0,     0,   257,   400,    97,    98,
+      99,   156,   100,  1529,   101,   102,   103,     0,     0,   104,
+     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
+     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
+       0,     0,     0,   125,   126,   127,   128,   129,   130,   131,
+     132,   133,     7,     8,   134,   135,   136,   371,   372,   373,
+     374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
+     384,     0,     0,     0,     0,   385,     0,   371,   372,   373,
+     374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
+     384,     0,     0,     0,     0,   385,     0,     0,   596,    19,
+      20,   597,    22,    23,   598,    25,   599,    27,     0,    28,
+       0,     0,     0,    32,    33,     0,    35,    36,    37,     0,
+       0,     0,    40,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   137,     0,     0,     0,     0,     0,   138,
+     139,   140,     0,     0,     0,     0,   141,   142,   143,   144,
+     145,   146,   147,     0,    60,    61,    62,     0,     0,     0,
+       0,     0,   148,   149,     0,     0,     0,   150,     0,   151,
+     152,     0,   153,     0,   154,     0,   155,   156,     0,   157,
+      97,   248,   249,     0,     0,     0,   101,   102,   103,     0,
        0,   104,   105,   106,   107,   108,   109,   110,   111,   112,
      113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
-     123,   124,   250,  1415,     0,     0,     0,     0,     0,     0,
-       0,   131,   132,   133,     0,     0,     0,   135,   136,     0,
-       0,     0,     0,     0,  1436,   251,     0,     0,   252,     7,
-       8,   253,     0,   254,     0,     0,     0,     0,     0,     0,
+     123,   124,   250,     0,     0,   913,     0,     0,     0,     0,
+       0,   131,   132,   133,     0,     0,     0,   135,   136,     7,
+       8,     0,     0,     0,     0,   251,     0,     0,   252,     0,
+       0,   253,     0,   254,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,   255,     0,     0,     0,     0,     0,
        0,    42,    43,    44,    45,    46,     0,     0,     0,    50,
-       0,     0,    53,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   596,    19,    20,   597,    22,
+       0,     0,    53,     0,     0,   596,    19,    20,   597,    22,
       23,   598,    25,   599,    27,     0,    28,     0,     0,     0,
-      32,    33,     0,    35,    36,    37,     0,     0,   138,    40,
-       0,     0,     0,     0,     0,   141,   142,   143,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,  1510,     0,  1513,
-       0,   148,   256,     0,     0,     0,   150,     0,    60,    61,
-      62,   257,     0,    97,   248,     0,   156,     0,  1206,   101,
-     102,   103,     0,     0,   104,   105,   106,   107,   108,   109,
-     110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
-     120,   121,   122,   123,   124,   250,     0,     0,     0,     0,
-       0,     0,     0,     0,   131,   132,   133,     0,     0,  1560,
-     135,   136,     7,     8,     0,     0,     0,     0,   251,   889,
-       0,   252,     0,     0,   253,     0,   254,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   255,     0,     0,
-       0,     0,     0,     0,    42,    43,    44,    45,    46,     0,
-       0,     0,    50,     0,     0,    53,     0,     0,   596,    19,
-      20,   597,    22,    23,   598,    25,   599,    27,     0,    28,
-       0,     0,     0,    32,    33,     0,    35,    36,    37,     0,
-       0,     0,    40,     0,     0,     0,     0,     0,     0,     0,
+      32,    33,     0,    35,    36,    37,     0,     0,     0,    40,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,   138,     0,     0,     0,     0,     0,     0,   141,   142,
      143,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,    60,    61,    62,   148,   256,     0,     0,     0,   150,
-       0,     0,     0,     0,   257,     0,    97,   248,     0,   156,
+       0,     0,     0,     0,   257,     0,    97,   248,  1215,   156,
        0,   258,   101,   102,   103,     0,     0,   104,   105,   106,
      107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
      117,   118,   119,   120,   121,   122,   123,   124,   250,     0,
        0,     0,     0,     0,     0,     0,     0,   131,   132,   133,
-       0,     0,   890,   135,   136,     7,     8,     0,     0,     0,
+       0,     0,   948,   135,   136,     7,     8,     0,     0,     0,
        0,   251,     0,     0,   252,     0,     0,   253,     0,   254,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      255,     0,     0,     0,     0,     0,     0,    42,    43,    44,
@@ -2066,854 +2056,875 @@ static const yytype_int16 yytable[] =
        0,   596,    19,    20,   597,    22,    23,   598,    25,   599,
       27,     0,    28,     0,     0,     0,    32,    33,     0,    35,
       36,    37,     0,     0,     0,    40,     0,     0,     0,     0,
-       0,     0,     0,     0,   138,     0,     0,     0,     0,     0,
-       0,   141,   142,   143,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    60,    61,    62,   148,   398,     0,
-       0,     0,   150,     0,     0,     0,     0,   257,     0,    97,
-     248,     0,   156,     0,   491,   101,   102,   103,     0,     0,
-     104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
-     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
-     124,   250,     0,     0,     0,     0,     0,     0,     0,     0,
-     131,   132,   133,     0,     0,   910,   135,   136,     7,     8,
-       0,     0,     0,     0,   251,     0,     0,   252,     0,     0,
-     253,     0,   254,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   255,     0,     0,     0,     0,     0,     0,
-      42,    43,    44,    45,    46,     0,     0,     0,    50,     0,
-       0,    53,     0,     0,   596,    19,    20,   597,    22,    23,
-     598,    25,   599,    27,     0,    28,     0,     0,     0,    32,
-      33,     0,    35,    36,    37,     0,     0,     0,    40,     0,
        0,     0,     0,     0,     0,     0,     0,   138,     0,     0,
        0,     0,     0,     0,   141,   142,   143,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,    60,    61,    62,
-     148,   398,     0,     0,     0,   150,     0,     0,     0,     0,
-     257,     0,    97,   248,     0,   156,     0,   723,   101,   102,
+     148,   256,     0,     0,     0,   150,     0,     0,     0,     0,
+     257,     0,    97,   248,     0,   156,     0,  1216,   101,   102,
      103,     0,     0,   104,   105,   106,   107,   108,   109,   110,
      111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
      121,   122,   123,   124,   250,     0,     0,     0,     0,     0,
-       0,     0,     0,   131,   132,   133,     0,     0,   945,   135,
+       0,     0,     0,   131,   132,   133,     0,     0,  1047,   135,
      136,     7,     8,     0,     0,     0,     0,   251,     0,     0,
      252,     0,     0,   253,     0,   254,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,   255,     0,     0,     0,
        0,     0,     0,    42,    43,    44,    45,    46,     0,     0,
        0,    50,     0,     0,    53,     0,     0,   596,    19,    20,
      597,    22,    23,   598,    25,   599,    27,     0,    28,     0,
-       0,     0,    32,    33,     0,    35,    36,    37,     0,  1214,
+       0,     0,    32,    33,     0,    35,    36,    37,     0,     0,
        0,    40,     0,     0,     0,     0,     0,     0,     0,     0,
-     138,     0,     0,     0,     0,     0,     0,   141,   142,   143,
-    1332,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      60,    61,    62,   148,   256,     0,     0,     0,   150,     0,
-       0,     0,     0,   257,     0,    97,   248,     0,   156,     0,
-    1210,   101,   102,   103,     0,     0,   104,   105,   106,   107,
-     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
-     118,   119,   120,   121,   122,   123,   124,   250,     0,     0,
-       0,     0,     0,     0,     0,     0,   131,   132,   133,     0,
-       0,  1044,   135,   136,     0,     0,     0,     0,     0,     0,
-     251,     0,     0,   252,     0,     0,   253,     0,   254,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   255,
-       0,     0,     0,     0,     0,     0,    42,    43,    44,    45,
-      46,     0,     0,     0,    50,     0,     0,    53,   371,   372,
-     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
-     383,   384,     0,     0,     0,     0,   385,     0,     0,   371,
-     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,   138,  1363,     0,     0,   385,     0,     0,
+       0,     0,     0,   138,     0,     0,     0,     0,     0,     0,
      141,   142,   143,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   450,  1309,     0,     0,
-       0,   150,     0,     0,     0,     0,   452,     0,    97,   284,
-      99,   156,     0,   218,   101,   102,   103,     0,     0,   104,
+       0,     0,     0,    60,    61,    62,   148,   256,     0,     0,
+       0,   150,     0,     0,     0,     0,   257,     0,    97,   248,
+       0,   156,     0,   258,   101,   102,   103,     0,     0,   104,
      105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
      115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
-       0,     0,     0,   125,   126,   127,   128,   129,   130,   131,
-     132,   133,     0,     0,   134,   135,   136,    97,   284,    99,
-       0,     0,     0,   101,   102,   103,     0,     0,   104,   105,
-     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
-     116,   117,   118,   119,   120,   121,   122,   123,   124,     0,
-       0,     0,   125,   126,   127,   128,   129,   130,   131,   132,
-     133,     7,     8,   134,   135,   136,     0,     0,     0,     0,
-       0,     0,     0,   371,   372,   373,   374,   375,   376,   377,
-     378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,     0,     0,     0,   138,   139,   140,     0,
-       0,     0,     0,   141,   142,   143,     0,   596,    19,    20,
-     597,    22,    23,   598,    25,   599,    27,     0,    28,   148,
-     149,     0,    32,    33,   150,    35,    36,    37,     0,   257,
-       0,    40,     0,     0,   156,     0,  1148,  1391,     0,     0,
-       0,     0,     0,     0,     0,   138,   139,   140,     0,     0,
-       0,     0,   141,   142,   143,     0,     0,     0,     0,     0,
-      60,    61,    62,     0,     0,     0,     0,     0,   148,   149,
-       0,     0,     0,   150,     0,     0,     0,     0,   257,     0,
-      97,   284,    99,   156,     0,  1324,   101,   102,   103,     0,
-       0,   104,   105,   106,   107,   108,   109,   110,   111,   112,
-     113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
-     123,   124,     0,     0,     0,   125,   126,   127,   128,   129,
-     130,   131,   132,   133,    97,   284,   134,   135,   136,     0,
+     250,     0,     0,     0,     0,     0,     0,     0,     0,   131,
+     132,   133,     0,     0,  1483,   135,   136,     7,     8,     0,
+       0,     0,     0,   251,     0,     0,   252,     0,     0,   253,
+       0,   254,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   255,     0,     0,     0,     0,     0,     0,    42,
+      43,    44,    45,    46,     0,     0,     0,    50,     0,     0,
+      53,     0,     0,   596,    19,    20,   597,    22,    23,   598,
+      25,   599,    27,     0,    28,     0,     0,     0,    32,    33,
+       0,    35,    36,    37,     0,  1342,     0,    40,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   138,
+       0,     0,     0,     0,  1373,     0,   141,   142,   143,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    60,
+      61,    62,   148,   398,     0,     0,     0,   150,     0,     0,
+       0,     0,   257,     0,    97,   248,     0,   156,     0,   491,
      101,   102,   103,     0,     0,   104,   105,   106,   107,   108,
      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
-     119,   120,   121,   122,   123,   124,     0,     0,     0,     0,
+     119,   120,   121,   122,   123,   124,   250,     0,     0,     0,
        0,     0,     0,     0,     0,   131,   132,   133,     0,     0,
-       0,   135,   136,     7,     8,     0,   371,   372,   373,   374,
-     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
-       0,     0,     0,     0,   385,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   138,   139,
-     140,     0,     0,     0,     0,   141,   142,   143,     0,   596,
-      19,    20,   597,    22,    23,   598,    25,   599,    27,     0,
-      28,   148,   149,     0,    32,    33,   150,    35,    36,    37,
-       0,   257,     0,    40,     0,     0,   156,     0,  1522,  1479,
-       0,     0,   138,     0,     0,     0,     0,     0,     0,   141,
-     142,   143,     0,     0,     0,     0,     0,     0,  1533,     0,
-       0,     0,    60,    61,    62,   148,   149,     0,     0,     0,
-     150,     0,     0,     0,     0,   257,     0,     0,   709,     0,
-     156,     0,   710,    97,   284,     0,     0,     0,     0,   101,
-     102,   103,     0,     0,   104,   105,   106,   107,   108,   109,
-     110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
-     120,   121,   122,   123,   124,     0,     0,     0,     0,     0,
-       0,     0,     0,  1473,   131,   132,   133,    97,   284,     0,
-     135,   136,     0,   101,   102,   103,     0,     0,   104,   105,
-     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
-     116,   117,   118,   119,   120,   121,   122,   123,   124,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   131,   132,
-     133,     0,     0,     0,   135,   136,     7,     8,   371,   372,
-     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
-     383,   384,     0,     0,     0,     0,   385,   371,   372,   373,
+    1545,   135,   136,     0,     0,     0,     0,     0,     0,   251,
+       0,     0,   252,     0,     0,   253,     0,   254,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   255,     0,
+       0,     0,     0,     0,     0,    42,    43,    44,    45,    46,
+       0,     0,     0,    50,     0,     0,    53,   371,   372,   373,
      374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,   138,     0,     0,     0,   385,     0,     0,   141,   142,
-     143,     0,   596,    19,    20,   597,    22,    23,   598,    25,
-     599,    27,     0,    28,   148,   149,     0,    32,    33,   150,
-      35,    36,    37,     0,   257,     0,    40,  1569,   497,   156,
-       0,   355,     0,     0,     0,   138,     0,     0,     0,     0,
-       0,     0,   141,   142,   143,     0,  1599,     0,     0,     0,
-       0,     0,     0,     0,     0,    60,    61,    62,   450,   451,
-       0,     0,     0,   150,     0,     0,     0,     0,   452,     0,
-      97,   248,     0,   156,     0,   218,   101,   102,   103,     0,
+     384,     0,     0,     0,     0,   385,   371,   372,   373,   374,
+     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
+    1401,     0,     0,     0,   385,   138,     0,     0,     0,     0,
+       0,     0,   141,   142,   143,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   148,   398,
+       0,     0,     0,   150,     0,     0,     0,     0,   257,     0,
+      97,   248,     0,   156,     0,   723,   101,   102,   103,     0,
        0,   104,   105,   106,   107,   108,   109,   110,   111,   112,
      113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
      123,   124,   250,     0,     0,     0,     0,     0,     0,     0,
-       0,   131,   132,   133,     0,     0,  1535,   135,   136,     0,
+       0,   131,   132,   133,     0,     0,     0,   135,   136,     0,
        0,     0,     0,     0,     0,   251,     0,     0,   252,     0,
-       0,   253,     0,   254,     0,     0,     0,     0,     0,   733,
+       0,   253,     0,   254,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,   255,     0,     0,     0,     0,     0,
-       0,    42,    43,    44,    45,    46,     0,     0,   824,    50,
-       0,     0,    53,     0,     0,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   632,   383,   384,   938,
-       0,     0,     0,   385,   371,   372,   373,   374,   375,   376,
-     377,   378,   379,   380,   381,   382,   383,   384,   138,  1093,
-       0,     0,   385,     0,     0,   141,   142,   143,     0,     0,
+       0,    42,    43,    44,    45,    46,     0,     0,     0,    50,
+       0,     0,    53,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,     0,  1489,     0,     0,
+     385,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   138,     0,     0,     0,     0,  1543,     0,   141,   142,
+     143,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   148,   256,     0,     0,     0,   150,
+       0,     0,     0,     0,   257,     0,    97,   248,     0,   156,
+       0,  1220,   101,   102,   103,     0,     0,   104,   105,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
+     117,   118,   119,   120,   121,   122,   123,   124,   250,     0,
+       0,     0,     0,     0,     0,     0,     0,   131,   132,   133,
+       0,     0,     0,   135,   136,     0,     0,     0,     0,     0,
+       0,   251,     0,     0,   252,     0,     0,   253,     0,   254,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   148,   398,     0,     0,     0,   150,    97,   284,    99,
-       0,   257,     0,   101,   102,   103,   156,     0,   104,   105,
+     255,     0,     0,     0,     0,     0,     0,    42,    43,    44,
+      45,    46,     0,     0,     0,    50,     0,     0,    53,   371,
+     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
+     382,   383,   384,     0,     0,     0,     0,   385,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,   497,     0,     0,     0,   385,   138,     0,     0,
+       0,     0,     0,     0,   141,   142,   143,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     450,  1319,     0,     0,     0,   150,     0,     0,     0,     0,
+     452,     0,    97,   284,    99,   156,     0,   218,   101,   102,
+     103,     0,     0,   104,   105,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
+     121,   122,   123,   124,     0,     0,     0,   125,   126,   127,
+     128,   129,   130,   131,   132,   133,     0,     0,   134,   135,
+     136,    97,   284,    99,     0,     0,     0,   101,   102,   103,
+       0,     0,   104,   105,   106,   107,   108,   109,   110,   111,
+     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
+     122,   123,   124,     0,     0,     0,   125,   126,   127,   128,
+     129,   130,   131,   132,   133,     0,     0,   134,   135,   136,
+       0,     0,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   632,   383,   384,     0,     0,     0,     0,
+     385,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   138,   139,   140,     0,     0,     0,     0,
+     141,   142,   143,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   148,   149,     0,     0,
+       0,   150,     0,     0,     0,     0,   257,     0,     0,     0,
+       0,   156,     0,  1156,     0,     0,     0,     0,     0,     0,
+       0,     0,   138,   139,   140,     0,     0,     0,     0,   141,
+     142,   143,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   148,   149,     0,     0,     0,
+     150,     0,     0,     0,     0,   257,     0,    97,   284,    99,
+     156,     0,  1334,   101,   102,   103,     0,     0,   104,   105,
      106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
      116,   117,   118,   119,   120,   121,   122,   123,   124,     0,
        0,     0,   125,   126,   127,   128,   129,   130,   131,   132,
-     133,     0,     0,   134,   135,   136,   371,   372,   373,   374,
+     133,    97,   284,   134,   135,   136,     0,   101,   102,   103,
+       0,     0,   104,   105,   106,   107,   108,   109,   110,   111,
+     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
+     122,   123,   124,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   131,   132,   133,     0,     0,     0,   135,   136,
+       0,    97,   284,     0,     0,     0,     0,   101,   102,   103,
+       0,     0,   104,   105,   106,   107,   108,   109,   110,   111,
+     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
+     122,   123,   124,     0,     0,     0,     0,     0,   138,   139,
+     140,     0,   131,   132,   133,   141,   142,   143,   135,   136,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   148,   149,     0,     0,     0,   150,     0,     0,     0,
+       0,   257,     0,     0,     0,     0,   156,     0,  1532,     0,
+       0,     0,   138,     0,     0,     0,     0,     0,     0,   141,
+     142,   143,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   148,   149,     0,     0,     0,
+     150,     0,     0,     0,     0,   257,     0,     0,   709,     0,
+     156,     0,   710,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   138,     0,     0,     0,     0,     0,     0,   141,
+     142,   143,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   148,   149,     0,     0,     0,
+     150,     0,     0,     0,     0,   257,     0,    97,   284,     0,
+     156,     0,   355,   101,   102,   103,     0,     0,   104,   105,
+     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
+     116,   117,   118,   119,   120,   121,   122,   123,   124,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   131,   132,
+     133,    97,   248,     0,   135,   136,     0,   101,   102,   103,
+       0,     0,   104,   105,   106,   107,   108,   109,   110,   111,
+     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
+     122,   123,   124,   250,     0,     0,     0,     0,     0,     0,
+       0,     0,   131,   132,   133,     0,     0,     0,   135,   136,
+       0,     0,     0,     0,     0,     0,   251,     0,     0,   252,
+       0,     0,   253,     0,   254,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   255,     0,     0,     0,     0,
+       0,     0,    42,    43,    44,    45,    46,     0,   138,     0,
+      50,     0,     0,    53,     0,   141,   142,   143,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   450,   451,     0,   733,     0,   150,     0,     0,     0,
+       0,   452,     0,     0,     0,     0,   156,     0,   218,     0,
+       0,     0,   138,   824,     0,     0,     0,     0,     0,   141,
+     142,   143,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   148,   398,     0,     0,     0,
+     150,    97,   284,    99,     0,   257,     0,   101,   102,   103,
+     156,     0,   104,   105,   106,   107,   108,   109,   110,   111,
+     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
+     122,   123,   124,     0,     0,     0,   125,   126,   127,   128,
+     129,   130,   131,   132,   133,    97,   284,   134,   135,   136,
+       0,   101,   102,   103,     0,     0,   104,   105,   106,   107,
+     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
+     118,   119,   120,   121,   122,   123,   124,   941,     0,     0,
+       0,     0,     0,     0,     0,     0,   131,   132,   133,     0,
+       0,     0,   135,   136,   371,   372,   373,   374,   375,   376,
+     377,   378,   379,   380,   381,   382,   383,   384,  1101,     0,
+       0,     0,   385,   371,   372,   373,   374,   375,   376,   377,
+     378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
+       0,   385,   138,   139,   140,     0,     0,     0,     0,   141,
+     142,   143,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   148,   149,     0,     0,     0,
+     150,     0,     0,     0,     0,   257,     0,     0,     0,     0,
+     156,     0,     0,     0,     0,     0,   138,     0,     0,     0,
+       0,     0,     0,   141,   142,   143,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   148,
+     149,     0,     0,     0,   150,     0,     0,     0,     0,   257,
+       0,     0,     0,     0,   156,     0,     0,   371,   372,   373,
+     374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
+     384,     0,    -4,     1,     0,   385,    -4,     0,     0,     0,
+       0,     0,     0,     0,    -4,    -4,     0,     0,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,     0,     0,     0,     0,   385,     0,    -4,    -4,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    -4,
+      -4,     0,     0,     0,    -4,    -4,    -4,     0,    -4,    -4,
+      -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,
+       0,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,
+      -4,    -4,     0,    -4,    -4,    -4,    -4,    -4,    -4,    -4,
+      -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,
+       0,     0,     0,    -4,    -4,     6,     0,     0,     0,     0,
+      -4,     0,     0,     7,     8,    -4,    -4,    -4,    -4,     0,
+       0,    -4,     0,    -4,     0,    -4,    -4,    -4,    -4,    -4,
+      -4,    -4,    -4,    -4,    -4,    -4,     0,     9,    10,    -4,
+      -4,    -4,    -4,     0,     0,     0,     0,     0,    11,    12,
+       0,     0,     0,    13,    14,    15,     0,    16,    17,    18,
+      19,    20,    21,    22,    23,    24,    25,    26,    27,     0,
+      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
+      38,     0,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,     7,
+       8,     0,    56,    57,  1033,     0,     0,     0,     0,    58,
+       0,     0,     0,     0,    59,    60,    61,    62,     0,     0,
+      63,     0,    64,     0,    65,    66,    67,    68,    69,    70,
+      71,    72,    73,    74,    75,     0,     0,     0,    76,    77,
+      78,    79,     0,     0,     0,   596,    19,    20,   597,    22,
+      23,   598,    25,   599,    27,     0,    28,     0,     0,     0,
+      32,    33,     0,    35,    36,    37,     0,     0,     0,    40,
+       0,     0,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
+     385,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    60,    61,    62,   371,   372,   373,   374,   375,   376,
+     377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
+       0,     0,   385,     0,     0,     0,     0,     0,     0,  1299,
+       0,  1300,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
+     385,     0,     0,     0,     0,     0,     0,  1329,     0,  1330,
+     371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
+     381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
+       0,     0,     0,     0,     0,  1427,     0,  1428,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,     0,     0,     0,     0,   385,     0,     0,     0,
+       0,     0,     0,     0,     0,   866,   371,   372,   373,   374,
      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
-       0,     0,     0,     0,   385,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,   371,   372,   373,   374,
+       0,     0,     0,     0,   385,     0,     0,     0,     0,     0,
+       0,     0,     0,   916,   371,   372,   373,   374,   375,   376,
+     377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
+       0,     0,   385,     0,     0,     0,     0,     0,     0,     0,
+       0,   935,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
+     385,     0,     0,     0,     0,     0,     0,     0,     0,   960,
+     371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
+     381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
+       0,     0,     0,     0,     0,     0,     0,  1051,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,     0,     0,     0,     0,   385,     0,     0,     0,
+       0,     0,     0,     0,     0,  1297,   371,   372,   373,   374,
      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
-       0,     0,     0,     0,   385,     0,   371,   372,   373,   374,
+       0,     0,     0,     0,   385,     0,     0,     0,     0,     0,
+       0,     0,     0,  1316,   371,   372,   373,   374,   375,   376,
+     377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
+       0,     0,   385,     0,     0,     0,     0,     0,     0,     0,
+       0,  1358,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
+     385,     0,     0,     0,     0,     0,     0,     0,     0,  1359,
+     371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
+     381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
+       0,     0,     0,     0,     0,     0,     0,  1360,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,     0,     0,     0,     0,   385,     0,     0,     0,
+       0,     0,     0,     0,     0,  1361,   371,   372,   373,   374,
      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
-       0,     0,     0,     0,   385,   138,   139,   140,     0,     0,
-       0,     0,   141,   142,   143,     0,     0,     0,    -4,     1,
-       0,     0,    -4,     0,     0,     0,     0,     0,   148,   149,
-      -4,    -4,     0,   150,     0,     0,     0,     0,   257,     0,
-       0,     0,     0,   156,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    -4,    -4,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    -4,    -4,     0,     0,     0,
-      -4,    -4,    -4,     0,    -4,    -4,    -4,    -4,    -4,    -4,
-      -4,    -4,    -4,    -4,    -4,    -4,     0,    -4,    -4,    -4,
-      -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,     0,    -4,
-      -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,
-      -4,    -4,    -4,    -4,    -4,    -4,     0,     6,    -4,    -4,
-       0,     0,     0,    -4,     0,     7,     8,     0,    -4,    -4,
-      -4,    -4,     0,     0,    -4,     0,    -4,     0,    -4,    -4,
-      -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,     9,
-      10,     0,    -4,    -4,    -4,    -4,     0,     0,     0,     0,
-      11,    12,     0,     0,     0,    13,    14,    15,     0,    16,
-      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
-      27,     0,    28,    29,    30,    31,    32,    33,    34,    35,
-      36,    37,    38,     0,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,     0,     0,    56,    57,     0,     0,     0,    58,     0,
-       0,     0,     0,    59,    60,    61,    62,     0,     0,    63,
-       0,    64,     0,    65,    66,    67,    68,    69,    70,    71,
-      72,    73,    74,    75,     0,     0,     0,    76,    77,    78,
-      79,   371,   372,   373,   374,   375,   376,   377,   378,   379,
-     380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,     0,     0,     0,     0,     0,  1319,     0,  1320,   371,
-     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
-       0,     0,     0,     0,  1417,     0,  1418,   371,   372,   373,
-     374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,     0,     0,     0,
-       0,     0,     0,     0,   866,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,     0,     0,     0,     0,
-       0,     0,   913,   371,   372,   373,   374,   375,   376,   377,
-     378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,     0,     0,     0,     0,     0,     0,     0,
-     932,   371,   372,   373,   374,   375,   376,   377,   378,   379,
-     380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,     0,     0,     0,     0,     0,     0,     0,   957,   371,
-     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
-       0,     0,     0,     0,     0,     0,  1048,   371,   372,   373,
-     374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,     0,     0,     0,
-       0,     0,     0,     0,  1287,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,     0,     0,     0,     0,
-       0,     0,  1306,   371,   372,   373,   374,   375,   376,   377,
-     378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,     0,     0,     0,     0,     0,     0,     0,
-    1348,   371,   372,   373,   374,   375,   376,   377,   378,   379,
-     380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,     0,     0,     0,     0,     0,     0,     0,  1349,   371,
-     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
-       0,     0,     0,     0,     0,     0,  1350,   371,   372,   373,
-     374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,     0,     0,     0,
-       0,     0,     0,     0,  1351,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,     0,     0,     0,     0,
-       0,     0,  1352,   371,   372,   373,   374,   375,   376,   377,
-     378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,     0,     0,     0,     0,     0,     0,     0,
-    1386,   371,   372,   373,   374,   375,   376,   377,   378,   379,
-     380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,     0,     0,     0,     0,     0,     0,     0,  1433,   371,
-     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
-       0,     0,     0,     0,     0,     0,  1439,   371,   372,   373,
-     374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,     0,     0,     0,
-       0,     0,     0,     0,  1440,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,     0,     0,     0,     0,
-       0,     0,  1461,   371,   372,   373,   374,   375,   376,   377,
-     378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,     0,     0,     0,     0,     0,     0,     0,
-    1464,   371,   372,   373,   374,   375,   376,   377,   378,   379,
-     380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,     0,     0,     0,     0,     0,     0,     0,  1467,   371,
-     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
-       0,     0,     0,     0,     0,     0,  1490,   371,   372,   373,
-     374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,     0,     0,     0,
-       0,     0,     0,     0,  1493,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,     0,     0,     0,     0,
-       0,     0,  1527,   371,   372,   373,   374,   375,   376,   377,
-     378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,     0,     0,     0,     0,     0,     0,     0,
-    1529,   371,   372,   373,   374,   375,   376,   377,   378,   379,
-     380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,     0,     0,     0,     0,     0,     0,     0,  1531,   371,
-     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
-       0,     0,     0,     0,     0,     0,  1544,   371,   372,   373,
-     374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,     0,     0,     0,
-       0,     0,     0,     0,  1571,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,     0,     0,     0,     0,
-       0,   665,   371,   372,   373,   374,   375,   376,   377,   378,
+       0,     0,     0,     0,   385,     0,     0,     0,     0,     0,
+       0,     0,     0,  1362,   371,   372,   373,   374,   375,   376,
+     377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
+       0,     0,   385,     0,     0,     0,     0,     0,     0,     0,
+       0,  1396,   371,   372,   373,   374,   375,   376,   377,   378,
      379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
-     385,     0,     0,     0,     0,     0,     0,     0,  1362,   371,
-     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,   720,
-       0,     0,     0,     0,   672,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,     0,     0,     0,     0,
-     625,   371,   372,   373,   374,   375,   376,   377,   378,   379,
-     380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,     0,     0,     0,     0,     0,   672,   371,   372,   373,
-     374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,     0,     0,     0,
-       0,     0,   673,   371,   372,   373,   374,   375,   376,   377,
-     378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,     0,     0,     0,     0,     0,   730,   371,
-     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
-       0,     0,     0,     0,   767,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,     0,     0,     0,     0,
-     768,   371,   372,   373,   374,   375,   376,   377,   378,   379,
-     380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,     0,     0,     0,     0,     0,   781,   371,   372,   373,
-     374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,     0,     0,     0,
-       0,     0,   782,   371,   372,   373,   374,   375,   376,   377,
-     378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,     0,     0,     0,     0,     0,   783,   371,
-     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
-       0,     0,     0,     0,   784,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,     0,     0,     0,     0,
-     785,   371,   372,   373,   374,   375,   376,   377,   378,   379,
-     380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,     0,     0,     0,     0,     0,   786,   371,   372,   373,
-     374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,     0,     0,     0,
-       0,     0,   898,   371,   372,   373,   374,   375,   376,   377,
-     378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,     0,     0,     0,     0,     0,   899,   371,
-     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
-       0,     0,     0,     0,   900,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,     0,     0,     0,     0,
-    1007,   371,   372,   373,   374,   375,   376,   377,   378,   379,
-     380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,     0,     0,     0,     0,     0,  1046,   371,   372,   373,
-     374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,     0,     0,     0,
-       0,     0,  1047,   371,   372,   373,   374,   375,   376,   377,
-     378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,     0,     0,     0,     0,     0,  1092,   371,
-     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
-       0,     0,     0,     0,  1247,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,     0,     0,     0,     0,
-    1248,   371,   372,   373,   374,   375,   376,   377,   378,   379,
-     380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,     0,     0,     0,     0,     0,  1255,   371,   372,   373,
-     374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,     0,     0,     0,
-       0,     0,  1398,   371,   372,   373,   374,   375,   376,   377,
+     385,     0,     0,     0,     0,     0,     0,     0,     0,  1443,
+     371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
+     381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
+       0,     0,     0,     0,     0,     0,     0,  1449,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,     0,     0,     0,     0,   385,     0,     0,     0,
+       0,     0,     0,     0,     0,  1450,   371,   372,   373,   374,
+     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
+       0,     0,     0,     0,   385,     0,     0,     0,     0,     0,
+       0,     0,     0,  1471,   371,   372,   373,   374,   375,   376,
+     377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
+       0,     0,   385,     0,     0,     0,     0,     0,     0,     0,
+       0,  1474,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
+     385,     0,     0,     0,     0,     0,     0,     0,     0,  1477,
+     371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
+     381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
+       0,     0,     0,     0,     0,     0,     0,  1500,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,     0,     0,     0,     0,   385,     0,     0,     0,
+       0,     0,     0,     0,     0,  1503,   371,   372,   373,   374,
+     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
+       0,     0,     0,     0,   385,     0,     0,     0,     0,     0,
+       0,     0,     0,  1537,   371,   372,   373,   374,   375,   376,
+     377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
+       0,     0,   385,     0,     0,     0,     0,     0,     0,     0,
+       0,  1539,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
+     385,     0,     0,     0,     0,     0,     0,     0,     0,  1541,
+     371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
+     381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
+       0,     0,     0,     0,     0,     0,     0,  1554,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,     0,     0,     0,     0,   385,     0,     0,     0,
+       0,     0,     0,     0,     0,  1581,   371,   372,   373,   374,
+     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
+       0,     0,     0,     0,   385,     0,     0,     0,     0,     0,
+       0,     0,   665,   371,   372,   373,   374,   375,   376,   377,
      378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,     0,     0,     0,     0,     0,  1399,   371,
-     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
-       0,     0,     0,     0,  1403,   371,   372,   373,   374,   375,
-     376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,     0,     0,     0,     0,
-    1483,   371,   372,   373,   374,   375,   376,   377,   378,   379,
-     380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,     0,     0,     0,     0,     0,  1486,   371,   372,   373,
+       0,   385,     0,     0,     0,     0,     0,     0,     0,  1372,
+     371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
+     381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
+     720,     0,     0,     0,     0,   672,   371,   372,   373,   374,
+     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
+       0,     0,     0,     0,   385,     0,     0,     0,     0,     0,
+       0,   625,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
+     385,     0,     0,     0,     0,     0,     0,   672,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,     0,     0,     0,     0,   385,     0,     0,     0,
+       0,     0,     0,   673,   371,   372,   373,   374,   375,   376,
+     377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
+       0,     0,   385,     0,     0,     0,     0,     0,     0,   730,
+     371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
+     381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
+       0,     0,     0,     0,     0,   767,   371,   372,   373,   374,
+     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
+       0,     0,     0,     0,   385,     0,     0,     0,     0,     0,
+       0,   768,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
+     385,     0,     0,     0,     0,     0,     0,   781,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,     0,     0,     0,     0,   385,     0,     0,     0,
+       0,     0,     0,   782,   371,   372,   373,   374,   375,   376,
+     377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
+       0,     0,   385,     0,     0,     0,     0,     0,     0,   783,
+     371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
+     381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
+       0,     0,     0,     0,     0,   784,   371,   372,   373,   374,
+     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
+       0,     0,     0,     0,   385,     0,     0,     0,     0,     0,
+       0,   785,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
+     385,     0,     0,     0,     0,     0,     0,   786,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,     0,     0,     0,     0,   385,     0,     0,     0,
+       0,     0,     0,   898,   371,   372,   373,   374,   375,   376,
+     377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
+       0,     0,   385,     0,     0,     0,     0,     0,     0,   899,
+     371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
+     381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
+       0,     0,     0,     0,     0,   900,   371,   372,   373,   374,
+     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
+       0,     0,     0,     0,   385,     0,     0,     0,     0,     0,
+       0,  1010,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
+     385,     0,     0,     0,     0,     0,     0,  1049,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,     0,     0,     0,     0,   385,     0,     0,     0,
+       0,     0,     0,  1050,   371,   372,   373,   374,   375,   376,
+     377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
+       0,     0,   385,     0,     0,     0,     0,     0,     0,  1100,
+     371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
+     381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
+       0,     0,     0,     0,     0,  1257,   371,   372,   373,   374,
+     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
+       0,     0,     0,     0,   385,     0,     0,     0,     0,     0,
+       0,  1258,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
+     385,     0,     0,     0,     0,     0,     0,  1265,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,     0,     0,     0,     0,   385,     0,     0,     0,
+       0,     0,     0,  1408,   371,   372,   373,   374,   375,   376,
+     377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
+       0,     0,   385,     0,     0,     0,     0,     0,     0,  1409,
+     371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
+     381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
+       0,     0,     0,     0,     0,  1413,   371,   372,   373,   374,
+     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
+       0,     0,     0,     0,   385,     0,     0,     0,     0,     0,
+       0,  1493,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
+     385,     0,     0,     0,     0,     0,     0,  1496,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,     0,     0,     0,     0,   385,     0,     0,     0,
+       0,     0,     0,  1535,   371,   372,   373,   374,   375,   376,
+     377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
+       0,     0,   385,     0,     0,     0,   588,   371,   372,   373,
      374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,     0,     0,     0,
-       0,     0,  1525,   371,   372,   373,   374,   375,   376,   377,
+     384,     0,     0,     0,     0,   385,     0,     0,     0,   735,
+     371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
+     381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
+       0,     0,   742,   371,   372,   373,   374,   375,   376,   377,
      378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,     0,     0,   588,   371,   372,   373,   374,
+       0,   385,     0,     0,     0,   746,   371,   372,   373,   374,
      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
-       0,     0,     0,     0,   385,     0,     0,     0,   735,   371,
+       0,     0,     0,     0,   385,     0,     0,     0,   748,   371,
      372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
      382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
-       0,   742,   371,   372,   373,   374,   375,   376,   377,   378,
+       0,   750,   371,   372,   373,   374,   375,   376,   377,   378,
      379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
-     385,     0,     0,     0,   746,   371,   372,   373,   374,   375,
+     385,     0,     0,     0,   752,   371,   372,   373,   374,   375,
      376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,     0,   748,   371,   372,
+       0,     0,     0,   385,     0,     0,     0,   754,   371,   372,
      373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
      383,   384,     0,     0,     0,     0,   385,     0,     0,     0,
-     750,   371,   372,   373,   374,   375,   376,   377,   378,   379,
+     756,   371,   372,   373,   374,   375,   376,   377,   378,   379,
      380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,     0,     0,   752,   371,   372,   373,   374,   375,   376,
+       0,     0,     0,   758,   371,   372,   373,   374,   375,   376,
      377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
-       0,     0,   385,     0,     0,     0,   754,   371,   372,   373,
+       0,     0,   385,     0,     0,     0,   760,   371,   372,   373,
      374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,     0,     0,   756,
+     384,     0,     0,     0,     0,   385,     0,     0,     0,   762,
      371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
      381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
-       0,     0,   758,   371,   372,   373,   374,   375,   376,   377,
+       0,     0,   764,   371,   372,   373,   374,   375,   376,   377,
      378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,     0,     0,   760,   371,   372,   373,   374,
+       0,   385,     0,     0,     0,   766,   371,   372,   373,   374,
      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
-       0,     0,     0,     0,   385,     0,     0,     0,   762,   371,
+       0,     0,     0,     0,   385,     0,     0,     0,   770,   371,
      372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
      382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
-       0,   764,   371,   372,   373,   374,   375,   376,   377,   378,
+       0,   772,   371,   372,   373,   374,   375,   376,   377,   378,
      379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
-     385,     0,     0,     0,   766,   371,   372,   373,   374,   375,
+     385,     0,     0,     0,   774,   371,   372,   373,   374,   375,
      376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,     0,   770,   371,   372,
+       0,     0,     0,   385,     0,     0,     0,   776,   371,   372,
      373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
      383,   384,     0,     0,     0,     0,   385,     0,     0,     0,
-     772,   371,   372,   373,   374,   375,   376,   377,   378,   379,
+     778,   371,   372,   373,   374,   375,   376,   377,   378,   379,
      380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,     0,     0,   774,   371,   372,   373,   374,   375,   376,
+       0,     0,     0,   780,   371,   372,   373,   374,   375,   376,
      377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
-       0,     0,   385,     0,     0,     0,   776,   371,   372,   373,
+       0,     0,   385,     0,     0,     0,   924,   371,   372,   373,
      374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,     0,     0,   778,
+     384,     0,     0,     0,     0,   385,     0,     0,     0,   925,
      371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
      381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
-       0,     0,   780,   371,   372,   373,   374,   375,   376,   377,
+       0,     0,   929,   371,   372,   373,   374,   375,   376,   377,
      378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,     0,     0,   921,   371,   372,   373,   374,
+       0,   385,     0,     0,     0,   930,   371,   372,   373,   374,
      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
-       0,     0,     0,     0,   385,     0,     0,     0,   922,   371,
+       0,     0,     0,     0,   385,     0,     0,     0,   933,   371,
      372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
      382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
-       0,   926,   371,   372,   373,   374,   375,   376,   377,   378,
+       0,   956,   371,   372,   373,   374,   375,   376,   377,   378,
      379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
-     385,     0,     0,     0,   927,   371,   372,   373,   374,   375,
+     385,     0,     0,     0,  1005,   371,   372,   373,   374,   375,
      376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,     0,     0,   930,   371,   372,
+       0,     0,     0,   385,     0,     0,     0,  1112,   371,   372,
      373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
      383,   384,     0,     0,     0,     0,   385,     0,     0,     0,
-     953,   371,   372,   373,   374,   375,   376,   377,   378,   379,
+    1114,   371,   372,   373,   374,   375,   376,   377,   378,   379,
      380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,     0,     0,  1002,   371,   372,   373,   374,   375,   376,
+       0,     0,     0,  1116,   371,   372,   373,   374,   375,   376,
      377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
-       0,     0,   385,     0,     0,     0,  1104,   371,   372,   373,
+       0,     0,   385,     0,     0,     0,  1118,   371,   372,   373,
      374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,     0,     0,  1106,
+     384,     0,     0,     0,     0,   385,     0,     0,     0,  1249,
      371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
      381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
-       0,     0,  1108,   371,   372,   373,   374,   375,   376,   377,
-     378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,     0,     0,  1110,   371,   372,   373,   374,
-     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
-       0,     0,     0,     0,   385,     0,     0,     0,  1239,   371,
-     372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,     0,
-       0,  1375,   371,   372,   373,   374,   375,   376,   377,   378,
-     379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
-     385,     0,   584,   371,   372,   373,   374,   375,   376,   377,
+       0,     0,  1385,   371,   372,   373,   374,   375,   376,   377,
      378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,   631,   371,   372,   373,   374,   375,   376,
+       0,   385,     0,   584,   371,   372,   373,   374,   375,   376,
      377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
-       0,     0,   385,     0,   635,   371,   372,   373,   374,   375,
+       0,     0,   385,     0,   631,   371,   372,   373,   374,   375,
      376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,   636,   371,   372,   373,   374,
+       0,     0,     0,   385,     0,   635,   371,   372,   373,   374,
      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
-       0,     0,     0,     0,   385,     0,   638,   371,   372,   373,
+       0,     0,     0,     0,   385,     0,   636,   371,   372,   373,
      374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,   640,   371,   372,
+     384,     0,     0,     0,     0,   385,     0,   638,   371,   372,
      373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
-     383,   384,     0,     0,     0,     0,   385,     0,   641,   371,
+     383,   384,     0,     0,     0,     0,   385,     0,   640,   371,
      372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,   644,
+     382,   383,   384,     0,     0,     0,     0,   385,     0,   641,
      371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
      381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
-     645,   371,   372,   373,   374,   375,   376,   377,   378,   379,
+     644,   371,   372,   373,   374,   375,   376,   377,   378,   379,
      380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,   720,   371,   372,   373,   374,   375,   376,   377,   378,
+       0,   645,   371,   372,   373,   374,   375,   376,   377,   378,
      379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
-     385,     0,   726,   371,   372,   373,   374,   375,   376,   377,
+     385,     0,   720,   371,   372,   373,   374,   375,   376,   377,
      378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,   727,   371,   372,   373,   374,   375,   376,
+       0,   385,     0,   726,   371,   372,   373,   374,   375,   376,
      377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
-       0,     0,   385,     0,   728,   371,   372,   373,   374,   375,
+       0,     0,   385,     0,   727,   371,   372,   373,   374,   375,
      376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,   734,   371,   372,   373,   374,
+       0,     0,     0,   385,     0,   728,   371,   372,   373,   374,
      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
-       0,     0,     0,     0,   385,     0,   745,   371,   372,   373,
+       0,     0,     0,     0,   385,     0,   734,   371,   372,   373,
      374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,   747,   371,   372,
+     384,     0,     0,     0,     0,   385,     0,   745,   371,   372,
      373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
-     383,   384,     0,     0,     0,     0,   385,     0,   749,   371,
+     383,   384,     0,     0,     0,     0,   385,     0,   747,   371,
      372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,   751,
+     382,   383,   384,     0,     0,     0,     0,   385,     0,   749,
      371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
      381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
-     753,   371,   372,   373,   374,   375,   376,   377,   378,   379,
+     751,   371,   372,   373,   374,   375,   376,   377,   378,   379,
      380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,   755,   371,   372,   373,   374,   375,   376,   377,   378,
+       0,   753,   371,   372,   373,   374,   375,   376,   377,   378,
      379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
-     385,     0,   757,   371,   372,   373,   374,   375,   376,   377,
+     385,     0,   755,   371,   372,   373,   374,   375,   376,   377,
      378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,   759,   371,   372,   373,   374,   375,   376,
+       0,   385,     0,   757,   371,   372,   373,   374,   375,   376,
      377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
-       0,     0,   385,     0,   761,   371,   372,   373,   374,   375,
+       0,     0,   385,     0,   759,   371,   372,   373,   374,   375,
      376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,   763,   371,   372,   373,   374,
+       0,     0,     0,   385,     0,   761,   371,   372,   373,   374,
      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
-       0,     0,     0,     0,   385,     0,   765,   371,   372,   373,
+       0,     0,     0,     0,   385,     0,   763,   371,   372,   373,
      374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,   769,   371,   372,
+     384,     0,     0,     0,     0,   385,     0,   765,   371,   372,
      373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
-     383,   384,     0,     0,     0,     0,   385,     0,   771,   371,
+     383,   384,     0,     0,     0,     0,   385,     0,   769,   371,
      372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,   773,
+     382,   383,   384,     0,     0,     0,     0,   385,     0,   771,
      371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
      381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
-     775,   371,   372,   373,   374,   375,   376,   377,   378,   379,
+     773,   371,   372,   373,   374,   375,   376,   377,   378,   379,
      380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,   777,   371,   372,   373,   374,   375,   376,   377,   378,
+       0,   775,   371,   372,   373,   374,   375,   376,   377,   378,
      379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
-     385,     0,   779,   371,   372,   373,   374,   375,   376,   377,
+     385,     0,   777,   371,   372,   373,   374,   375,   376,   377,
      378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,   855,   371,   372,   373,   374,   375,   376,
+       0,   385,     0,   779,   371,   372,   373,   374,   375,   376,
      377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
-       0,     0,   385,     0,   860,   371,   372,   373,   374,   375,
+       0,     0,   385,     0,   855,   371,   372,   373,   374,   375,
      376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,   865,   371,   372,   373,   374,
+       0,     0,     0,   385,     0,   860,   371,   372,   373,   374,
      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
-       0,     0,     0,     0,   385,     0,   868,   371,   372,   373,
+       0,     0,     0,     0,   385,     0,   865,   371,   372,   373,
      374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,   869,   371,   372,
+     384,     0,     0,     0,     0,   385,     0,   868,   371,   372,
      373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
-     383,   384,     0,     0,     0,     0,   385,     0,   875,   371,
+     383,   384,     0,     0,     0,     0,   385,     0,   869,   371,
      372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,   882,
+     382,   383,   384,     0,     0,     0,     0,   385,     0,   875,
      371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
      381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
-     883,   371,   372,   373,   374,   375,   376,   377,   378,   379,
+     882,   371,   372,   373,   374,   375,   376,   377,   378,   379,
      380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
-       0,   884,   371,   372,   373,   374,   375,   376,   377,   378,
+       0,   883,   371,   372,   373,   374,   375,   376,   377,   378,
      379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
-     385,     0,   912,   371,   372,   373,   374,   375,   376,   377,
+     385,     0,   884,   371,   372,   373,   374,   375,   376,   377,
      378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,   914,   371,   372,   373,   374,   375,   376,
+       0,   385,     0,   915,   371,   372,   373,   374,   375,   376,
      377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
-       0,     0,   385,     0,   915,   371,   372,   373,   374,   375,
+       0,     0,   385,     0,   917,   371,   372,   373,   374,   375,
      376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,   916,   371,   372,   373,   374,
+       0,     0,     0,   385,     0,   918,   371,   372,   373,   374,
      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
-       0,     0,     0,     0,   385,     0,   920,   371,   372,   373,
+       0,     0,     0,     0,   385,     0,   919,   371,   372,   373,
      374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385,     0,  1103,   371,   372,
+     384,     0,     0,     0,     0,   385,     0,   923,   371,   372,
      373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
-     383,   384,     0,     0,     0,     0,   385,     0,  1105,   371,
+     383,   384,     0,     0,     0,     0,   385,     0,  1111,   371,
      372,   373,   374,   375,   376,   377,   378,   379,   380,   381,
-     382,   383,   384,     0,     0,     0,     0,   385,     0,  1107,
+     382,   383,   384,     0,     0,     0,     0,   385,     0,  1113,
      371,   372,   373,   374,   375,   376,   377,   378,   379,   380,
      381,   382,   383,   384,     0,     0,     0,     0,   385,     0,
-    1109,   371,   372,   373,   374,   375,   376,   377,   378,   379,
+    1115,   371,   372,   373,   374,   375,   376,   377,   378,   379,
      380,   381,   382,   383,   384,     0,     0,     0,     0,   385,
        0,  1117,   371,   372,   373,   374,   375,   376,   377,   378,
      379,   380,   381,   382,   383,   384,     0,     0,     0,     0,
-     385,     0,  1288,   371,   372,   373,   374,   375,   376,   377,
+     385,     0,  1125,   371,   372,   373,   374,   375,   376,   377,
      378,   379,   380,   381,   382,   383,   384,     0,     0,     0,
-       0,   385,     0,  1305,   371,   372,   373,   374,   375,   376,
+       0,   385,     0,  1298,   371,   372,   373,   374,   375,   376,
      377,   378,   379,   380,   381,   382,   383,   384,     0,     0,
-       0,     0,   385,     0,  1323,   371,   372,   373,   374,   375,
+       0,     0,   385,     0,  1315,   371,   372,   373,   374,   375,
      376,   377,   378,   379,   380,   381,   382,   383,   384,     0,
-       0,     0,     0,   385,     0,  1482,   371,   372,   373,   374,
+       0,     0,     0,   385,     0,  1333,   371,   372,   373,   374,
      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
-       0,     0,     0,     0,   385,     0,  1542,   371,   372,   373,
+       0,     0,     0,     0,   385,     0,  1492,   371,   372,   373,
      374,   375,   376,   377,   378,   379,   380,   381,   382,   383,
-     384,     0,     0,     0,     0,   385
+     384,     0,     0,     0,     0,   385,     0,  1552,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,     0,     0,     0,     0,   385
 };
 
 static const yytype_int16 yycheck[] =
 {
-       6,     6,     3,     6,   226,  1208,     6,     6,   338,     6,
-     211,   911,     4,     4,   907,     4,   238,   347,     5,   444,
-     445,   357,     7,     4,   360,     4,     6,     4,     4,     4,
-       4,     6,     5,     5,   164,   154,   155,     4,     4,   154,
-     155,     4,     6,    64,     4,    66,     6,    64,   154,   155,
-      80,     4,     6,   172,     6,     6,   171,   154,   155,   281,
-      90,   283,     0,     6,   170,    80,   172,  1270,    98,    99,
-     161,   162,   102,   103,   171,    90,   154,   155,    43,    44,
-       8,    46,   164,    98,    99,   154,   155,   102,   103,   171,
-     154,   155,    58,   171,   165,   100,    62,     4,    58,   170,
-     116,   170,   164,   172,     3,     4,   170,    73,   172,   171,
-       9,    10,    11,   129,   130,    14,    15,    16,    17,    18,
-      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
-      29,    30,    31,    32,    33,    34,    35,    13,  1341,   106,
-     107,   108,   109,     7,   125,    44,    45,    46,     8,     6,
-     104,    50,    51,   104,   151,   164,   157,   172,  1361,    58,
-     166,   167,    61,   116,   117,    64,     6,    66,   171,   161,
-     162,  1064,   171,   164,   166,   164,   168,     8,    77,   171,
-     171,   173,   171,   168,   171,    84,    85,    86,    87,    88,
-     171,   166,   171,    92,   171,   171,    95,   171,   171,   171,
-     164,   164,   154,   155,     6,   172,   165,   171,   151,   116,
-     117,   170,     7,   435,   436,   164,     7,   145,   146,   147,
+       6,     6,   211,     3,   226,   338,     4,   444,   445,     4,
+       6,  1218,     4,     4,   347,     4,   238,     4,     4,     4,
+      13,     5,     5,     5,     4,     6,   357,     4,     6,   360,
+       4,     6,     6,     6,     4,     4,     7,     4,   167,     6,
+       4,   168,    64,     4,     5,   174,     6,   174,     6,   119,
+       6,     6,     6,     6,   157,   158,   196,   197,   198,   281,
+       6,   283,   132,   133,    43,    44,   168,    46,   157,   158,
+     173,   173,   175,  1280,   157,   158,     0,    38,    39,    40,
+      41,    42,    43,   910,   173,   167,   175,     7,    49,   167,
+     173,    58,   232,   233,    58,   100,   164,   165,    62,   170,
+       3,     4,   173,   171,   244,   245,     9,    10,    11,    73,
+     169,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      33,    34,   109,   110,   111,   112,   128,   164,   165,   119,
+     120,    44,    45,    46,  1351,   157,   158,    50,    51,   107,
+     119,   120,   107,   107,   107,     7,    61,   157,     8,    64,
+     166,   167,    61,   175,  1371,    64,   164,   165,     6,     7,
+     167,   169,   167,   171,   135,   136,   174,   174,   176,   174,
+     167,   154,   174,   174,     7,   174,   167,   174,   174,   174,
+     174,   174,   174,   174,   154,   169,   174,   167,   175,   174,
+     171,   157,   158,   164,   165,   167,     8,    64,   167,    66,
+     171,     6,   174,   435,   436,   174,   157,   158,     6,   170,
+     157,   158,   173,     6,   144,   145,   146,   147,   157,   158,
+     167,   134,   173,   455,   175,   214,   215,   174,   141,   142,
+     143,   157,   158,   222,   173,  1072,     6,   226,   157,   158,
+       7,   157,   158,   584,   157,   158,     6,   588,   174,   162,
+     170,   157,   158,   173,   167,   174,   167,   170,   174,   172,
+     167,   174,    58,   157,   158,    61,    58,   173,    64,    61,
+      66,   168,    64,   914,   506,   168,   173,   169,  1495,   173,
+     173,   167,   144,   145,   146,   147,    79,   167,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,   164,   165,   157,   158,   166,   164,   165,   171,
+      68,   144,   145,   146,   147,   175,    61,   174,   167,    64,
+     173,    66,   167,   339,   340,   341,   342,   343,   344,   345,
+     346,   164,   165,   349,   350,   351,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+     170,   157,   158,   173,   166,   148,   149,   150,  1575,    61,
+     153,   154,    64,   175,    66,   157,   158,   173,   168,   168,
+       6,     7,   165,   173,   173,   167,   169,   144,   145,   146,
+     147,    64,   174,   176,   177,   178,   179,   168,   181,   182,
+     183,   184,   173,   186,   187,   188,   170,   164,   165,   173,
+     193,   157,   158,     6,   360,   157,   158,   157,   158,    64,
+     157,   158,   174,     4,     5,   208,   167,   173,   169,    80,
+      64,   173,   168,   173,   217,   218,   173,   173,    66,    90,
+     157,   158,    64,   226,   444,   445,   668,    98,    99,   100,
+     157,   158,   103,   104,   105,   106,   173,    38,    39,    40,
+      41,    42,    43,   442,   443,   168,   173,   168,    49,   167,
+     173,   450,   173,   256,   257,   258,     4,    61,    80,   157,
+     158,   157,   158,   266,   267,   268,   174,   270,    90,   174,
+     273,   274,   157,   158,   277,   173,    98,    99,   100,    64,
+      61,   103,   104,   105,   106,    61,    64,   290,   173,   658,
+     659,   660,   295,   296,   297,   298,   299,   300,   301,   302,
+     303,   304,   305,   306,   307,   308,   309,   310,   311,   312,
+     313,   314,   315,   316,   317,   318,   319,   320,   321,   322,
+     323,   324,   325,   326,   327,   328,   329,   330,   331,   332,
+     333,   334,   335,   336,   135,   136,    84,    85,    86,    87,
+      58,   157,   158,    61,    92,   348,    64,    95,    66,   157,
+     158,     4,   355,   175,     6,   358,   522,   173,   157,   158,
+     159,   160,   161,     4,   589,   173,     4,   166,   371,   372,
+     373,   374,   375,   376,   377,   378,   379,   380,   381,   382,
+     383,   384,   385,   167,  1431,   169,     6,  1434,   817,     6,
+    1437,   157,   158,   157,   158,   398,   159,   160,   161,   167,
+     167,   404,   169,   166,   630,   167,   409,   173,   167,   173,
+     169,   414,   415,   167,   417,   418,   167,   167,   169,   422,
+     169,   167,   588,   169,   427,   428,   429,   978,   164,   165,
+     981,   982,   657,   658,   659,   660,     4,   167,   174,   169,
+     167,   167,   169,   169,   447,   448,   449,   450,   451,   452,
+     167,     4,   169,   456,   457,   458,   459,   460,   167,   167,
+     169,   464,   167,   167,   467,   468,   167,   167,   471,   472,
+     473,  1518,   671,   476,   477,   167,   479,   164,   165,   678,
+     483,   167,   169,   169,   171,   684,   167,     7,   491,   176,
+     167,   167,   169,   169,   497,   498,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+     167,   167,  1559,   516,   166,  1562,   742,   520,  1565,   167,
+     523,  1568,   167,     4,   169,   164,   165,   174,   167,  1380,
+     169,  1382,   171,  1384,   167,   174,   169,   176,     6,  1196,
+    1197,   167,   167,   169,   169,     6,   712,     5,   167,     6,
+     169,  1598,   167,  1600,   169,  1602,   167,   167,   169,   169,
+     989,   167,   788,   169,   169,   173,   171,   175,   794,     4,
+     167,   797,   798,   799,   167,   173,   742,   175,   804,   167,
+      38,    39,    40,    41,    42,    43,    80,   590,    64,   167,
+      66,    49,   177,   173,   167,   175,    90,   182,   173,   169,
+     175,   186,   174,   167,    98,    99,   100,   174,   193,   103,
+     104,   105,   106,   173,   840,   175,   619,   174,   173,   622,
+     175,   624,   625,   173,   173,   175,   175,   167,   167,   632,
+     633,   167,   174,  1484,   153,   154,   155,   156,   157,   158,
+     159,   160,   161,   646,   173,   169,   175,   166,   174,   652,
+     849,   173,     6,   175,   657,   658,   659,   660,   173,   173,
+     175,   175,   665,    64,   173,    66,   175,   174,   167,   672,
+     673,   173,   173,   175,   175,   678,   167,   135,   136,   167,
+     167,   175,     8,   169,   173,  1536,   175,  1538,   691,  1540,
+     174,   694,    12,    13,   173,  1546,   175,   174,     5,   898,
+     899,   900,   173,   169,   175,   708,   173,   710,   175,  1138,
+     174,     5,   715,   716,   717,   718,     5,   158,  1375,   173,
+     723,   175,   173,   173,   175,   175,   173,   730,   175,   732,
+     733,   173,  1583,   175,  1585,   173,  1587,   175,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,   189,    69,
+     173,     6,   175,    73,    74,     6,    76,    77,    78,   173,
+     171,   175,    82,   122,   767,   768,   207,   933,   174,   210,
+     355,     6,     4,   358,     6,   173,   169,   175,   781,   782,
+     783,   784,   785,   786,     6,   173,  1011,   175,   791,   173,
+     793,   175,     6,   234,   114,   115,   116,     4,   173,   802,
+     175,   174,   173,   806,   175,     6,     6,   810,   173,   173,
+     175,   175,   173,   173,   175,   175,   982,   820,   821,   822,
+     823,   824,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,   173,   173,   175,   175,
+     166,   173,   168,   175,   166,     7,   287,   288,   171,   173,
+      80,   175,   173,     6,   175,   175,   173,   173,   175,   175,
+      90,   173,   175,   175,   867,   173,   169,   175,    98,    99,
+     100,     7,  1071,   103,   104,   105,   106,   173,   173,   175,
+     175,   173,   173,   175,   175,     7,   471,   472,   473,   174,
+       7,   167,   167,    80,   167,   167,  1122,     7,   168,     6,
+     174,     7,     6,    90,     7,  1130,   491,     6,     6,     6,
+      80,    98,    99,   100,  1343,     4,   103,   104,   105,   106,
+      90,     4,   174,   119,   174,   928,   174,  1153,    98,    99,
+     100,  1156,   174,   103,   104,   105,   106,   174,   941,   168,
+       6,   168,   173,  1109,   168,   175,     6,  1389,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,   173,  1162,   173,   173,   166,  1192,     7,     8,
+     173,   168,     4,     4,   173,   170,  1196,  1197,     6,  1532,
+       6,     4,     6,   122,   122,     7,     7,   990,   175,     7,
+       7,     7,     7,   122,     7,     7,   174,  1000,  1001,  1198,
+       4,  1200,   171,  1202,     6,   175,     6,  1010,  1011,   175,
+     175,  1236,   170,     7,     7,     7,   171,  1216,   174,     6,
+    1219,  1220,   168,     6,     6,   170,   177,     6,   169,     7,
+       6,   182,   167,   167,   174,   186,     6,   622,   154,   624,
+      80,     7,   193,  1485,     7,  1048,  1049,  1050,     7,     7,
+      90,     6,    66,     7,     7,  1058,     7,  1060,    98,    99,
+     100,  1227,     7,   103,   104,   105,   106,   168,  1071,     7,
+       7,     7,   168,   168,   168,     6,  1079,     4,     4,   167,
+     665,     6,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,   174,  1100,  1101,  1102,
+     166,     6,   174,     7,     6,   256,     7,   258,     7,   148,
+     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
+     159,   160,   161,   708,    80,   710,     7,   166,  1131,     6,
+     715,   716,   717,   718,    90,   175,     6,     6,   723,     6,
+      64,  1144,    98,    99,   100,   586,  1149,   103,   104,   105,
+     106,     6,     4,  1156,     4,  1375,   175,  1160,  1161,     7,
+       4,     6,     4,     6,  1167,  1168,   173,   168,   171,  1172,
+     168,   168,   168,     7,     6,   174,   167,  1180,     6,   174,
+    1379,   171,  1381,    73,  1383,   174,     6,  1190,   174,  1192,
+     174,     6,  1391,     6,   174,  1394,     6,     6,     5,     4,
+       6,  1204,   174,     7,   355,     7,   791,   358,   793,     7,
+       7,     7,   653,  1216,   174,     6,     6,  1220,     6,   175,
+    1223,   169,     6,   664,   174,   174,   168,   174,     4,   170,
+     118,     6,     6,  1236,     6,   820,   821,   822,   823,   173,
+      80,     6,     6,     4,     6,     4,     6,   398,     6,     6,
+      90,    80,     6,     6,  1257,  1258,     6,     6,    98,    99,
+     100,    90,  1265,   103,   104,   105,   106,     6,    80,    98,
+      99,   100,  1497,  1498,   103,   104,   105,   106,    90,     5,
+     174,     6,   867,     6,   122,     6,    98,    99,   100,  1488,
+       6,   103,   104,   105,   106,     6,  1299,     6,   739,     6,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,   164,   131,   455,     6,   163,   154,   155,   171,   138,
-     139,   140,   154,   155,   172,   165,   164,   164,   584,   214,
-     215,   171,   588,   171,   171,   154,   155,   222,   170,   164,
-     159,   226,   156,   157,   158,   164,   166,   154,   155,   163,
-     169,    61,   171,   172,    64,   166,     7,   141,   142,   143,
-     144,   164,  1485,   170,   506,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,   161,
-     162,   164,   164,   163,   166,    61,   168,    68,    64,   171,
-      66,   173,   172,   164,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,   196,   197,
-     198,   164,   163,   339,   340,   341,   342,   343,   344,   345,
-     346,   154,   155,   349,   350,   351,   141,   142,   143,   144,
-     141,   142,   143,   144,   164,    58,   166,   170,    61,     4,
-     360,    64,  1565,    64,   232,   233,   161,   162,   154,   155,
-     161,   162,    64,   168,     3,     4,   244,   245,   165,     6,
-       9,    10,    11,   170,   170,    14,    15,    16,    17,    18,
-      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
-      29,    30,    31,    32,    33,    34,    35,   154,   155,   171,
-     141,   142,   143,   144,    64,    44,    45,    46,   154,   155,
-     165,    50,    51,   170,    64,   170,   161,   162,   165,    58,
-     161,   162,    61,   170,   170,    64,   171,    66,   164,    84,
-      85,    86,    87,   444,   445,    66,   668,    92,    77,    61,
-      95,   154,   155,     4,     5,    84,    85,    86,    87,    88,
-     164,   164,   166,    92,   161,   162,    95,    61,   171,   166,
-    1370,   168,  1372,   164,  1374,   166,   173,   442,   443,     4,
-       5,   154,   155,   154,   155,   450,   171,    38,    39,    40,
-      41,    42,    43,    61,   154,   155,    64,   170,    49,   170,
-      12,    13,   131,   154,   155,   154,   155,   154,   155,   138,
-     139,   140,   171,    38,    39,    40,    41,    42,    43,   170,
-      64,   170,   522,   170,    49,   154,   155,   165,  1421,    64,
-     159,  1424,   170,    61,  1427,   164,    64,   165,    66,    61,
-     169,     8,   170,   172,   154,   155,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,   164,    69,   161,   162,
-     170,    73,    74,     4,    76,    77,    78,   164,   171,   166,
-      82,   154,   155,     4,  1474,   154,   155,   154,   155,   154,
-     155,   132,   133,     8,   589,   161,   162,   170,   588,   154,
-     155,   170,   168,   170,   164,   170,   166,     6,     4,   111,
-     112,   113,   154,   155,   164,   170,    58,   132,   133,    61,
-     161,   162,    64,     6,    66,  1508,   817,   168,   170,     6,
-     165,   164,    80,   166,   630,   170,  1526,   164,  1528,   165,
-    1530,   164,    90,   166,   170,   167,  1536,   164,   170,   975,
-      98,    99,   978,   979,   102,   103,   167,   167,   167,   170,
-     170,   170,   657,   658,   659,   660,  1549,   166,    58,  1552,
-     172,    61,  1555,     4,    64,  1558,    66,     5,   167,     4,
-      79,   170,   164,  1573,   166,  1575,   164,  1577,   145,   146,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     157,   158,   164,   164,   166,  1588,   163,  1590,   165,  1592,
-      38,    39,    40,    41,    42,    43,   671,   164,   658,   659,
-     660,    49,   712,   678,   172,   164,   164,   166,   166,   684,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,   164,   164,   742,   166,   163,   148,
-     149,   150,   742,    80,   153,   154,   154,   155,   156,   157,
-     158,     6,     7,    90,    80,   163,   165,   164,     7,   166,
-     169,    98,    99,  1188,  1189,   102,   103,   176,   177,   178,
-     179,     4,   181,   182,   183,   184,   164,   186,   187,   188,
-     164,   164,   788,   166,   193,   986,   164,   164,   794,   166,
-     164,   797,   798,   799,   132,   133,     6,     7,   804,   208,
-     164,   164,   166,   166,   164,   164,   166,   166,   217,   218,
-     164,   164,   166,   166,   164,   164,   166,   226,   164,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,   164,   840,   172,   164,   163,   166,   166,
-     170,   168,   172,    64,    80,    66,     6,   256,   257,   258,
-     170,   170,   172,   172,    90,   171,     6,   266,   267,   268,
-      80,   270,    98,    99,   273,   274,   102,   103,   277,   170,
-      90,   172,   170,   170,   172,   172,     6,   164,    98,    99,
-     164,   290,   102,   103,   849,   171,   295,   296,   297,   298,
-     299,   300,   301,   302,   303,   304,   305,   306,   307,   308,
-     309,   310,   311,   312,   313,   314,   315,   316,   317,   318,
-     319,   320,   321,   322,   323,   324,   325,   326,   327,   328,
-     329,   330,   331,   332,   333,   334,   335,   336,   171,  1130,
-     930,     4,    80,   898,   899,   900,   172,   164,    80,   348,
-    1365,   170,    90,   172,   166,   170,   355,   172,    90,   358,
-      98,    99,   172,   164,   102,   103,    98,    99,   164,   164,
-     102,   103,   371,   372,   373,   374,   375,   376,   377,   378,
-     379,   380,   381,   382,   383,   384,   385,   164,   164,   979,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,   398,
-     171,   171,    80,   163,   170,   404,   172,   170,   164,   172,
-     409,   164,    90,  1008,   171,   414,   415,   171,   417,   418,
-      98,    99,   164,   422,   102,   103,   171,     6,   427,   428,
-     429,     6,   171,   170,   172,   172,   170,    64,   172,    66,
-     172,   170,   164,   172,    80,   170,     5,   172,   447,   448,
-     449,   450,   451,   452,    90,   171,   166,   456,   457,   458,
-     459,   460,    98,    99,   166,   464,   102,   103,   467,   468,
-     166,     6,   471,   472,   473,     6,   168,   476,   477,   170,
-     479,   172,     5,   170,   483,   172,   170,   170,   172,   172,
-       5,   170,   491,   172,   172,   170,     6,   172,   497,   498,
-     170,   170,   172,   172,   170,   170,   172,   172,  1063,   171,
-     170,  1101,   172,   119,   170,    80,   172,   516,  1114,     6,
-       6,   520,    80,   166,   523,    90,   170,  1122,   172,    80,
-       4,   171,    90,    98,    99,   158,   172,   102,   103,    90,
-      98,    99,  1333,     6,   102,   103,    80,    98,    99,  1145,
-     163,   102,   103,  1148,   168,     4,    90,     6,   170,   170,
-     172,   172,     7,   166,    98,    99,   189,  1379,   102,   103,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,   207,   171,     6,   210,   163,  1184,
-     170,   590,   172,   170,   170,   172,   172,  1188,  1189,  1154,
-       6,   170,  1522,   172,   170,   172,   172,   172,   170,     7,
-     172,   234,     7,   170,   172,   172,   170,   170,   172,   172,
-     619,   172,   170,   622,   172,   624,   625,  1217,   170,     7,
-     172,  1226,   164,   632,   633,  1190,   164,  1192,   172,  1194,
-     170,   170,   172,   172,   170,   164,   172,   646,   170,     7,
-     172,  1206,   164,   652,  1209,  1210,   165,     6,   657,   658,
-     659,   660,     7,  1475,   287,   288,   665,   170,   170,   172,
-     172,   171,     6,   672,   673,   170,   170,   172,   172,   678,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     157,   158,   691,     7,     6,   694,   163,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,   170,   708,
-     172,   710,   163,     6,     6,     4,   715,   716,   717,   718,
-       4,   177,   116,   171,   723,   171,   182,   171,   171,   171,
-     186,   730,   165,   732,   733,   170,   165,   193,   165,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,   170,   170,   170,   170,   163,   165,   170,
-       6,     4,   167,     4,     6,   119,     6,     6,   767,   768,
-       4,     6,   119,   119,  1365,     7,     7,     7,     7,     7,
-       7,     7,   781,   782,   783,   784,   785,   786,     7,   171,
-       4,     6,   791,   168,   793,   172,   172,     6,   167,     7,
-     256,     7,   258,   802,     7,   168,   171,   806,     6,   165,
-       6,   810,   167,     6,  1369,     6,  1371,     7,  1373,     6,
-     164,   820,   821,   822,   823,   824,  1381,   166,   164,  1384,
-     171,     3,     4,     6,   151,   165,     7,     9,    10,    11,
-       7,     7,    14,    15,    16,    17,    18,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,     7,    66,     7,     7,     7,   867,     6,
-     165,     7,    44,    45,    46,   165,     7,   165,    50,    51,
-       7,     7,     6,     4,     4,   171,   164,     6,   171,     7,
-       6,     6,  1487,  1488,     7,     7,     7,     6,     6,   355,
-      64,     6,   358,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,     6,     4,     4,
-       4,   163,   172,  1478,     6,     6,   925,     4,   165,   165,
-      73,     7,   170,     6,     6,   168,     6,     6,     6,   938,
-     165,   165,   398,   164,     6,  1541,   168,     6,   171,     6,
-       5,   171,     4,   171,   171,   171,     6,     6,   171,   131,
-       7,     7,     7,   586,     7,     7,   138,   139,   140,   166,
-     171,   171,     6,     4,  1569,     4,   171,   171,   167,   171,
-     165,     6,   154,   155,  1580,     6,  1582,   159,   987,     6,
-     115,   170,   164,     6,     6,     6,     6,   169,   997,   998,
-       6,     6,     6,     4,  1599,   119,     6,  1603,  1007,  1008,
-       6,     6,     6,     5,   171,   471,   472,   473,     6,     6,
-       6,     6,     6,     6,     6,     6,     6,     6,     6,     6,
-     653,   170,   165,     6,     6,   491,     7,     6,   168,   171,
-       6,   664,   498,     5,    62,     6,  1045,  1046,  1047,     6,
-       6,     6,     6,     6,   171,     6,  1055,  1056,     7,     6,
-     114,   171,     6,     6,  1063,   172,   172,   171,   171,   171,
-     171,     6,  1071,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,   117,     6,   172,
-       6,   163,     6,  1092,  1093,  1094,     6,     6,   177,     6,
-     171,     6,     6,   182,     6,   171,   171,   186,   172,     6,
-      80,   171,     6,     4,   193,     4,   739,   396,     6,     6,
-       6,     6,     6,     6,  1123,     6,     6,     6,   172,     6,
-     171,   171,   171,     6,   171,     6,     6,  1136,     6,     6,
-       6,     6,  1141,   171,   171,   171,     6,   171,   171,  1148,
-       6,     6,     6,  1152,  1153,     6,     6,     6,     6,     6,
-    1159,  1160,     6,     6,     6,  1164,   622,  1005,   624,  1013,
-    1444,     3,     3,  1172,   421,  1126,   632,   633,    -1,    -1,
-      -1,    -1,    -1,  1182,    -1,  1184,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,  1196,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,     6,    -1,  1206,    -1,   665,
-      -1,  1210,    -1,    -1,  1213,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,  1226,    -1,    -1,
-     853,   854,    -1,   856,    -1,   858,   859,    -1,    -1,   862,
-     863,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  1247,  1248,
-      -1,    -1,   708,    -1,   710,    -1,  1255,    -1,    -1,   715,
-     716,   717,   718,    -1,    -1,    -1,    -1,   723,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   355,    -1,    -1,   358,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    1289,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,  1307,   163,
-    1309,    -1,    -1,    -1,    -1,    -1,    -1,   940,   941,   942,
-    1319,    -1,  1321,    -1,    -1,  1324,    -1,   950,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   791,    -1,   793,  1337,    -1,
-      -1,    -1,    -1,  1342,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,    -1,    -1,
-      -1,    -1,   163,  1362,   820,   821,   822,   823,    -1,    -1,
-    1369,    -1,  1371,    -1,  1373,    -1,   999,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,  1383,    -1,    -1,    -1,  1387,    -1,
-      -1,  1014,   471,   472,   473,    -1,    -1,  1020,    -1,  1398,
-    1399,    -1,    -1,  1026,  1403,  1028,  1029,    -1,    -1,    -1,
-    1033,   867,   491,    -1,  1413,  1038,  1039,  1040,  1417,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,  1055,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,  1065,    -1,    -1,  1444,  1069,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,  1455,    12,    13,    -1,
-      -1,    -1,    -1,  1462,    -1,    -1,  1465,    -1,    -1,  1468,
-      -1,    -1,    -1,  1472,    -1,    -1,    -1,  1476,    -1,  1478,
-      -1,    -1,    -1,    -1,  1483,    -1,    -1,  1486,    -1,  1488,
-      -1,    -1,    -1,    -1,    -1,    -1,  1119,    -1,  1121,    -1,
-      -1,    -1,    -1,    58,    59,    60,    61,    62,    63,    64,
+     158,   159,   160,   161,  1317,     6,  1319,   173,   166,     6,
+     471,   472,   473,     6,     6,  1551,  1329,   168,  1331,     6,
+       6,  1334,    80,     6,     6,   175,     7,   174,   171,     6,
+     491,     5,    90,    62,  1347,     6,   175,   498,     6,  1352,
+      98,    99,   100,     6,  1579,   103,   104,   105,   106,     6,
+       6,     6,     6,   175,  1590,     7,  1592,   175,     6,  1372,
+     117,   174,     6,   174,   120,   175,  1379,     6,  1381,   174,
+    1383,   174,   174,     6,  1609,   174,     6,  1613,   175,   174,
+    1393,     6,     6,     6,  1397,    12,    13,     6,     6,     6,
+       6,     6,   175,   174,   174,  1408,  1409,     6,   174,     6,
+    1413,    80,   853,   854,     4,   856,     4,   858,   859,     6,
+    1423,   862,   863,     6,  1427,     6,     6,   175,     6,     6,
+       6,     6,   175,     6,   174,     6,   174,   174,     6,   174,
+       6,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+      67,  1454,    69,     6,     6,     6,    73,    74,     6,    76,
+      77,    78,  1465,     8,   174,    82,     6,     6,   174,  1472,
+     174,   622,  1475,   624,   174,  1478,   174,     6,     6,  1482,
+       6,   632,   633,  1486,     6,  1488,     6,     6,     6,     6,
+    1493,     6,     6,  1496,  1079,  1498,  1008,   114,   115,   116,
+    1454,   396,   943,   944,   945,  1016,     3,     3,   421,    -1,
+    1134,    -1,   953,    -1,   665,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    80,    -1,    -1,  1529,    -1,    -1,    -1,
+      -1,    -1,  1535,    90,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    98,    99,   100,    -1,  1548,   103,   104,   105,   106,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   708,   175,   710,
+       6,  1002,    -1,    -1,   715,   716,   717,   718,    -1,    -1,
+      -1,    -1,   723,    -1,  1577,    -1,  1017,    -1,    -1,    -1,
+      -1,    -1,  1023,    -1,    -1,    -1,    -1,    -1,  1029,    -1,
+    1031,  1032,    -1,    -1,    -1,  1036,    -1,    12,    13,    -1,
+    1041,  1042,  1043,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,  1058,   175,    -1,
+      -1,   166,    -1,    -1,    -1,    -1,    -1,    -1,    12,    13,
+      -1,    -1,  1073,    -1,    -1,    -1,  1077,    -1,    -1,    -1,
+     791,    -1,   793,    58,    59,    60,    61,    62,    63,    64,
       65,    66,    67,    -1,    69,    -1,    -1,    -1,    73,    74,
-    1519,    76,    77,    78,    -1,    -1,  1525,    82,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  1538,
-      -1,    12,    13,   622,    -1,   624,    -1,    -1,    -1,    -1,
-      -1,    -1,  1175,  1176,  1177,  1178,   111,   112,   113,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  1567,    -1,
+      -1,    76,    77,    78,    -1,    -1,    -1,    82,    -1,   820,
+     821,   822,   823,    -1,    58,    59,    60,    61,    62,    63,
+      64,    65,    66,    67,    -1,    69,  1127,    -1,  1129,    73,
+      74,    -1,    76,    77,    78,    -1,    -1,    -1,    82,   114,
+     115,   116,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,   867,    -1,    12,    13,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    80,    -1,
+     114,   115,   116,    -1,    -1,    -1,    -1,    -1,    90,    -1,
+      -1,    -1,  1183,  1184,  1185,  1186,    98,    99,   100,  1334,
+      -1,   103,   104,   105,   106,    -1,    -1,    -1,    -1,    -1,
+     175,    -1,    -1,    -1,    58,    59,    60,    61,    62,    63,
+      64,    65,    66,    67,    -1,    69,    -1,  1218,    -1,    73,
+      74,    -1,    76,    77,    78,    -1,    -1,  1372,    82,  1230,
+       6,   175,    -1,    -1,    -1,    -1,  1237,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,  1393,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,  1259,    -1,
+     114,   115,   116,   175,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,     3,     4,    -1,    -1,  1280,
+      -1,     9,    10,    11,    -1,    -1,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    32,    33,    34,    35,    -1,    -1,
+      -1,    -1,    -1,  1314,    -1,    -1,    44,    45,    46,    -1,
+      -1,   175,    50,    51,    -1,    -1,    -1,    -1,    -1,    -1,
+      58,    -1,    -1,    61,    -1,    -1,    64,    -1,    66,    -1,
+      -1,  1486,    -1,  1488,    -1,    -1,    -1,    -1,    -1,    77,
+    1351,    -1,    -1,    -1,    -1,    -1,    84,    85,    86,    87,
+      88,    -1,    -1,    -1,    92,    -1,    -1,    95,  1079,    -1,
+    1371,    -1,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,  1388,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,  1548,    -1,    -1,   134,     6,    -1,    -1,
+      -1,    -1,    -1,   141,   142,   143,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,   157,
+     158,    -1,   166,    -1,   162,    -1,    -1,    -1,  1439,   167,
+      -1,    -1,    -1,    -1,   172,    -1,   174,   175,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,    -1,
+      -1,    -1,     9,    10,    11,    -1,    -1,    14,    15,    16,
+      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,     6,
+      -1,    -1,    -1,    -1,  1495,    -1,  1497,    44,    45,    46,
+      -1,    -1,    -1,    50,    51,  1216,    -1,    -1,    -1,  1220,
+      -1,    58,    -1,    -1,    61,    -1,    -1,    64,    -1,    66,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,  1208,   665,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,  1220,    69,    -1,
-      -1,    -1,    73,    74,  1227,    76,    77,    78,    -1,    -1,
-      -1,    82,    -1,    -1,    -1,  1071,    -1,   172,     6,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,  1249,    -1,    -1,   708,
-      -1,   710,    -1,    -1,    -1,    -1,   715,   716,   717,   718,
-     111,   112,   113,    -1,   723,    -1,    -1,  1270,     3,     4,
-       5,    -1,    -1,    -1,     9,    10,    11,    -1,    -1,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,  1304,    -1,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    -1,    -1,    49,    50,    51,    -1,    -1,    -1,
-      -1,   172,    -1,    58,    -1,    -1,    61,    -1,    -1,    64,
-      -1,    66,   791,    -1,   793,    -1,    -1,    -1,  1341,    -1,
-      -1,    -1,    77,    -1,    -1,    -1,    -1,    -1,    -1,    84,
-      85,    86,    87,    88,    -1,    -1,    -1,    92,  1361,    -1,
-      95,   820,   821,   822,   823,    -1,    -1,    -1,    -1,    -1,
-    1206,    -1,    -1,    -1,  1210,  1378,    -1,   145,   146,   147,
-     148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,   131,   132,   133,    -1,
-      -1,    -1,    -1,   138,   139,   140,    -1,    -1,   867,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   154,
-     155,    -1,    -1,    -1,   159,    -1,  1429,    -1,    -1,   164,
-      -1,    -1,    -1,    -1,   169,    -1,   171,    -1,     3,     4,
-      -1,    -1,    -1,    -1,     9,    10,    11,    -1,    -1,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      -1,    -1,    -1,  1309,    -1,    -1,    -1,    -1,    -1,    44,
-      45,    46,  1485,    -1,  1487,    50,    51,    -1,  1324,    -1,
-      -1,    -1,     3,     4,     5,    -1,     7,    -1,     9,    10,
-      11,    -1,    -1,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,     6,    -1,  1362,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    -1,    -1,    49,    50,
-      51,    -1,    -1,    -1,    -1,    -1,    -1,  1383,    -1,    -1,
+      77,    -1,    -1,    -1,    -1,    -1,    -1,    84,    85,    86,
+      87,    88,    -1,    -1,    -1,    92,    -1,    -1,    95,   148,
+     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
+     159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,
+      -1,    -1,    -1,    -1,  1575,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   134,    -1,    -1,
+      -1,    -1,    -1,    -1,   141,   142,   143,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  1319,    -1,
+     157,   158,    -1,    -1,    -1,   162,    -1,    -1,    -1,    -1,
+     167,    -1,    -1,  1334,    -1,   172,    -1,    -1,   175,    -1,
+      -1,   148,   149,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,    -1,     6,    -1,    -1,   166,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,  1565,    -1,    -1,    -1,   131,    -1,    -1,    -1,
-      -1,    -1,    -1,   138,   139,   140,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   154,
-     155,    -1,    -1,    -1,   159,    -1,    -1,    -1,    -1,   164,
-      -1,    -1,   167,    -1,   169,    -1,   171,    -1,    -1,    -1,
-      -1,    -1,  1071,    -1,   125,    -1,    -1,    -1,    -1,    -1,
-     131,   132,   133,    -1,    -1,    -1,    -1,   138,   139,   140,
-     141,   142,   143,   144,    -1,    -1,    -1,    -1,    -1,    -1,
-    1476,    -1,  1478,   154,   155,    -1,     6,    -1,   159,    -1,
-     161,   162,    -1,   164,    -1,   166,    -1,   168,   169,    -1,
-     171,    -1,    -1,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,  1519,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,  1372,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,     3,     4,     5,    -1,    -1,    -1,     9,    10,
-      11,    -1,  1538,    14,    15,    16,    17,    18,    19,    20,
+      11,    -1,  1393,    14,    15,    16,    17,    18,    19,    20,
       21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    44,    45,    46,    -1,    -1,    -1,    50,
+      31,    32,    33,    34,    35,    -1,    -1,    38,    39,    40,
+      41,    42,    43,    44,    45,    46,    -1,    -1,    49,    50,
       51,    -1,    -1,    -1,    -1,    -1,    -1,    58,    -1,    -1,
       61,    -1,    -1,    64,    -1,    66,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    77,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,     6,    77,    -1,    -1,    -1,
       -1,    -1,    -1,    84,    85,    86,    87,    88,    -1,    -1,
-      -1,    92,    -1,    -1,    95,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-     131,    -1,    -1,   163,    -1,    -1,    -1,   138,   139,   140,
-     170,    -1,   172,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   154,   155,    -1,    -1,    -1,   159,    -1,
-      -1,    -1,    -1,   164,    -1,    -1,    -1,    -1,   169,    -1,
-     171,    -1,    -1,    -1,    -1,  1324,    -1,    -1,    -1,    -1,
+      -1,    92,    -1,    -1,    95,     6,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,  1486,    -1,  1488,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,   134,   135,   136,   166,    -1,    -1,    -1,
+     141,   142,   143,    -1,    -1,    -1,    -1,    -1,  1529,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   157,   158,    -1,    -1,
+      -1,   162,    -1,    -1,    -1,    -1,   167,  1548,     3,     4,
+       5,   172,     7,   174,     9,    10,    11,    -1,    -1,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      -1,    -1,    -1,    38,    39,    40,    41,    42,    43,    44,
+      45,    46,    12,    13,    49,    50,    51,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,    -1,    -1,    -1,    -1,   166,    -1,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,    -1,    69,
+      -1,    -1,    -1,    73,    74,    -1,    76,    77,    78,    -1,
+      -1,    -1,    82,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   128,    -1,    -1,    -1,    -1,    -1,   134,
+     135,   136,    -1,    -1,    -1,    -1,   141,   142,   143,   144,
+     145,   146,   147,    -1,   114,   115,   116,    -1,    -1,    -1,
+      -1,    -1,   157,   158,    -1,    -1,    -1,   162,    -1,   164,
+     165,    -1,   167,    -1,   169,    -1,   171,   172,    -1,   174,
        3,     4,     5,    -1,    -1,    -1,     9,    10,    11,    -1,
       -1,    14,    15,    16,    17,    18,    19,    20,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      33,    34,    35,  1362,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    44,    45,    46,    -1,    -1,    -1,    50,    51,    -1,
-      -1,    -1,    -1,    -1,  1383,    58,    -1,    -1,    61,    12,
-      13,    64,    -1,    66,    -1,    -1,    -1,    -1,    -1,    -1,
+      33,    34,    35,    -1,    -1,   175,    -1,    -1,    -1,    -1,
+      -1,    44,    45,    46,    -1,    -1,    -1,    50,    51,    12,
+      13,    -1,    -1,    -1,    -1,    58,    -1,    -1,    61,    -1,
+      -1,    64,    -1,    66,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    77,    -1,    -1,    -1,    -1,    -1,
       -1,    84,    85,    86,    87,    88,    -1,    -1,    -1,    92,
-      -1,    -1,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    58,    59,    60,    61,    62,
+      -1,    -1,    95,    -1,    -1,    58,    59,    60,    61,    62,
       63,    64,    65,    66,    67,    -1,    69,    -1,    -1,    -1,
-      73,    74,    -1,    76,    77,    78,    -1,    -1,   131,    82,
-      -1,    -1,    -1,    -1,    -1,   138,   139,   140,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,  1476,    -1,  1478,
-      -1,   154,   155,    -1,    -1,    -1,   159,    -1,   111,   112,
-     113,   164,    -1,     3,     4,    -1,   169,    -1,   171,     9,
-      10,    11,    -1,    -1,    14,    15,    16,    17,    18,    19,
-      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
-      30,    31,    32,    33,    34,    35,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    44,    45,    46,    -1,    -1,  1538,
-      50,    51,    12,    13,    -1,    -1,    -1,    -1,    58,   172,
-      -1,    61,    -1,    -1,    64,    -1,    66,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,    -1,    -1,
-      -1,    -1,    -1,    -1,    84,    85,    86,    87,    88,    -1,
-      -1,    -1,    92,    -1,    -1,    95,    -1,    -1,    58,    59,
-      60,    61,    62,    63,    64,    65,    66,    67,    -1,    69,
-      -1,    -1,    -1,    73,    74,    -1,    76,    77,    78,    -1,
-      -1,    -1,    82,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   131,    -1,    -1,    -1,    -1,    -1,    -1,   138,   139,
-     140,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   111,   112,   113,   154,   155,    -1,    -1,    -1,   159,
-      -1,    -1,    -1,    -1,   164,    -1,     3,     4,    -1,   169,
-      -1,   171,     9,    10,    11,    -1,    -1,    14,    15,    16,
+      73,    74,    -1,    76,    77,    78,    -1,    -1,    -1,    82,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   134,    -1,    -1,    -1,    -1,    -1,    -1,   141,   142,
+     143,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   114,   115,   116,   157,   158,    -1,    -1,    -1,   162,
+      -1,    -1,    -1,    -1,   167,    -1,     3,     4,     5,   172,
+      -1,   174,     9,    10,    11,    -1,    -1,    14,    15,    16,
       17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
       27,    28,    29,    30,    31,    32,    33,    34,    35,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    44,    45,    46,
-      -1,    -1,   172,    50,    51,    12,    13,    -1,    -1,    -1,
+      -1,    -1,   175,    50,    51,    12,    13,    -1,    -1,    -1,
       -1,    58,    -1,    -1,    61,    -1,    -1,    64,    -1,    66,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       77,    -1,    -1,    -1,    -1,    -1,    -1,    84,    85,    86,
@@ -2921,696 +2932,739 @@ static const yytype_int16 yycheck[] =
       -1,    58,    59,    60,    61,    62,    63,    64,    65,    66,
       67,    -1,    69,    -1,    -1,    -1,    73,    74,    -1,    76,
       77,    78,    -1,    -1,    -1,    82,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   131,    -1,    -1,    -1,    -1,    -1,
-      -1,   138,   139,   140,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   111,   112,   113,   154,   155,    -1,
-      -1,    -1,   159,    -1,    -1,    -1,    -1,   164,    -1,     3,
-       4,    -1,   169,    -1,   171,     9,    10,    11,    -1,    -1,
-      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      44,    45,    46,    -1,    -1,   172,    50,    51,    12,    13,
-      -1,    -1,    -1,    -1,    58,    -1,    -1,    61,    -1,    -1,
-      64,    -1,    66,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    77,    -1,    -1,    -1,    -1,    -1,    -1,
-      84,    85,    86,    87,    88,    -1,    -1,    -1,    92,    -1,
-      -1,    95,    -1,    -1,    58,    59,    60,    61,    62,    63,
-      64,    65,    66,    67,    -1,    69,    -1,    -1,    -1,    73,
-      74,    -1,    76,    77,    78,    -1,    -1,    -1,    82,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,    -1,
-      -1,    -1,    -1,    -1,   138,   139,   140,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,   112,   113,
-     154,   155,    -1,    -1,    -1,   159,    -1,    -1,    -1,    -1,
-     164,    -1,     3,     4,    -1,   169,    -1,   171,     9,    10,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   134,    -1,    -1,
+      -1,    -1,    -1,    -1,   141,   142,   143,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   114,   115,   116,
+     157,   158,    -1,    -1,    -1,   162,    -1,    -1,    -1,    -1,
+     167,    -1,     3,     4,    -1,   172,    -1,   174,     9,    10,
       11,    -1,    -1,    14,    15,    16,    17,    18,    19,    20,
       21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
       31,    32,    33,    34,    35,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    44,    45,    46,    -1,    -1,   172,    50,
+      -1,    -1,    -1,    44,    45,    46,    -1,    -1,   175,    50,
       51,    12,    13,    -1,    -1,    -1,    -1,    58,    -1,    -1,
       61,    -1,    -1,    64,    -1,    66,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    77,    -1,    -1,    -1,
       -1,    -1,    -1,    84,    85,    86,    87,    88,    -1,    -1,
       -1,    92,    -1,    -1,    95,    -1,    -1,    58,    59,    60,
       61,    62,    63,    64,    65,    66,    67,    -1,    69,    -1,
-      -1,    -1,    73,    74,    -1,    76,    77,    78,    -1,     6,
+      -1,    -1,    73,    74,    -1,    76,    77,    78,    -1,    -1,
       -1,    82,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     131,    -1,    -1,    -1,    -1,    -1,    -1,   138,   139,   140,
-       6,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     111,   112,   113,   154,   155,    -1,    -1,    -1,   159,    -1,
-      -1,    -1,    -1,   164,    -1,     3,     4,    -1,   169,    -1,
-     171,     9,    10,    11,    -1,    -1,    14,    15,    16,    17,
-      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    44,    45,    46,    -1,
-      -1,   172,    50,    51,    -1,    -1,    -1,    -1,    -1,    -1,
-      58,    -1,    -1,    61,    -1,    -1,    64,    -1,    66,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,
-      -1,    -1,    -1,    -1,    -1,    -1,    84,    85,    86,    87,
-      88,    -1,    -1,    -1,    92,    -1,    -1,    95,   145,   146,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,   131,     6,    -1,    -1,   163,    -1,    -1,
-     138,   139,   140,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   154,   155,    -1,    -1,
-      -1,   159,    -1,    -1,    -1,    -1,   164,    -1,     3,     4,
-       5,   169,    -1,   171,     9,    10,    11,    -1,    -1,    14,
+      -1,    -1,    -1,   134,    -1,    -1,    -1,    -1,    -1,    -1,
+     141,   142,   143,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   114,   115,   116,   157,   158,    -1,    -1,
+      -1,   162,    -1,    -1,    -1,    -1,   167,    -1,     3,     4,
+      -1,   172,    -1,   174,     9,    10,    11,    -1,    -1,    14,
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      -1,    -1,    -1,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    -1,    -1,    49,    50,    51,     3,     4,     5,
-      -1,    -1,    -1,     9,    10,    11,    -1,    -1,    14,    15,
-      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
-      26,    27,    28,    29,    30,    31,    32,    33,    34,    -1,
-      -1,    -1,    38,    39,    40,    41,    42,    43,    44,    45,
-      46,    12,    13,    49,    50,    51,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,    -1,    -1,    -1,   131,   132,   133,    -1,
-      -1,    -1,    -1,   138,   139,   140,    -1,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,    -1,    69,   154,
-     155,    -1,    73,    74,   159,    76,    77,    78,    -1,   164,
-      -1,    82,    -1,    -1,   169,    -1,   171,     6,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   131,   132,   133,    -1,    -1,
-      -1,    -1,   138,   139,   140,    -1,    -1,    -1,    -1,    -1,
-     111,   112,   113,    -1,    -1,    -1,    -1,    -1,   154,   155,
-      -1,    -1,    -1,   159,    -1,    -1,    -1,    -1,   164,    -1,
-       3,     4,     5,   169,    -1,   171,     9,    10,    11,    -1,
-      -1,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      33,    34,    -1,    -1,    -1,    38,    39,    40,    41,    42,
-      43,    44,    45,    46,     3,     4,    49,    50,    51,    -1,
+      35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    44,
+      45,    46,    -1,    -1,   175,    50,    51,    12,    13,    -1,
+      -1,    -1,    -1,    58,    -1,    -1,    61,    -1,    -1,    64,
+      -1,    66,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    77,    -1,    -1,    -1,    -1,    -1,    -1,    84,
+      85,    86,    87,    88,    -1,    -1,    -1,    92,    -1,    -1,
+      95,    -1,    -1,    58,    59,    60,    61,    62,    63,    64,
+      65,    66,    67,    -1,    69,    -1,    -1,    -1,    73,    74,
+      -1,    76,    77,    78,    -1,     6,    -1,    82,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   134,
+      -1,    -1,    -1,    -1,     6,    -1,   141,   142,   143,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   114,
+     115,   116,   157,   158,    -1,    -1,    -1,   162,    -1,    -1,
+      -1,    -1,   167,    -1,     3,     4,    -1,   172,    -1,   174,
        9,    10,    11,    -1,    -1,    14,    15,    16,    17,    18,
       19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
-      29,    30,    31,    32,    33,    34,    -1,    -1,    -1,    -1,
+      29,    30,    31,    32,    33,    34,    35,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    44,    45,    46,    -1,    -1,
-      -1,    50,    51,    12,    13,    -1,   145,   146,   147,   148,
-     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-      -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   131,   132,
-     133,    -1,    -1,    -1,    -1,   138,   139,   140,    -1,    58,
-      59,    60,    61,    62,    63,    64,    65,    66,    67,    -1,
-      69,   154,   155,    -1,    73,    74,   159,    76,    77,    78,
-      -1,   164,    -1,    82,    -1,    -1,   169,    -1,   171,     6,
-      -1,    -1,   131,    -1,    -1,    -1,    -1,    -1,    -1,   138,
-     139,   140,    -1,    -1,    -1,    -1,    -1,    -1,     6,    -1,
-      -1,    -1,   111,   112,   113,   154,   155,    -1,    -1,    -1,
-     159,    -1,    -1,    -1,    -1,   164,    -1,    -1,   167,    -1,
-     169,    -1,   171,     3,     4,    -1,    -1,    -1,    -1,     9,
-      10,    11,    -1,    -1,    14,    15,    16,    17,    18,    19,
-      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
-      30,    31,    32,    33,    34,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   172,    44,    45,    46,     3,     4,    -1,
-      50,    51,    -1,     9,    10,    11,    -1,    -1,    14,    15,
-      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
-      26,    27,    28,    29,    30,    31,    32,    33,    34,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    44,    45,
-      46,    -1,    -1,    -1,    50,    51,    12,    13,   145,   146,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     157,   158,    -1,    -1,    -1,    -1,   163,   145,   146,   147,
-     148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,   131,    -1,    -1,    -1,   163,    -1,    -1,   138,   139,
-     140,    -1,    58,    59,    60,    61,    62,    63,    64,    65,
-      66,    67,    -1,    69,   154,   155,    -1,    73,    74,   159,
-      76,    77,    78,    -1,   164,    -1,    82,     7,     8,   169,
-      -1,   171,    -1,    -1,    -1,   131,    -1,    -1,    -1,    -1,
-      -1,    -1,   138,   139,   140,    -1,     7,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   111,   112,   113,   154,   155,
-      -1,    -1,    -1,   159,    -1,    -1,    -1,    -1,   164,    -1,
-       3,     4,    -1,   169,    -1,   171,     9,    10,    11,    -1,
+     175,    50,    51,    -1,    -1,    -1,    -1,    -1,    -1,    58,
+      -1,    -1,    61,    -1,    -1,    64,    -1,    66,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,    -1,
+      -1,    -1,    -1,    -1,    -1,    84,    85,    86,    87,    88,
+      -1,    -1,    -1,    92,    -1,    -1,    95,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,    -1,    -1,    -1,    -1,   166,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+       6,    -1,    -1,    -1,   166,   134,    -1,    -1,    -1,    -1,
+      -1,    -1,   141,   142,   143,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   157,   158,
+      -1,    -1,    -1,   162,    -1,    -1,    -1,    -1,   167,    -1,
+       3,     4,    -1,   172,    -1,   174,     9,    10,    11,    -1,
       -1,    14,    15,    16,    17,    18,    19,    20,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    44,    45,    46,    -1,    -1,   172,    50,    51,    -1,
+      -1,    44,    45,    46,    -1,    -1,    -1,    50,    51,    -1,
       -1,    -1,    -1,    -1,    -1,    58,    -1,    -1,    61,    -1,
-      -1,    64,    -1,    66,    -1,    -1,    -1,    -1,    -1,     8,
+      -1,    64,    -1,    66,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    77,    -1,    -1,    -1,    -1,    -1,
-      -1,    84,    85,    86,    87,    88,    -1,    -1,     8,    92,
-      -1,    -1,    95,    -1,    -1,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,     8,
-      -1,    -1,    -1,   163,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,   131,     8,
-      -1,    -1,   163,    -1,    -1,   138,   139,   140,    -1,    -1,
+      -1,    84,    85,    86,    87,    88,    -1,    -1,    -1,    92,
+      -1,    -1,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,     6,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   134,    -1,    -1,    -1,    -1,     6,    -1,   141,   142,
+     143,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   157,   158,    -1,    -1,    -1,   162,
+      -1,    -1,    -1,    -1,   167,    -1,     3,     4,    -1,   172,
+      -1,   174,     9,    10,    11,    -1,    -1,    14,    15,    16,
+      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    44,    45,    46,
+      -1,    -1,    -1,    50,    51,    -1,    -1,    -1,    -1,    -1,
+      -1,    58,    -1,    -1,    61,    -1,    -1,    64,    -1,    66,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      77,    -1,    -1,    -1,    -1,    -1,    -1,    84,    85,    86,
+      87,    88,    -1,    -1,    -1,    92,    -1,    -1,    95,   148,
+     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
+     159,   160,   161,    -1,    -1,    -1,    -1,   166,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,     8,    -1,    -1,    -1,   166,   134,    -1,    -1,
+      -1,    -1,    -1,    -1,   141,   142,   143,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   154,   155,    -1,    -1,    -1,   159,     3,     4,     5,
-      -1,   164,    -1,     9,    10,    11,   169,    -1,    14,    15,
+     157,   158,    -1,    -1,    -1,   162,    -1,    -1,    -1,    -1,
+     167,    -1,     3,     4,     5,   172,    -1,   174,     9,    10,
+      11,    -1,    -1,    14,    15,    16,    17,    18,    19,    20,
+      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
+      31,    32,    33,    34,    -1,    -1,    -1,    38,    39,    40,
+      41,    42,    43,    44,    45,    46,    -1,    -1,    49,    50,
+      51,     3,     4,     5,    -1,    -1,    -1,     9,    10,    11,
+      -1,    -1,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    33,    34,    -1,    -1,    -1,    38,    39,    40,    41,
+      42,    43,    44,    45,    46,    -1,    -1,    49,    50,    51,
+      -1,    -1,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   134,   135,   136,    -1,    -1,    -1,    -1,
+     141,   142,   143,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   157,   158,    -1,    -1,
+      -1,   162,    -1,    -1,    -1,    -1,   167,    -1,    -1,    -1,
+      -1,   172,    -1,   174,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   134,   135,   136,    -1,    -1,    -1,    -1,   141,
+     142,   143,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   157,   158,    -1,    -1,    -1,
+     162,    -1,    -1,    -1,    -1,   167,    -1,     3,     4,     5,
+     172,    -1,   174,     9,    10,    11,    -1,    -1,    14,    15,
       16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
       26,    27,    28,    29,    30,    31,    32,    33,    34,    -1,
       -1,    -1,    38,    39,    40,    41,    42,    43,    44,    45,
-      46,    -1,    -1,    49,    50,    51,   145,   146,   147,   148,
-     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-      -1,    -1,    -1,    -1,   163,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,   145,   146,   147,   148,
-     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-      -1,    -1,    -1,    -1,   163,    -1,   145,   146,   147,   148,
-     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-      -1,    -1,    -1,    -1,   163,   131,   132,   133,    -1,    -1,
-      -1,    -1,   138,   139,   140,    -1,    -1,    -1,     0,     1,
-      -1,    -1,     4,    -1,    -1,    -1,    -1,    -1,   154,   155,
-      12,    13,    -1,   159,    -1,    -1,    -1,    -1,   164,    -1,
-      -1,    -1,    -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    36,    37,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    47,    48,    -1,    -1,    -1,
-      52,    53,    54,    -1,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    -1,    69,    70,    71,
-      72,    73,    74,    75,    76,    77,    78,    79,    -1,    81,
-      82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
-      92,    93,    94,    95,    96,    97,    -1,     4,   100,   101,
-      -1,    -1,    -1,   105,    -1,    12,    13,    -1,   110,   111,
-     112,   113,    -1,    -1,   116,    -1,   118,    -1,   120,   121,
-     122,   123,   124,   125,   126,   127,   128,   129,   130,    36,
-      37,    -1,   134,   135,   136,   137,    -1,    -1,    -1,    -1,
-      47,    48,    -1,    -1,    -1,    52,    53,    54,    -1,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
-      67,    -1,    69,    70,    71,    72,    73,    74,    75,    76,
-      77,    78,    79,    -1,    81,    82,    83,    84,    85,    86,
-      87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
-      97,    -1,    -1,   100,   101,    -1,    -1,    -1,   105,    -1,
-      -1,    -1,    -1,   110,   111,   112,   113,    -1,    -1,   116,
-      -1,   118,    -1,   120,   121,   122,   123,   124,   125,   126,
-     127,   128,   129,   130,    -1,    -1,    -1,   134,   135,   136,
-     137,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,    -1,    -1,    -1,    -1,    -1,   170,    -1,   172,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,
-      -1,    -1,    -1,    -1,   170,    -1,   172,   145,   146,   147,
+      46,     3,     4,    49,    50,    51,    -1,     9,    10,    11,
+      -1,    -1,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    33,    34,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    44,    45,    46,    -1,    -1,    -1,    50,    51,
+      -1,     3,     4,    -1,    -1,    -1,    -1,     9,    10,    11,
+      -1,    -1,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    33,    34,    -1,    -1,    -1,    -1,    -1,   134,   135,
+     136,    -1,    44,    45,    46,   141,   142,   143,    50,    51,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   157,   158,    -1,    -1,    -1,   162,    -1,    -1,    -1,
+      -1,   167,    -1,    -1,    -1,    -1,   172,    -1,   174,    -1,
+      -1,    -1,   134,    -1,    -1,    -1,    -1,    -1,    -1,   141,
+     142,   143,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   157,   158,    -1,    -1,    -1,
+     162,    -1,    -1,    -1,    -1,   167,    -1,    -1,   170,    -1,
+     172,    -1,   174,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   134,    -1,    -1,    -1,    -1,    -1,    -1,   141,
+     142,   143,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   157,   158,    -1,    -1,    -1,
+     162,    -1,    -1,    -1,    -1,   167,    -1,     3,     4,    -1,
+     172,    -1,   174,     9,    10,    11,    -1,    -1,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    32,    33,    34,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    44,    45,
+      46,     3,     4,    -1,    50,    51,    -1,     9,    10,    11,
+      -1,    -1,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    33,    34,    35,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    44,    45,    46,    -1,    -1,    -1,    50,    51,
+      -1,    -1,    -1,    -1,    -1,    -1,    58,    -1,    -1,    61,
+      -1,    -1,    64,    -1,    66,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    77,    -1,    -1,    -1,    -1,
+      -1,    -1,    84,    85,    86,    87,    88,    -1,   134,    -1,
+      92,    -1,    -1,    95,    -1,   141,   142,   143,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   157,   158,    -1,     8,    -1,   162,    -1,    -1,    -1,
+      -1,   167,    -1,    -1,    -1,    -1,   172,    -1,   174,    -1,
+      -1,    -1,   134,     8,    -1,    -1,    -1,    -1,    -1,   141,
+     142,   143,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   157,   158,    -1,    -1,    -1,
+     162,     3,     4,     5,    -1,   167,    -1,     9,    10,    11,
+     172,    -1,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    33,    34,    -1,    -1,    -1,    38,    39,    40,    41,
+      42,    43,    44,    45,    46,     3,     4,    49,    50,    51,
+      -1,     9,    10,    11,    -1,    -1,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    32,    33,    34,     8,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    44,    45,    46,    -1,
+      -1,    -1,    50,    51,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,     8,    -1,
+      -1,    -1,   166,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,    -1,    -1,    -1,
+      -1,   166,   134,   135,   136,    -1,    -1,    -1,    -1,   141,
+     142,   143,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   157,   158,    -1,    -1,    -1,
+     162,    -1,    -1,    -1,    -1,   167,    -1,    -1,    -1,    -1,
+     172,    -1,    -1,    -1,    -1,    -1,   134,    -1,    -1,    -1,
+      -1,    -1,    -1,   141,   142,   143,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   157,
+     158,    -1,    -1,    -1,   162,    -1,    -1,    -1,    -1,   167,
+      -1,    -1,    -1,    -1,   172,    -1,    -1,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,    -1,     0,     1,    -1,   166,     4,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    12,    13,    -1,    -1,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    36,    37,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    47,
+      48,    -1,    -1,    -1,    52,    53,    54,    -1,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      -1,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    79,    -1,    81,    82,    83,    84,    85,    86,    87,
+      88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
+      -1,    -1,    -1,   101,   102,     4,    -1,    -1,    -1,    -1,
+     108,    -1,    -1,    12,    13,   113,   114,   115,   116,    -1,
+      -1,   119,    -1,   121,    -1,   123,   124,   125,   126,   127,
+     128,   129,   130,   131,   132,   133,    -1,    36,    37,   137,
+     138,   139,   140,    -1,    -1,    -1,    -1,    -1,    47,    48,
+      -1,    -1,    -1,    52,    53,    54,    -1,    56,    57,    58,
+      59,    60,    61,    62,    63,    64,    65,    66,    67,    -1,
+      69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
+      79,    -1,    81,    82,    83,    84,    85,    86,    87,    88,
+      89,    90,    91,    92,    93,    94,    95,    96,    97,    12,
+      13,    -1,   101,   102,    80,    -1,    -1,    -1,    -1,   108,
+      -1,    -1,    -1,    -1,   113,   114,   115,   116,    -1,    -1,
+     119,    -1,   121,    -1,   123,   124,   125,   126,   127,   128,
+     129,   130,   131,   132,   133,    -1,    -1,    -1,   137,   138,
+     139,   140,    -1,    -1,    -1,    58,    59,    60,    61,    62,
+      63,    64,    65,    66,    67,    -1,    69,    -1,    -1,    -1,
+      73,    74,    -1,    76,    77,    78,    -1,    -1,    -1,    82,
+      -1,    -1,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   114,   115,   116,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,    -1,   173,
+      -1,   175,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,   173,    -1,   175,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   172,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   172,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     172,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   172,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   172,   145,   146,   147,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+      -1,    -1,    -1,    -1,    -1,   173,    -1,   175,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   175,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   175,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   175,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   175,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   172,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   172,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     172,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   172,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   172,   145,   146,   147,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   175,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   175,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   175,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   175,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   175,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   172,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   172,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     172,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   172,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   172,   145,   146,   147,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   175,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   175,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   175,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   175,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   175,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   172,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   172,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     172,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   172,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   172,   145,   146,   147,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   175,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   175,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   175,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   175,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   175,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   172,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   172,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     172,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   172,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   172,   145,   146,   147,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   175,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   175,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   175,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   175,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   175,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   172,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   171,   145,   146,   147,   148,   149,   150,   151,   152,
-     153,   154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,
-     163,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   171,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,   165,
-      -1,    -1,    -1,    -1,   170,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,
-     170,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,    -1,    -1,    -1,    -1,    -1,   170,   145,   146,   147,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   175,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   175,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   174,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,    -1,    -1,    -1,
+      -1,   166,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   174,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,
-      -1,    -1,   170,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,   170,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,
-      -1,    -1,    -1,    -1,   170,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,
-     170,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,    -1,    -1,    -1,    -1,    -1,   170,   145,   146,   147,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+     168,    -1,    -1,    -1,    -1,   173,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,
+      -1,   173,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,   173,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,
+      -1,    -1,    -1,   173,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,    -1,   173,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,
-      -1,    -1,   170,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,   170,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,
-      -1,    -1,    -1,    -1,   170,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,
-     170,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,    -1,    -1,    -1,    -1,    -1,   170,   145,   146,   147,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+      -1,    -1,    -1,    -1,    -1,   173,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,
+      -1,   173,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,   173,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,
+      -1,    -1,    -1,   173,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,    -1,   173,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,
-      -1,    -1,   170,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,   170,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,
-      -1,    -1,    -1,    -1,   170,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,
-     170,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,    -1,    -1,    -1,    -1,    -1,   170,   145,   146,   147,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+      -1,    -1,    -1,    -1,    -1,   173,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,
+      -1,   173,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,   173,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,
+      -1,    -1,    -1,   173,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,    -1,   173,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,
-      -1,    -1,   170,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,   170,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,
-      -1,    -1,    -1,    -1,   170,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,
-     170,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,    -1,    -1,    -1,    -1,    -1,   170,   145,   146,   147,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+      -1,    -1,    -1,    -1,    -1,   173,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,
+      -1,   173,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,   173,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,
+      -1,    -1,    -1,   173,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,    -1,   173,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,
-      -1,    -1,   170,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,   170,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,
-      -1,    -1,    -1,    -1,   170,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,    -1,    -1,
-     170,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,    -1,    -1,    -1,    -1,    -1,   170,   145,   146,   147,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+      -1,    -1,    -1,    -1,    -1,   173,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,
+      -1,   173,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,   173,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,
+      -1,    -1,    -1,   173,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,    -1,   173,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,
-      -1,    -1,   170,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,    -1,    -1,   167,   145,   146,   147,   148,
-     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-      -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,   167,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,
-      -1,   167,   145,   146,   147,   148,   149,   150,   151,   152,
-     153,   154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,
-     163,    -1,    -1,    -1,   167,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,    -1,   167,   145,   146,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,
-     167,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,    -1,    -1,   167,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,    -1,    -1,
-      -1,    -1,   163,    -1,    -1,    -1,   167,   145,   146,   147,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+      -1,    -1,    -1,    -1,    -1,   173,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,    -1,    -1,
+      -1,   173,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,    -1,    -1,    -1,   173,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,
+      -1,    -1,    -1,   173,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,   170,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,   170,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,   167,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,
-      -1,    -1,   167,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,    -1,    -1,   167,   145,   146,   147,   148,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+      -1,    -1,   170,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,    -1,    -1,    -1,
+      -1,   166,    -1,    -1,    -1,   170,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,   170,   148,
      149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-      -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,   167,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,
-      -1,   167,   145,   146,   147,   148,   149,   150,   151,   152,
-     153,   154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,
-     163,    -1,    -1,    -1,   167,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,    -1,   167,   145,   146,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,
-     167,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,    -1,    -1,   167,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,    -1,    -1,
-      -1,    -1,   163,    -1,    -1,    -1,   167,   145,   146,   147,
+     159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,
+      -1,   170,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,   170,   148,   149,   150,   151,   152,
+     153,   154,   155,   156,   157,   158,   159,   160,   161,    -1,
+      -1,    -1,    -1,   166,    -1,    -1,    -1,   170,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,
+     170,   148,   149,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,
+      -1,    -1,    -1,   170,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,   170,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,   170,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,   167,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,
-      -1,    -1,   167,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,    -1,    -1,   167,   145,   146,   147,   148,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+      -1,    -1,   170,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,    -1,    -1,    -1,
+      -1,   166,    -1,    -1,    -1,   170,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,   170,   148,
      149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-      -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,   167,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,
-      -1,   167,   145,   146,   147,   148,   149,   150,   151,   152,
-     153,   154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,
-     163,    -1,    -1,    -1,   167,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,    -1,    -1,   167,   145,   146,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,
-     167,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,    -1,    -1,   167,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,    -1,    -1,
-      -1,    -1,   163,    -1,    -1,    -1,   167,   145,   146,   147,
+     159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,
+      -1,   170,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,   170,   148,   149,   150,   151,   152,
+     153,   154,   155,   156,   157,   158,   159,   160,   161,    -1,
+      -1,    -1,    -1,   166,    -1,    -1,    -1,   170,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,
+     170,   148,   149,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,
+      -1,    -1,    -1,   170,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,   170,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,   170,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,   167,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,
-      -1,    -1,   167,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,    -1,    -1,   167,   145,   146,   147,   148,
-     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-      -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,   167,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,    -1,
-      -1,   167,   145,   146,   147,   148,   149,   150,   151,   152,
-     153,   154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,
-     163,    -1,   165,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,   165,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,    -1,    -1,
-      -1,    -1,   163,    -1,   165,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,   165,   145,   146,   147,   148,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+      -1,    -1,   170,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,    -1,    -1,    -1,
+      -1,   166,    -1,    -1,    -1,   170,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,   170,   148,
      149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-      -1,    -1,    -1,    -1,   163,    -1,   165,   145,   146,   147,
+     159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,
+      -1,   170,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,    -1,    -1,   170,   148,   149,   150,   151,   152,
+     153,   154,   155,   156,   157,   158,   159,   160,   161,    -1,
+      -1,    -1,    -1,   166,    -1,    -1,    -1,   170,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,
+     170,   148,   149,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,
+      -1,    -1,    -1,   170,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,    -1,   170,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,    -1,    -1,    -1,    -1,   166,    -1,    -1,    -1,   170,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,   165,   145,   146,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     157,   158,    -1,    -1,    -1,    -1,   163,    -1,   165,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,   165,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,
-     165,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,   165,   145,   146,   147,   148,   149,   150,   151,   152,
-     153,   154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,
-     163,    -1,   165,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,   165,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,    -1,    -1,
-      -1,    -1,   163,    -1,   165,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,   165,   145,   146,   147,   148,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+      -1,    -1,   170,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,    -1,    -1,    -1,
+      -1,   166,    -1,   168,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,   168,   148,   149,   150,   151,   152,
+     153,   154,   155,   156,   157,   158,   159,   160,   161,    -1,
+      -1,    -1,    -1,   166,    -1,   168,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,   168,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,    -1,    -1,    -1,    -1,   166,    -1,   168,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,   168,   148,
      149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-      -1,    -1,    -1,    -1,   163,    -1,   165,   145,   146,   147,
+     159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,   168,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,   165,   145,   146,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     157,   158,    -1,    -1,    -1,    -1,   163,    -1,   165,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,   165,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,
-     165,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,   165,   145,   146,   147,   148,   149,   150,   151,   152,
-     153,   154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,
-     163,    -1,   165,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,   165,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,    -1,    -1,
-      -1,    -1,   163,    -1,   165,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,   165,   145,   146,   147,   148,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+     168,   148,   149,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,
+      -1,   168,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,   168,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,    -1,    -1,    -1,
+      -1,   166,    -1,   168,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,   168,   148,   149,   150,   151,   152,
+     153,   154,   155,   156,   157,   158,   159,   160,   161,    -1,
+      -1,    -1,    -1,   166,    -1,   168,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,   168,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,    -1,    -1,    -1,    -1,   166,    -1,   168,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,   168,   148,
      149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-      -1,    -1,    -1,    -1,   163,    -1,   165,   145,   146,   147,
+     159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,   168,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,   165,   145,   146,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     157,   158,    -1,    -1,    -1,    -1,   163,    -1,   165,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,   165,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,
-     165,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,   165,   145,   146,   147,   148,   149,   150,   151,   152,
-     153,   154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,
-     163,    -1,   165,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,   165,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,    -1,    -1,
-      -1,    -1,   163,    -1,   165,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,   165,   145,   146,   147,   148,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+     168,   148,   149,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,
+      -1,   168,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,   168,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,    -1,    -1,    -1,
+      -1,   166,    -1,   168,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,   168,   148,   149,   150,   151,   152,
+     153,   154,   155,   156,   157,   158,   159,   160,   161,    -1,
+      -1,    -1,    -1,   166,    -1,   168,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,   168,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,    -1,    -1,    -1,    -1,   166,    -1,   168,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,   168,   148,
      149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-      -1,    -1,    -1,    -1,   163,    -1,   165,   145,   146,   147,
+     159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,   168,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,   165,   145,   146,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     157,   158,    -1,    -1,    -1,    -1,   163,    -1,   165,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,   165,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,
-     165,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,   165,   145,   146,   147,   148,   149,   150,   151,   152,
-     153,   154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,
-     163,    -1,   165,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,   165,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,    -1,    -1,
-      -1,    -1,   163,    -1,   165,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,   165,   145,   146,   147,   148,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+     168,   148,   149,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,
+      -1,   168,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,   168,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,    -1,    -1,    -1,
+      -1,   166,    -1,   168,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,   168,   148,   149,   150,   151,   152,
+     153,   154,   155,   156,   157,   158,   159,   160,   161,    -1,
+      -1,    -1,    -1,   166,    -1,   168,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,   168,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,    -1,    -1,    -1,    -1,   166,    -1,   168,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,   168,   148,
      149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-      -1,    -1,    -1,    -1,   163,    -1,   165,   145,   146,   147,
+     159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,   168,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163,    -1,   165,   145,   146,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     157,   158,    -1,    -1,    -1,    -1,   163,    -1,   165,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,   165,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,    -1,
-     165,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,   163,
-      -1,   165,   145,   146,   147,   148,   149,   150,   151,   152,
-     153,   154,   155,   156,   157,   158,    -1,    -1,    -1,    -1,
-     163,    -1,   165,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,    -1,    -1,    -1,
-      -1,   163,    -1,   165,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,    -1,    -1,
-      -1,    -1,   163,    -1,   165,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,    -1,
-      -1,    -1,    -1,   163,    -1,   165,   145,   146,   147,   148,
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+     168,   148,   149,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,
+      -1,   168,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,   168,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,    -1,    -1,    -1,
+      -1,   166,    -1,   168,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,   168,   148,   149,   150,   151,   152,
+     153,   154,   155,   156,   157,   158,   159,   160,   161,    -1,
+      -1,    -1,    -1,   166,    -1,   168,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,   168,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,    -1,    -1,    -1,    -1,   166,    -1,   168,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166,    -1,   168,   148,
      149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-      -1,    -1,    -1,    -1,   163,    -1,   165,   145,   146,   147,
+     159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,   168,
      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,    -1,    -1,    -1,    -1,   163
+     158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,    -1,
+     168,   148,   149,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,   166,
+      -1,   168,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,    -1,    -1,    -1,    -1,
+     166,    -1,   168,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,    -1,    -1,    -1,
+      -1,   166,    -1,   168,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,    -1,    -1,
+      -1,    -1,   166,    -1,   168,   148,   149,   150,   151,   152,
+     153,   154,   155,   156,   157,   158,   159,   160,   161,    -1,
+      -1,    -1,    -1,   166,    -1,   168,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+      -1,    -1,    -1,    -1,   166,    -1,   168,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,    -1,    -1,    -1,    -1,   166,    -1,   168,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,    -1,    -1,    -1,    -1,   166
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 static const yytype_uint16 yystos[] =
 {
-       0,     1,   175,   176,     6,     0,     4,    12,    13,    36,
+       0,     1,   178,   179,     6,     0,     4,    12,    13,    36,
       37,    47,    48,    52,    53,    54,    56,    57,    58,    59,
       60,    61,    62,    63,    64,    65,    66,    67,    69,    70,
       71,    72,    73,    74,    75,    76,    77,    78,    79,    81,
       82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
-      92,    93,    94,    95,    96,    97,   100,   101,   105,   110,
-     111,   112,   113,   116,   118,   120,   121,   122,   123,   124,
-     125,   126,   127,   128,   129,   130,   134,   135,   136,   137,
-     177,   179,   180,   198,   212,   217,   220,   221,   222,   223,
-     224,   225,   226,   246,   247,   248,   249,     3,     4,     5,
+      92,    93,    94,    95,    96,    97,   101,   102,   108,   113,
+     114,   115,   116,   119,   121,   123,   124,   125,   126,   127,
+     128,   129,   130,   131,   132,   133,   137,   138,   139,   140,
+     180,   182,   183,   201,   215,   220,   223,   224,   225,   226,
+     227,   228,   229,   249,   250,   251,   252,     3,     4,     5,
        7,     9,    10,    11,    14,    15,    16,    17,    18,    19,
       20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
       30,    31,    32,    33,    34,    38,    39,    40,    41,    42,
-      43,    44,    45,    46,    49,    50,    51,   125,   131,   132,
-     133,   138,   139,   140,   141,   142,   143,   144,   154,   155,
-     159,   161,   162,   164,   166,   168,   169,   171,   196,   197,
-     250,   251,   262,   263,    13,    64,   164,   164,     6,   171,
-       6,     6,     6,     6,   166,   166,   164,   171,   164,   164,
-       4,   164,   171,   164,   164,     4,   171,   164,   164,    68,
-      64,    64,     6,   171,    64,    64,    61,    64,    66,    66,
-      58,    61,    64,    66,    61,    64,    66,    61,    64,   164,
-      61,   116,   129,   130,   171,   154,   155,   164,   171,   252,
-     253,   252,   171,    58,    61,    64,   171,   252,     4,    58,
-      62,    73,    64,    66,    64,    61,     4,   125,   171,     4,
+      43,    44,    45,    46,    49,    50,    51,   128,   134,   135,
+     136,   141,   142,   143,   144,   145,   146,   147,   157,   158,
+     162,   164,   165,   167,   169,   171,   172,   174,   199,   200,
+     253,   254,   265,   266,    13,    64,   167,   167,     6,   174,
+       6,     6,     6,     6,   169,   169,   167,   174,   167,   167,
+       4,   167,   174,   167,   167,     4,   174,   167,   167,    68,
+      64,    64,     6,   174,    64,    64,    61,    64,    66,    66,
+      58,    61,    64,    66,    61,    64,    66,    61,    64,   167,
+      61,   119,   132,   133,   174,   157,   158,   167,   174,   255,
+     256,   255,   174,    58,    61,    64,   174,   255,     4,    58,
+      62,    73,    64,    66,    64,    61,     4,   128,   174,     4,
        6,    58,    61,    64,    61,    64,     4,     4,     4,     5,
-      35,    58,    61,    64,    66,    77,   155,   164,   171,   217,
-     226,   250,   255,   256,   257,     4,   164,   164,   164,     4,
-     171,   259,     4,   164,   164,     6,     6,   166,     4,     4,
-       5,   171,     5,   171,     4,   250,     6,   164,   171,     4,
-     166,   168,   173,   197,   263,   164,   166,   164,   166,   164,
-     166,   164,   166,   164,   166,   164,   166,   164,   166,   164,
-     166,   164,   166,   164,   166,   164,   166,   164,   166,   164,
-     166,   164,   166,   164,   166,   164,   166,   164,   166,   164,
-     166,   164,   166,   164,   166,   164,   166,   164,   166,   164,
-     166,   164,   164,   164,   164,   164,   164,   164,     7,   164,
-     164,   164,   250,   250,   250,   171,   250,   167,   171,   250,
-       4,   116,   117,     4,     4,   217,   218,   219,   255,     6,
-       6,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,   163,   171,     6,     6,   250,
-       4,   262,   263,   262,   250,   200,   203,   250,   155,   250,
-     257,   258,   250,   250,   164,   250,   258,   250,   250,   164,
-     258,   250,   250,   255,   164,   171,   258,   164,   164,   256,
-     256,   256,   164,   213,   214,   215,   216,   164,   164,   164,
-     255,   250,     4,   255,   259,   171,   171,   252,   252,   252,
-     250,   250,   154,   155,   171,   171,   252,   171,   171,   171,
-     154,   155,   164,   219,   252,   171,   164,   171,   164,   164,
-     164,   256,   256,   255,   164,     4,     6,   166,   166,   219,
-       6,   171,   171,   171,   256,   256,   166,   166,   164,   166,
-     168,   166,     5,   171,     5,     5,     5,    58,    61,    64,
-      66,   171,   250,   257,   250,   172,   258,     8,   156,     6,
-       6,   250,   250,   250,   168,   250,   171,   119,   250,   250,
-     250,     6,     6,   219,     6,   219,   166,     6,   255,   255,
-     166,   250,     4,   171,     6,   250,   250,   250,   250,   250,
-     250,   250,   250,   250,   250,   250,   250,   250,   250,   250,
-     250,   250,   250,   250,   250,   250,   250,   250,   250,   250,
-     250,   250,   250,   250,   250,   250,   250,   250,   250,   250,
-     250,   250,   250,   250,   250,   250,   250,   262,   264,   264,
-     262,   262,   262,   262,   262,   262,   262,   262,   264,   250,
-     262,   262,   262,   258,   165,     7,   196,   258,   167,     7,
-     196,   197,   168,     7,   166,   172,    58,    61,    64,    66,
-     212,     6,   250,   250,   250,   250,   250,   250,   250,   250,
-     250,   250,   250,   250,   250,   250,   250,   181,     6,   166,
-     168,   165,   170,   165,   170,   170,   167,   170,   199,   167,
-     199,   165,   156,   170,   172,   165,   165,   250,   165,   172,
-     165,   165,   250,   172,   165,   165,     7,   250,   250,   172,
-     250,   250,     7,     7,   244,   244,   250,   164,   164,   164,
-     164,   250,   250,   250,     7,   171,   165,     6,   171,   219,
-     219,   170,   170,   170,   252,   252,   218,   218,   170,   250,
-     250,   250,   250,   230,   170,   219,   250,   250,   250,   250,
-     250,     7,   245,     6,     7,   250,     6,   250,   250,   172,
-     258,   258,   258,     6,     6,   250,   250,   165,   171,   167,
-     171,   250,     4,     4,   250,   171,   171,   171,   171,   258,
-     165,   172,   250,   171,   250,   257,   165,   165,   165,   116,
-     170,   219,   171,     8,   165,   167,   172,   172,   165,   170,
-     172,   250,   167,   197,   250,   165,   167,   165,   167,   165,
-     167,   165,   167,   165,   167,   165,   167,   165,   167,   165,
-     167,   165,   167,   165,   167,   165,   167,   170,   170,   165,
-     167,   165,   167,   165,   167,   165,   167,   165,   167,   165,
-     167,   170,   170,   170,   170,   170,   170,   165,   170,   167,
-     165,   170,   167,   170,   170,   165,   165,   170,   170,   170,
-     165,     6,   170,   165,   170,   172,   196,   255,   172,   168,
-     196,   197,   263,   250,     6,     4,     4,   171,   260,   167,
-     171,   171,   171,   171,     8,     4,   106,   107,   108,   109,
-     172,   184,   188,   191,   193,   194,   250,     4,     6,   151,
-     178,   258,     6,   258,   250,     6,     4,     6,   262,     7,
-     250,   257,   119,     7,     7,   165,     7,   119,     7,     7,
-     165,   119,     7,     7,   250,   165,   172,   171,   165,   165,
-     250,   255,     4,   243,     6,   165,   209,   250,   263,   209,
-     209,   209,   165,   165,   165,   255,   258,   168,   219,   172,
-     172,   252,   250,   250,   172,   172,   250,   252,   170,   170,
-     170,    80,    90,    98,    99,   102,   103,   240,   241,   252,
-     172,   227,   165,   172,   165,   165,   165,   250,     6,   250,
-     165,   167,   167,   172,   172,   172,   167,   167,   258,   258,
-     167,   167,   172,   258,   258,   258,   258,   172,     8,   258,
-       7,     7,     7,   168,   250,   172,   250,   250,     7,   168,
-     171,   255,     6,   167,   168,   197,   262,   172,   250,   250,
-     250,   250,   250,   250,   250,   250,   262,   258,   258,   262,
-     262,   262,   262,   250,   262,   165,   250,     6,   167,     4,
-     116,   117,   250,     6,     6,     6,     7,   166,   259,   261,
-       6,   258,   258,   258,   258,   250,   185,   164,   164,   171,
-     195,     6,   167,   151,   262,   165,   165,   170,     7,   252,
-      64,    66,   255,   255,     7,   255,    64,    66,   255,   255,
-       7,    66,   255,   255,     6,     7,     7,   258,     7,     7,
-      80,   242,     6,     7,   165,   165,   165,   165,     7,     7,
-       7,     6,   172,     4,   172,   170,   170,   170,   172,   172,
-     252,   252,   252,     4,     6,   171,   164,     6,   104,     6,
-     104,   172,   241,   170,   240,     7,     6,     7,     7,     7,
-       6,   171,     6,     6,     6,    64,   250,     6,     6,   172,
-     172,   168,   172,   172,   172,   172,   250,   172,   255,   255,
-     255,     4,   170,     8,     8,   165,     4,     4,   255,   172,
-       6,     4,     6,   165,   167,   165,   167,   165,   167,   165,
-     167,   165,   167,   165,   170,   165,   165,   165,   165,   196,
-       6,   196,     7,   196,   197,   168,     7,     6,   259,   250,
-     170,   172,   172,   172,   172,   172,   164,   250,   250,   254,
-     255,   171,   168,     6,     6,   178,     6,   250,   171,   250,
-     263,     6,   171,   171,    73,   211,   211,   255,     6,   171,
-     171,     6,     6,   255,   171,     6,     6,     5,   255,   172,
-     255,   255,     4,     6,   255,     7,     7,     7,     7,   255,
-     255,   255,     7,     6,     7,   250,   250,   250,   171,   171,
-     170,   172,   170,   172,   170,   172,   166,   250,   255,   250,
-       6,     6,   250,   252,   172,     5,   171,   255,   171,   171,
-     171,   255,   258,   171,     6,   165,   167,     4,     6,     6,
-     115,   250,   250,   250,     6,     6,     7,   170,     6,   197,
-     262,   255,   255,   263,   250,     6,     4,   260,     6,   167,
-     259,     6,     6,     6,     6,   182,   250,   170,   170,   170,
-     172,   183,   250,     4,   262,   170,   250,   263,   250,   250,
-     252,     6,     6,     6,   250,   250,     6,   250,     5,     6,
-     171,     6,   119,   210,   250,     6,   255,   255,   255,   255,
-       6,     4,     6,     6,   250,   250,   263,   172,   165,   170,
-     172,   218,   218,   252,     6,   231,   252,     6,   232,   252,
-       6,   233,   250,   172,   170,   165,   172,   170,     6,   155,
-     252,     6,   254,   252,   252,     6,   172,   250,   255,   170,
-     172,     8,   172,   165,   171,   250,   263,   255,   165,     6,
-       6,     6,     6,     7,     6,   168,   165,   170,   250,   250,
-     255,   171,   170,   172,     6,   250,   201,   202,   172,   172,
-     172,   172,   172,     5,   254,    62,     6,     6,     6,     6,
-       6,   171,   171,     6,     6,   171,   250,   172,   172,   170,
-     171,   170,   171,   170,   171,   167,     6,   255,     7,   171,
-     250,   170,   172,   170,   170,     6,   172,   114,   250,   250,
-     258,     6,     6,   172,   259,   117,   186,   250,   170,   170,
-     254,   250,     6,   170,   205,   207,     6,     6,     6,     6,
-       6,     6,   172,   171,   254,   258,   218,   170,   172,   250,
-     252,   240,   250,   252,   240,   250,   252,   240,     6,   170,
-     172,   255,   219,   172,   252,     6,   258,   252,   250,   172,
-     172,   172,     6,     6,   171,   250,   250,   172,   250,   170,
-     172,   206,   170,   172,   208,   171,   250,   172,   172,   172,
-     250,   172,   170,   172,   172,   170,   172,   172,   170,   172,
-     255,     6,    80,   172,   228,   171,   170,   172,   170,     6,
-       6,   183,   165,   170,     6,   171,   170,     4,     4,   250,
-     172,     6,     6,   172,     6,   234,   250,     6,     6,   235,
-     250,     6,     6,   236,   250,     6,   172,   250,   240,   219,
-     258,     6,   252,   258,   172,   189,   250,   254,   250,   171,
-     255,   263,   171,   250,   263,   170,   171,   172,   171,   172,
-     171,   172,     6,     6,   172,   172,   229,   172,   170,   172,
-       6,   171,   165,   172,   172,   204,   250,   264,   250,   240,
-       6,   237,   240,     6,   238,   240,     6,   239,   240,     6,
-     258,     6,   187,   262,   192,   171,     6,   170,   172,     7,
-     172,   172,   172,   171,   172,   171,   172,   171,   172,   172,
-     170,   172,   171,   254,   250,   263,     6,     6,   240,     6,
-     240,     6,   240,     6,   262,     6,   190,   262,   172,     7,
-     172,   172,   172,   170,   172,     6,   263,     6,     6,     6,
-     262,     6
+      35,    58,    61,    64,    66,    77,   158,   167,   174,   220,
+     229,   253,   258,   259,   260,     4,   167,   167,   167,     4,
+     174,   262,     4,   167,   167,     6,     6,   169,     4,     4,
+       5,   174,     5,   174,     4,   253,     6,   167,   174,     4,
+     169,   171,   176,   200,   266,   167,   169,   167,   169,   167,
+     169,   167,   169,   167,   169,   167,   169,   167,   169,   167,
+     169,   167,   169,   167,   169,   167,   169,   167,   169,   167,
+     169,   167,   169,   167,   169,   167,   169,   167,   169,   167,
+     169,   167,   169,   167,   169,   167,   169,   167,   169,   167,
+     169,   167,   167,   167,   167,   167,   167,   167,     7,   167,
+     167,   167,   253,   253,   253,   174,   253,   170,   174,   253,
+       4,   119,   120,     4,     4,   220,   221,   222,   258,     6,
+       6,   148,   149,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,   166,   174,     6,     6,   253,
+       4,   265,   266,   265,   253,   203,   206,   253,   158,   253,
+     260,   261,   253,   253,   167,   253,   261,   253,   253,   167,
+     261,   253,   253,   258,   167,   174,   261,   167,   167,   259,
+     259,   259,   167,   216,   217,   218,   219,   167,   167,   167,
+     258,   253,     4,   258,   262,   174,   174,   255,   255,   255,
+     253,   253,   157,   158,   174,   174,   255,   174,   174,   174,
+     157,   158,   167,   222,   255,   174,   167,   174,   167,   167,
+     167,   259,   259,   258,   167,     4,     6,   169,   169,   222,
+       6,   174,   174,   174,   259,   259,   169,   169,   167,   169,
+     171,   169,     5,   174,     5,     5,     5,    58,    61,    64,
+      66,   174,   253,   260,   253,   175,   261,     8,   159,     6,
+       6,   253,   253,   253,   171,   253,   174,   122,   253,   253,
+     253,     6,     6,   222,     6,   222,   169,     6,   258,   258,
+     169,   253,     4,   174,     6,   253,   253,   253,   253,   253,
+     253,   253,   253,   253,   253,   253,   253,   253,   253,   253,
+     253,   253,   253,   253,   253,   253,   253,   253,   253,   253,
+     253,   253,   253,   253,   253,   253,   253,   253,   253,   253,
+     253,   253,   253,   253,   253,   253,   253,   265,   267,   267,
+     265,   265,   265,   265,   265,   265,   265,   265,   267,   253,
+     265,   265,   265,   261,   168,     7,   199,   261,   170,     7,
+     199,   200,   171,     7,   169,   175,    58,    61,    64,    66,
+     215,     6,   253,   253,   253,   253,   253,   253,   253,   253,
+     253,   253,   253,   253,   253,   253,   253,   184,     6,   169,
+     171,   168,   173,   168,   173,   173,   170,   173,   202,   170,
+     202,   168,   159,   173,   175,   168,   168,   253,   168,   175,
+     168,   168,   253,   175,   168,   168,     7,   253,   253,   175,
+     253,   253,     7,     7,   247,   247,   253,   167,   167,   167,
+     167,   253,   253,   253,     7,   174,   168,     6,   174,   222,
+     222,   173,   173,   173,   255,   255,   221,   221,   173,   253,
+     253,   253,   253,   233,   173,   222,   253,   253,   253,   253,
+     253,     7,   248,     6,     7,   253,     6,   253,   253,   175,
+     261,   261,   261,     6,     6,   253,   253,   168,   174,   170,
+     174,   253,     4,     4,   253,   174,   174,   174,   174,   261,
+     168,   175,   253,   174,   253,   260,   168,   168,   168,   119,
+     173,   222,   174,     8,   168,   170,   175,   175,   168,   173,
+     175,   253,   170,   200,   253,   168,   170,   168,   170,   168,
+     170,   168,   170,   168,   170,   168,   170,   168,   170,   168,
+     170,   168,   170,   168,   170,   168,   170,   173,   173,   168,
+     170,   168,   170,   168,   170,   168,   170,   168,   170,   168,
+     170,   173,   173,   173,   173,   173,   173,   168,   173,   170,
+     168,   173,   170,   173,   173,   168,   168,   173,   173,   173,
+     168,     6,   173,   168,   173,   175,   199,   258,   175,   171,
+     199,   200,   266,   253,     6,     4,     4,   174,   263,   170,
+     174,   174,   174,   174,     8,     4,   109,   110,   111,   112,
+     175,   187,   191,   194,   196,   197,   253,     4,     6,   154,
+     181,   261,     6,   261,   253,     6,     4,     6,   265,     7,
+     253,   260,   122,     7,     7,   168,     7,   122,     7,     7,
+     168,   122,     7,     7,   253,   168,   175,   174,   168,   168,
+     253,   258,     4,   246,     6,   168,   212,   253,   266,   212,
+     212,   212,   168,   168,   168,   258,   261,   171,   222,   175,
+     175,   255,   253,   253,   175,   175,   253,   255,   173,   173,
+     173,    80,    90,    98,    99,   100,   103,   104,   105,   106,
+     243,   244,   255,   175,   230,   168,   175,   168,   168,   168,
+     253,     6,   253,   168,   170,   170,   175,   175,   175,   170,
+     170,   261,   261,   170,   170,   175,   261,   261,   261,   261,
+     175,     8,   261,     7,     7,     7,   171,   253,   175,   253,
+     253,     7,   171,   174,   258,     6,   170,   171,   200,   265,
+     175,   253,   253,   253,   253,   253,   253,   253,   253,   265,
+     261,   261,   265,   265,   265,   265,   253,   265,   168,   253,
+       6,   170,     4,   119,   120,   253,     6,     6,     6,     7,
+     169,   262,   264,     6,   261,   261,   261,   261,   253,   188,
+     167,   167,   174,   198,     6,   170,   154,   265,   168,   168,
+     173,     7,   255,    64,    66,   258,   258,     7,   258,    64,
+      66,   258,   258,     7,    66,   258,   258,     6,     7,     7,
+     261,     7,     7,    80,   245,     6,     7,   168,   168,   168,
+     168,     7,     7,     7,     6,   175,     4,   175,   173,   173,
+     173,   175,   175,   255,   255,   255,     4,     6,   174,     6,
+     167,     6,   107,     6,   107,     6,   107,     6,   107,   175,
+     244,   173,   243,     7,     6,     7,     7,     7,     6,   174,
+       6,     6,     6,    64,   253,     6,     6,   175,   175,   171,
+     175,   175,   175,   175,   253,   175,   258,   258,   258,     4,
+     173,     8,     8,   168,     4,     4,   258,   175,     6,     4,
+       6,   168,   170,   168,   170,   168,   170,   168,   170,   168,
+     170,   168,   173,   168,   168,   168,   168,   199,     6,   199,
+       7,   199,   200,   171,     7,     6,   262,   253,   173,   175,
+     175,   175,   175,   175,   167,   253,   253,   257,   258,   174,
+     171,     6,     6,   181,     6,   253,   174,   253,   266,     6,
+     174,   174,    73,   214,   214,   258,     6,   174,   174,     6,
+       6,   258,   174,     6,     6,     5,   258,   175,   258,   258,
+       4,     6,   258,     7,     7,     7,     7,   258,   258,   258,
+       7,     6,     7,   253,   253,   253,   174,   174,   173,   175,
+     173,   175,   173,   175,   169,   253,   258,   253,     6,     6,
+       6,     6,   253,   255,   175,     5,   174,   258,   174,   174,
+     174,   258,   261,   174,     6,   168,   170,     4,     6,     6,
+     118,   253,   253,   253,     6,     6,     7,   173,     6,   200,
+     265,   258,   258,   266,   253,     6,     4,   263,     6,   170,
+     262,     6,     6,     6,     6,   185,   253,   173,   173,   173,
+     175,   186,   253,     4,   265,   173,   253,   266,   253,   253,
+     255,     6,     6,     6,   253,   253,     6,   253,     5,     6,
+     174,     6,   122,   213,   253,     6,   258,   258,   258,   258,
+       6,     4,     6,     6,   253,   253,   266,   175,   168,   173,
+     175,   221,   221,   255,     6,   234,   255,     6,   235,   255,
+       6,   236,   253,   175,   173,   168,   175,   173,     6,   158,
+     255,     6,   257,   255,   255,     6,   175,   253,   258,   173,
+     175,     8,   175,   168,   174,   253,   266,   258,   168,     6,
+       6,     6,     6,     7,     6,   171,   168,   173,   253,   253,
+     258,   174,   173,   175,     6,   253,   204,   205,   175,   175,
+     175,   175,   175,     5,   257,    62,     6,     6,     6,     6,
+       6,   174,   174,     6,     6,   174,   253,   175,   175,   173,
+     174,   173,   174,   173,   174,   170,     6,   258,     7,   174,
+     253,   173,   175,   173,   173,     6,   175,   117,   253,   253,
+     261,     6,     6,   175,   262,   120,   189,   253,   173,   173,
+     257,   253,     6,   173,   208,   210,     6,     6,     6,     6,
+       6,     6,   175,   174,   257,   261,   221,   173,   175,   253,
+     255,   243,   253,   255,   243,   253,   255,   243,     6,   173,
+     175,   258,   222,   175,   255,     6,   261,   255,   253,   175,
+     175,   175,     6,     6,   174,   253,   253,   175,   253,   173,
+     175,   209,   173,   175,   211,   174,   253,   175,   175,   175,
+     253,   175,   173,   175,   175,   173,   175,   175,   173,   175,
+     258,     6,    80,   175,   231,   174,   173,   175,   173,     6,
+       6,   186,   168,   173,     6,   174,   173,     4,     4,   253,
+     175,     6,     6,   175,     6,   237,   253,     6,     6,   238,
+     253,     6,     6,   239,   253,     6,   175,   253,   243,   222,
+     261,     6,   255,   261,   175,   192,   253,   257,   253,   174,
+     258,   266,   174,   253,   266,   173,   174,   175,   174,   175,
+     174,   175,     6,     6,   175,   175,   232,   175,   173,   175,
+       6,   174,   168,   175,   175,   207,   253,   267,   253,   243,
+       6,   240,   243,     6,   241,   243,     6,   242,   243,     6,
+     261,     6,   190,   265,   195,   174,     6,   173,   175,     7,
+     175,   175,   175,   174,   175,   174,   175,   174,   175,   175,
+     173,   175,   174,   257,   253,   266,     6,     6,   243,     6,
+     243,     6,   243,     6,   265,     6,   193,   265,   175,     7,
+     175,   175,   175,   173,   175,     6,   266,     6,     6,     6,
+     265,     6
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -6352,6 +6406,8 @@ yyreduce:
         for(int i = 0; i < List_Nbr((yyvsp[(7) - (8)].l)); i++){
           s->compound.push_back((int)*(double*)List_Pointer((yyvsp[(7) - (8)].l), i));
 	}
+        // Added by Trevor Strickler
+	setSurfaceGeneratrices(s, (List_T*) 0 );
 	Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &s);
       }
       List_Delete((yyvsp[(7) - (8)].l));
@@ -6361,7 +6417,7 @@ yyreduce:
     break;
 
   case 148:
-#line 1857 "Gmsh.y"
+#line 1859 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (12)].d);
       if(FindSurface(num)){
@@ -6381,6 +6437,9 @@ yyreduce:
             s->compoundBoundary[i].push_back((int)*(double*)List_Pointer(l, j));
 	  }
 	}
+        // Added by Trevor Strickler
+        setSurfaceGeneratrices(s, (List_T*) 0 );
+
 	Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &s);
       }
       List_Delete((yyvsp[(7) - (12)].l));
@@ -6394,14 +6453,14 @@ yyreduce:
     break;
 
   case 149:
-#line 1887 "Gmsh.y"
+#line 1892 "Gmsh.y"
     {
       curPhysDim = 2;
     ;}
     break;
 
   case 150:
-#line 1891 "Gmsh.y"
+#line 1896 "Gmsh.y"
     {
       int num = (int)(yyvsp[(5) - (9)].i);
       if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){
@@ -6420,7 +6479,7 @@ yyreduce:
     break;
 
   case 151:
-#line 1911 "Gmsh.y"
+#line 1916 "Gmsh.y"
     {
       yymsg(0, "'Complex Volume' command is deprecated: use 'Volume' instead");
       int num = (int)(yyvsp[(4) - (8)].d);
@@ -6441,7 +6500,7 @@ yyreduce:
     break;
 
   case 152:
-#line 1929 "Gmsh.y"
+#line 1934 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if(FindVolume(num)){
@@ -6461,7 +6520,7 @@ yyreduce:
     break;
 
   case 153:
-#line 1946 "Gmsh.y"
+#line 1951 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
       if(FindVolume(num)){
@@ -6480,14 +6539,14 @@ yyreduce:
     break;
 
   case 154:
-#line 1962 "Gmsh.y"
+#line 1967 "Gmsh.y"
     {
       curPhysDim = 3;
     ;}
     break;
 
   case 155:
-#line 1966 "Gmsh.y"
+#line 1971 "Gmsh.y"
     {
       int num = (int)(yyvsp[(5) - (9)].i);
       if(FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME)){
@@ -6506,7 +6565,7 @@ yyreduce:
     break;
 
   case 156:
-#line 1988 "Gmsh.y"
+#line 1993 "Gmsh.y"
     {
       TranslateShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(4) - (5)].l));
       (yyval.l) = (yyvsp[(4) - (5)].l);
@@ -6514,7 +6573,7 @@ yyreduce:
     break;
 
   case 157:
-#line 1993 "Gmsh.y"
+#line 1998 "Gmsh.y"
     {
       RotateShapes((yyvsp[(3) - (11)].v)[0], (yyvsp[(3) - (11)].v)[1], (yyvsp[(3) - (11)].v)[2], (yyvsp[(5) - (11)].v)[0], (yyvsp[(5) - (11)].v)[1], (yyvsp[(5) - (11)].v)[2], (yyvsp[(7) - (11)].d), (yyvsp[(10) - (11)].l));
       (yyval.l) = (yyvsp[(10) - (11)].l);
@@ -6522,7 +6581,7 @@ yyreduce:
     break;
 
   case 158:
-#line 1998 "Gmsh.y"
+#line 2003 "Gmsh.y"
     {
       SymmetryShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(2) - (5)].v)[3], (yyvsp[(4) - (5)].l));
       (yyval.l) = (yyvsp[(4) - (5)].l);
@@ -6530,7 +6589,7 @@ yyreduce:
     break;
 
   case 159:
-#line 2003 "Gmsh.y"
+#line 2008 "Gmsh.y"
     {
       DilatShapes((yyvsp[(3) - (9)].v)[0], (yyvsp[(3) - (9)].v)[1], (yyvsp[(3) - (9)].v)[2], (yyvsp[(5) - (9)].d), (yyvsp[(5) - (9)].d), (yyvsp[(5) - (9)].d), (yyvsp[(8) - (9)].l));
       (yyval.l) = (yyvsp[(8) - (9)].l);
@@ -6538,7 +6597,7 @@ yyreduce:
     break;
 
   case 160:
-#line 2008 "Gmsh.y"
+#line 2013 "Gmsh.y"
     {
       DilatShapes((yyvsp[(3) - (9)].v)[0], (yyvsp[(3) - (9)].v)[1], (yyvsp[(3) - (9)].v)[2], (yyvsp[(5) - (9)].v)[0], (yyvsp[(5) - (9)].v)[1], (yyvsp[(5) - (9)].v)[2], (yyvsp[(8) - (9)].l));
       (yyval.l) = (yyvsp[(8) - (9)].l);
@@ -6546,7 +6605,7 @@ yyreduce:
     break;
 
   case 161:
-#line 2013 "Gmsh.y"
+#line 2018 "Gmsh.y"
     {
       (yyval.l) = List_Create(3, 3, sizeof(Shape));
       if(!strcmp((yyvsp[(1) - (4)].c), "Duplicata")){
@@ -6572,7 +6631,7 @@ yyreduce:
     break;
 
   case 162:
-#line 2036 "Gmsh.y"
+#line 2041 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       IntersectCurvesWithSurface((yyvsp[(4) - (9)].l), (int)(yyvsp[(8) - (9)].d), (yyval.l));
@@ -6581,7 +6640,7 @@ yyreduce:
     break;
 
   case 163:
-#line 2042 "Gmsh.y"
+#line 2047 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape*));
       List_T *tmp = ListOfDouble2ListOfInt((yyvsp[(7) - (9)].l));
@@ -6592,31 +6651,31 @@ yyreduce:
     break;
 
   case 164:
-#line 2052 "Gmsh.y"
+#line 2057 "Gmsh.y"
     { (yyval.l) = (yyvsp[(1) - (1)].l); ;}
     break;
 
   case 165:
-#line 2053 "Gmsh.y"
+#line 2058 "Gmsh.y"
     { (yyval.l) = (yyvsp[(1) - (1)].l); ;}
     break;
 
   case 166:
-#line 2058 "Gmsh.y"
+#line 2063 "Gmsh.y"
     {
       (yyval.l) = List_Create(3, 3, sizeof(Shape));
     ;}
     break;
 
   case 167:
-#line 2062 "Gmsh.y"
+#line 2067 "Gmsh.y"
     {
       List_Add((yyval.l), &(yyvsp[(2) - (2)].s));
     ;}
     break;
 
   case 168:
-#line 2066 "Gmsh.y"
+#line 2071 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -6642,7 +6701,7 @@ yyreduce:
     break;
 
   case 169:
-#line 2089 "Gmsh.y"
+#line 2094 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -6668,7 +6727,7 @@ yyreduce:
     break;
 
   case 170:
-#line 2112 "Gmsh.y"
+#line 2117 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -6694,7 +6753,7 @@ yyreduce:
     break;
 
   case 171:
-#line 2135 "Gmsh.y"
+#line 2140 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -6720,7 +6779,7 @@ yyreduce:
     break;
 
   case 172:
-#line 2163 "Gmsh.y"
+#line 2168 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(List_Nbr((yyvsp[(7) - (8)].l)) == 4){
@@ -6744,7 +6803,7 @@ yyreduce:
     break;
 
   case 173:
-#line 2184 "Gmsh.y"
+#line 2189 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       int t = (int)(yyvsp[(4) - (10)].d);
@@ -6773,7 +6832,7 @@ yyreduce:
     break;
 
   case 174:
-#line 2211 "Gmsh.y"
+#line 2216 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(List_Nbr((yyvsp[(12) - (14)].l)) == 0){
@@ -6796,7 +6855,7 @@ yyreduce:
     break;
 
   case 175:
-#line 2232 "Gmsh.y"
+#line 2237 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(List_Nbr((yyvsp[(14) - (16)].l)) == 0){
@@ -6820,7 +6879,7 @@ yyreduce:
     break;
 
   case 176:
-#line 2253 "Gmsh.y"
+#line 2258 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(List_Nbr((yyvsp[(10) - (12)].l)) == 1){
@@ -6843,7 +6902,7 @@ yyreduce:
     break;
 
   case 177:
-#line 2273 "Gmsh.y"
+#line 2278 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(!strcmp((yyvsp[(2) - (8)].c), "Union")){
@@ -6958,7 +7017,7 @@ yyreduce:
     break;
 
   case 178:
-#line 2385 "Gmsh.y"
+#line 2390 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(!strcmp((yyvsp[(2) - (8)].c), "MathEval")){
@@ -6980,7 +7039,7 @@ yyreduce:
     break;
 
   case 179:
-#line 2404 "Gmsh.y"
+#line 2409 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(!strcmp((yyvsp[(2) - (6)].c), "CutMesh")){
@@ -7021,7 +7080,7 @@ yyreduce:
     break;
 
   case 180:
-#line 2443 "Gmsh.y"
+#line 2448 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(!strcmp((yyvsp[(2) - (14)].c), "Cylinder") && List_Nbr((yyvsp[(12) - (14)].l)) == 1){
@@ -7127,7 +7186,7 @@ yyreduce:
     break;
 
   case 181:
-#line 2551 "Gmsh.y"
+#line 2556 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
 	Shape TheShape;
@@ -7139,7 +7198,7 @@ yyreduce:
     break;
 
   case 182:
-#line 2560 "Gmsh.y"
+#line 2565 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
       GModel::current()->getFields()->deleteField((int)(yyvsp[(4) - (6)].d));
@@ -7148,7 +7207,7 @@ yyreduce:
     break;
 
   case 183:
-#line 2566 "Gmsh.y"
+#line 2571 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(!strcmp((yyvsp[(2) - (6)].c), "View")){
@@ -7166,7 +7225,7 @@ yyreduce:
     break;
 
   case 184:
-#line 2581 "Gmsh.y"
+#line 2586 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){
         ClearProject();
@@ -7197,7 +7256,7 @@ yyreduce:
     break;
 
   case 185:
-#line 2609 "Gmsh.y"
+#line 2614 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(!strcmp((yyvsp[(2) - (4)].c), "Empty") && !strcmp((yyvsp[(3) - (4)].c), "Views")){
@@ -7212,7 +7271,7 @@ yyreduce:
     break;
 
   case 186:
-#line 2626 "Gmsh.y"
+#line 2631 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
 	Shape TheShape;
@@ -7224,7 +7283,7 @@ yyreduce:
     break;
 
   case 187:
-#line 2635 "Gmsh.y"
+#line 2640 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(5) - (6)].l)); i++){
 	Shape TheShape;
@@ -7236,7 +7295,7 @@ yyreduce:
     break;
 
   case 188:
-#line 2649 "Gmsh.y"
+#line 2654 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++)
 	VisibilityShape((yyvsp[(2) - (3)].c), i, 1, false);
@@ -7245,7 +7304,7 @@ yyreduce:
     break;
 
   case 189:
-#line 2655 "Gmsh.y"
+#line 2660 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++)
 	VisibilityShape((yyvsp[(2) - (3)].c), i, 0, false);
@@ -7254,7 +7313,7 @@ yyreduce:
     break;
 
   case 190:
-#line 2661 "Gmsh.y"
+#line 2666 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
 	Shape TheShape;
@@ -7266,7 +7325,7 @@ yyreduce:
     break;
 
   case 191:
-#line 2670 "Gmsh.y"
+#line 2675 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
 	Shape TheShape;
@@ -7278,7 +7337,7 @@ yyreduce:
     break;
 
   case 192:
-#line 2679 "Gmsh.y"
+#line 2684 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
 	Shape TheShape;
@@ -7290,7 +7349,7 @@ yyreduce:
     break;
 
   case 193:
-#line 2688 "Gmsh.y"
+#line 2693 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
 	Shape TheShape;
@@ -7302,7 +7361,7 @@ yyreduce:
     break;
 
   case 194:
-#line 2702 "Gmsh.y"
+#line 2707 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (3)].c), "Include")){
         std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(2) - (3)].c));
@@ -7350,7 +7409,7 @@ yyreduce:
     break;
 
   case 195:
-#line 2747 "Gmsh.y"
+#line 2752 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(!strcmp((yyvsp[(1) - (7)].c), "Save") && !strcmp((yyvsp[(2) - (7)].c), "View")){
@@ -7370,7 +7429,7 @@ yyreduce:
     break;
 
   case 196:
-#line 2764 "Gmsh.y"
+#line 2769 "Gmsh.y"
     {
 #if defined(HAVE_POST) && defined(HAVE_MESH)
       if(!strcmp((yyvsp[(1) - (7)].c), "Background") && !strcmp((yyvsp[(2) - (7)].c), "Mesh")  && !strcmp((yyvsp[(3) - (7)].c), "View")){
@@ -7388,7 +7447,7 @@ yyreduce:
     break;
 
   case 197:
-#line 2779 "Gmsh.y"
+#line 2784 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){
 	SleepInSeconds((yyvsp[(2) - (3)].d));
@@ -7410,7 +7469,7 @@ yyreduce:
     break;
 
   case 198:
-#line 2798 "Gmsh.y"
+#line 2803 "Gmsh.y"
     {
 #if defined(HAVE_PLUGINS)
        try {
@@ -7425,7 +7484,7 @@ yyreduce:
     break;
 
   case 199:
-#line 2810 "Gmsh.y"
+#line 2815 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(!strcmp((yyvsp[(2) - (3)].c), "ElementsFromAllViews"))
@@ -7452,14 +7511,14 @@ yyreduce:
     break;
 
   case 200:
-#line 2834 "Gmsh.y"
+#line 2839 "Gmsh.y"
     {
       Msg::Exit(0);
     ;}
     break;
 
   case 201:
-#line 2838 "Gmsh.y"
+#line 2843 "Gmsh.y"
     {
       gmsh_yyerrorstate = 999; // this will be checked when yyparse returns
       YYABORT;
@@ -7467,7 +7526,7 @@ yyreduce:
     break;
 
   case 202:
-#line 2843 "Gmsh.y"
+#line 2848 "Gmsh.y"
     {
       // FIXME: this is a hack to force a transfer from the old DB to
       // the new DB. This will become unnecessary if/when we fill the
@@ -7477,7 +7536,7 @@ yyreduce:
     break;
 
   case 203:
-#line 2850 "Gmsh.y"
+#line 2855 "Gmsh.y"
     {
       CTX::instance()->forcedBBox = 0;
       GModel::current()->importGEOInternals();
@@ -7486,7 +7545,7 @@ yyreduce:
     break;
 
   case 204:
-#line 2856 "Gmsh.y"
+#line 2861 "Gmsh.y"
     {
       CTX::instance()->forcedBBox = 1;
       SetBoundingBox((yyvsp[(3) - (15)].d), (yyvsp[(5) - (15)].d), (yyvsp[(7) - (15)].d), (yyvsp[(9) - (15)].d), (yyvsp[(11) - (15)].d), (yyvsp[(13) - (15)].d));
@@ -7494,7 +7553,7 @@ yyreduce:
     break;
 
   case 205:
-#line 2861 "Gmsh.y"
+#line 2866 "Gmsh.y"
     {
 #if defined(HAVE_OPENGL)
       drawContext::global()->draw();
@@ -7503,21 +7562,21 @@ yyreduce:
     break;
 
   case 206:
-#line 2867 "Gmsh.y"
+#line 2872 "Gmsh.y"
     {
       GModel::current()->createTopologyFromMesh();
     ;}
     break;
 
   case 207:
-#line 2871 "Gmsh.y"
+#line 2876 "Gmsh.y"
     {
       GModel::current()->createTopologyFromMesh(1);
     ;}
     break;
 
   case 208:
-#line 2875 "Gmsh.y"
+#line 2880 "Gmsh.y"
     {
       GModel::current()->importGEOInternals();
       GModel::current()->refineMesh(CTX::instance()->mesh.secondOrderLinear);
@@ -7525,7 +7584,7 @@ yyreduce:
     break;
 
   case 209:
-#line 2881 "Gmsh.y"
+#line 2886 "Gmsh.y"
     {
       int lock = CTX::instance()->lock;
       CTX::instance()->lock = 0;
@@ -7582,7 +7641,7 @@ yyreduce:
     break;
 
   case 210:
-#line 2935 "Gmsh.y"
+#line 2940 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
       SetOrderN(GModel::current(), (yyvsp[(2) - (3)].d), CTX::instance()->mesh.secondOrderLinear,
@@ -7593,7 +7652,7 @@ yyreduce:
     break;
 
   case 211:
-#line 2948 "Gmsh.y"
+#line 2953 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (6)].d);
@@ -7613,7 +7672,7 @@ yyreduce:
     break;
 
   case 212:
-#line 2965 "Gmsh.y"
+#line 2970 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (8)].d);
@@ -7633,7 +7692,7 @@ yyreduce:
     break;
 
   case 213:
-#line 2982 "Gmsh.y"
+#line 2987 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (8)].d);
@@ -7657,7 +7716,7 @@ yyreduce:
     break;
 
   case 214:
-#line 3003 "Gmsh.y"
+#line 3008 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (10)].d);
@@ -7681,7 +7740,7 @@ yyreduce:
     break;
 
   case 215:
-#line 3024 "Gmsh.y"
+#line 3029 "Gmsh.y"
     {
       if(ImbricatedLoop <= 0){
 	yymsg(0, "Invalid For/EndFor loop");
@@ -7719,7 +7778,7 @@ yyreduce:
     break;
 
   case 216:
-#line 3059 "Gmsh.y"
+#line 3064 "Gmsh.y"
     {
       if(!FunctionManager::Instance()->createFunction
          ((yyvsp[(2) - (2)].c), gmsh_yyin, gmsh_yyname, gmsh_yylineno))
@@ -7730,7 +7789,7 @@ yyreduce:
     break;
 
   case 217:
-#line 3067 "Gmsh.y"
+#line 3072 "Gmsh.y"
     {
       if(!FunctionManager::Instance()->leaveFunction
          (&gmsh_yyin, gmsh_yyname, gmsh_yylineno))
@@ -7739,7 +7798,7 @@ yyreduce:
     break;
 
   case 218:
-#line 3073 "Gmsh.y"
+#line 3078 "Gmsh.y"
     {
       if(!FunctionManager::Instance()->enterFunction
          ((yyvsp[(2) - (3)].c), &gmsh_yyin, gmsh_yyname, gmsh_yylineno))
@@ -7749,20 +7808,20 @@ yyreduce:
     break;
 
   case 219:
-#line 3080 "Gmsh.y"
+#line 3085 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (4)].d)) skip_until("If", "EndIf");
     ;}
     break;
 
   case 220:
-#line 3084 "Gmsh.y"
+#line 3089 "Gmsh.y"
     {
     ;}
     break;
 
   case 221:
-#line 3093 "Gmsh.y"
+#line 3098 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (5)].l),
@@ -7773,7 +7832,7 @@ yyreduce:
     break;
 
   case 222:
-#line 3101 "Gmsh.y"
+#line 3106 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(ROTATE, (yyvsp[(10) - (11)].l),
@@ -7784,7 +7843,7 @@ yyreduce:
     break;
 
   case 223:
-#line 3109 "Gmsh.y"
+#line 3114 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (13)].l),
@@ -7795,15 +7854,16 @@ yyreduce:
     break;
 
   case 224:
-#line 3117 "Gmsh.y"
+#line 3122 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     ;}
     break;
 
   case 225:
-#line 3122 "Gmsh.y"
+#line 3128 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (7)].l),
@@ -7814,15 +7874,16 @@ yyreduce:
     break;
 
   case 226:
-#line 3130 "Gmsh.y"
+#line 3136 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     ;}
     break;
 
   case 227:
-#line 3135 "Gmsh.y"
+#line 3142 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(ROTATE, (yyvsp[(10) - (13)].l),
@@ -7833,15 +7894,16 @@ yyreduce:
     break;
 
   case 228:
-#line 3143 "Gmsh.y"
+#line 3150 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     ;}
     break;
 
   case 229:
-#line 3148 "Gmsh.y"
+#line 3156 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (15)].l),
@@ -7852,15 +7914,16 @@ yyreduce:
     break;
 
   case 230:
-#line 3156 "Gmsh.y"
+#line 3164 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     ;}
     break;
 
   case 231:
-#line 3161 "Gmsh.y"
+#line 3170 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(BOUNDARY_LAYER, (yyvsp[(3) - (6)].l), 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
@@ -7870,7 +7933,7 @@ yyreduce:
     break;
 
   case 232:
-#line 3169 "Gmsh.y"
+#line 3178 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (8)].d),
@@ -7880,7 +7943,7 @@ yyreduce:
     break;
 
   case 233:
-#line 3176 "Gmsh.y"
+#line 3185 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (8)].d),
@@ -7890,7 +7953,7 @@ yyreduce:
     break;
 
   case 234:
-#line 3183 "Gmsh.y"
+#line 3192 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (8)].d),
@@ -7900,7 +7963,7 @@ yyreduce:
     break;
 
   case 235:
-#line 3190 "Gmsh.y"
+#line 3199 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d),
@@ -7910,7 +7973,7 @@ yyreduce:
     break;
 
   case 236:
-#line 3197 "Gmsh.y"
+#line 3206 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d),
@@ -7920,7 +7983,7 @@ yyreduce:
     break;
 
   case 237:
-#line 3204 "Gmsh.y"
+#line 3213 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d),
@@ -7930,7 +7993,7 @@ yyreduce:
     break;
 
   case 238:
-#line 3211 "Gmsh.y"
+#line 3220 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (14)].d),
@@ -7940,7 +8003,7 @@ yyreduce:
     break;
 
   case 239:
-#line 3218 "Gmsh.y"
+#line 3227 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (14)].d),
@@ -7950,7 +8013,7 @@ yyreduce:
     break;
 
   case 240:
-#line 3225 "Gmsh.y"
+#line 3234 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (14)].d),
@@ -7960,15 +8023,16 @@ yyreduce:
     break;
 
   case 241:
-#line 3232 "Gmsh.y"
+#line 3241 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     ;}
     break;
 
   case 242:
-#line 3237 "Gmsh.y"
+#line 3247 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d),
@@ -7978,15 +8042,16 @@ yyreduce:
     break;
 
   case 243:
-#line 3244 "Gmsh.y"
+#line 3254 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     ;}
     break;
 
   case 244:
-#line 3249 "Gmsh.y"
+#line 3260 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d),
@@ -7996,15 +8061,16 @@ yyreduce:
     break;
 
   case 245:
-#line 3256 "Gmsh.y"
+#line 3267 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     ;}
     break;
 
   case 246:
-#line 3261 "Gmsh.y"
+#line 3273 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d),
@@ -8014,15 +8080,16 @@ yyreduce:
     break;
 
   case 247:
-#line 3268 "Gmsh.y"
+#line 3280 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     ;}
     break;
 
   case 248:
-#line 3273 "Gmsh.y"
+#line 3286 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (16)].d),
@@ -8032,15 +8099,16 @@ yyreduce:
     break;
 
   case 249:
-#line 3280 "Gmsh.y"
+#line 3293 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     ;}
     break;
 
   case 250:
-#line 3285 "Gmsh.y"
+#line 3299 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (16)].d),
@@ -8050,15 +8118,16 @@ yyreduce:
     break;
 
   case 251:
-#line 3292 "Gmsh.y"
+#line 3306 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     ;}
     break;
 
   case 252:
-#line 3297 "Gmsh.y"
+#line 3312 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (16)].d),
@@ -8068,15 +8137,16 @@ yyreduce:
     break;
 
   case 253:
-#line 3304 "Gmsh.y"
+#line 3319 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     ;}
     break;
 
   case 254:
-#line 3309 "Gmsh.y"
+#line 3325 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (18)].d),
@@ -8086,15 +8156,16 @@ yyreduce:
     break;
 
   case 255:
-#line 3316 "Gmsh.y"
+#line 3332 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     ;}
     break;
 
   case 256:
-#line 3321 "Gmsh.y"
+#line 3338 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (18)].d),
@@ -8104,15 +8175,16 @@ yyreduce:
     break;
 
   case 257:
-#line 3328 "Gmsh.y"
+#line 3345 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     ;}
     break;
 
   case 258:
-#line 3333 "Gmsh.y"
+#line 3351 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (18)].d),
@@ -8122,19 +8194,19 @@ yyreduce:
     break;
 
   case 259:
-#line 3344 "Gmsh.y"
+#line 3362 "Gmsh.y"
     {
     ;}
     break;
 
   case 260:
-#line 3347 "Gmsh.y"
+#line 3365 "Gmsh.y"
     {
     ;}
     break;
 
   case 261:
-#line 3353 "Gmsh.y"
+#line 3371 "Gmsh.y"
     {
       int n = (int)fabs((yyvsp[(3) - (5)].d));
       if(n){ // we accept n==0 to easily disable layers
@@ -8149,7 +8221,7 @@ yyreduce:
     break;
 
   case 262:
-#line 3365 "Gmsh.y"
+#line 3383 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = true;
       extr.mesh.NbLayer = List_Nbr((yyvsp[(3) - (7)].l));
@@ -8172,7 +8244,7 @@ yyreduce:
     break;
 
   case 263:
-#line 3385 "Gmsh.y"
+#line 3403 "Gmsh.y"
     {
       yymsg(0, "Explicit region numbers in layers are deprecated");
       extr.mesh.ExtrudeMesh = true;
@@ -8198,42 +8270,77 @@ yyreduce:
     break;
 
   case 264:
-#line 3408 "Gmsh.y"
+#line 3427 "Gmsh.y"
     {
-      extr.mesh.Recombine = true;
+      extr.mesh.ScaleLast = true;
     ;}
     break;
 
   case 265:
-#line 3412 "Gmsh.y"
+#line 3432 "Gmsh.y"
     {
-      extr.mesh.QuadToTri = QUADTRI_DBL_1;
+      extr.mesh.Recombine = true;
     ;}
     break;
 
   case 266:
-#line 3416 "Gmsh.y"
+#line 3436 "Gmsh.y"
     {
-      extr.mesh.QuadToTri = QUADTRI_DBL_1_RECOMB;
+      yymsg(0, "Keyword 'QuadTriSngl' deprecated. Use 'QuadTriNoNewVerts' instead.");
     ;}
     break;
 
   case 267:
-#line 3420 "Gmsh.y"
+#line 3440 "Gmsh.y"
     {
-      extr.mesh.QuadToTri = QUADTRI_SNGL_1;
+      yymsg(0, "Keyword 'QuadTriSngl' deprecated. Use 'QuadTriNoNewVerts' instead.");
     ;}
     break;
 
   case 268:
-#line 3424 "Gmsh.y"
+#line 3444 "Gmsh.y"
     {
-      extr.mesh.QuadToTri = QUADTRI_SNGL_1_RECOMB;
+      yymsg(0, "Method 'QuadTriDbl' deprecated. Use 'QuadTriAddVerts' instead, which has no requirement for the number of extrusion layers and meshes with body-centered vertices.");
     ;}
     break;
 
   case 269:
-#line 3428 "Gmsh.y"
+#line 3448 "Gmsh.y"
+    {
+      yymsg(0, "Method 'QuadTriDbl' deprecated. Use 'QuadTriAddVerts' instead, which has no requirement for the number of extrusion layers and meshes with body-centered vertices.");
+    ;}
+    break;
+
+  case 270:
+#line 3452 "Gmsh.y"
+    {
+      extr.mesh.QuadToTri = QUADTRI_ADDVERTS_1;
+    ;}
+    break;
+
+  case 271:
+#line 3456 "Gmsh.y"
+    {
+      extr.mesh.QuadToTri = QUADTRI_ADDVERTS_1_RECOMB;
+    ;}
+    break;
+
+  case 272:
+#line 3460 "Gmsh.y"
+    {
+      extr.mesh.QuadToTri = QUADTRI_NOVERTS_1;
+    ;}
+    break;
+
+  case 273:
+#line 3464 "Gmsh.y"
+    {
+      extr.mesh.QuadToTri = QUADTRI_NOVERTS_1_RECOMB;
+    ;}
+    break;
+
+  case 274:
+#line 3468 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (9)].d);
       if(FindSurface(num)){
@@ -8254,8 +8361,8 @@ yyreduce:
     ;}
     break;
 
-  case 270:
-#line 3447 "Gmsh.y"
+  case 275:
+#line 3487 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (6)].c), "Index"))
         extr.mesh.BoundaryLayerIndex = (yyvsp[(4) - (6)].d);
@@ -8265,15 +8372,15 @@ yyreduce:
     ;}
     break;
 
-  case 271:
-#line 3459 "Gmsh.y"
+  case 276:
+#line 3499 "Gmsh.y"
     {
       (yyval.v)[0] = (yyval.v)[1] = 1.;
     ;}
     break;
 
-  case 272:
-#line 3463 "Gmsh.y"
+  case 277:
+#line 3503 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (3)].c), "Progression") || !strcmp((yyvsp[(2) - (3)].c), "Power"))
         (yyval.v)[0] = 1.;
@@ -8288,15 +8395,15 @@ yyreduce:
     ;}
     break;
 
-  case 273:
-#line 3478 "Gmsh.y"
+  case 278:
+#line 3518 "Gmsh.y"
     {
       (yyval.i) = -1; // left
     ;}
     break;
 
-  case 274:
-#line 3482 "Gmsh.y"
+  case 279:
+#line 3522 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (1)].c), "Right"))
         (yyval.i) = 1;
@@ -8312,36 +8419,36 @@ yyreduce:
     ;}
     break;
 
-  case 275:
-#line 3498 "Gmsh.y"
+  case 280:
+#line 3538 "Gmsh.y"
     {
      (yyval.l) = List_Create(1, 1, sizeof(double));
    ;}
     break;
 
-  case 276:
-#line 3502 "Gmsh.y"
+  case 281:
+#line 3542 "Gmsh.y"
     {
      (yyval.l) = (yyvsp[(2) - (2)].l);
    ;}
     break;
 
-  case 277:
-#line 3507 "Gmsh.y"
+  case 282:
+#line 3547 "Gmsh.y"
     {
       (yyval.i) = 45;
     ;}
     break;
 
-  case 278:
-#line 3511 "Gmsh.y"
+  case 283:
+#line 3551 "Gmsh.y"
     {
       (yyval.i) = (int)(yyvsp[(2) - (2)].d);
     ;}
     break;
 
-  case 279:
-#line 3518 "Gmsh.y"
+  case 284:
+#line 3558 "Gmsh.y"
     {
       int type = (int)(yyvsp[(6) - (7)].v)[0];
       double coef = fabs((yyvsp[(6) - (7)].v)[1]);
@@ -8399,8 +8506,8 @@ yyreduce:
     ;}
     break;
 
-  case 280:
-#line 3574 "Gmsh.y"
+  case 285:
+#line 3614 "Gmsh.y"
     {
       int k = List_Nbr((yyvsp[(4) - (6)].l));
       if(k != 0 && k != 3 && k != 4){
@@ -8472,16 +8579,16 @@ yyreduce:
     ;}
     break;
 
-  case 281:
-#line 3644 "Gmsh.y"
+  case 286:
+#line 3684 "Gmsh.y"
     {
       yymsg(1, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)");
       List_Delete((yyvsp[(7) - (8)].l));
     ;}
     break;
 
-  case 282:
-#line 3649 "Gmsh.y"
+  case 287:
+#line 3689 "Gmsh.y"
     {
       int k = List_Nbr((yyvsp[(4) - (5)].l));
       if(k != 0 && k != 6 && k != 8){
@@ -8550,8 +8657,8 @@ yyreduce:
     ;}
     break;
 
-  case 283:
-#line 3716 "Gmsh.y"
+  case 288:
+#line 3756 "Gmsh.y"
     {
       if(!(yyvsp[(2) - (3)].l)){
   	  List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Volumes);
@@ -8589,8 +8696,8 @@ yyreduce:
     ;}
     break;
 
-  case 284:
-#line 3752 "Gmsh.y"
+  case 289:
+#line 3792 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (7)].l)); i++){
 	double d;
@@ -8600,8 +8707,8 @@ yyreduce:
     ;}
     break;
 
-  case 285:
-#line 3760 "Gmsh.y"
+  case 290:
+#line 3800 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (5)].l)){
 	List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
@@ -8646,8 +8753,8 @@ yyreduce:
     ;}
     break;
 
-  case 286:
-#line 3803 "Gmsh.y"
+  case 291:
+#line 3843 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (4)].l)){
 	List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Volumes);
@@ -8688,8 +8795,8 @@ yyreduce:
     ;}
     break;
 
-  case 287:
-#line 3842 "Gmsh.y"
+  case 292:
+#line 3882 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){
 	double d;
@@ -8711,8 +8818,8 @@ yyreduce:
     ;}
     break;
 
-  case 288:
-#line 3862 "Gmsh.y"
+  case 293:
+#line 3902 "Gmsh.y"
     {
       if(List_Nbr((yyvsp[(5) - (6)].l)) != List_Nbr((yyvsp[(3) - (6)].l))){
 	yymsg(0, "Number of master (%d) different from number of slave (%d) lines",
@@ -8741,8 +8848,8 @@ yyreduce:
     ;}
     break;
 
-  case 289:
-#line 3890 "Gmsh.y"
+  case 294:
+#line 3930 "Gmsh.y"
     {
       if (List_Nbr((yyvsp[(5) - (12)].l)) != List_Nbr((yyvsp[(10) - (12)].l))){
 	yymsg(0, "Number of master surface edges (%d) different from number of "
@@ -8783,8 +8890,8 @@ yyreduce:
     ;}
     break;
 
-  case 290:
-#line 3929 "Gmsh.y"
+  case 295:
+#line 3969 "Gmsh.y"
     {
       Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d));
       if(s){
@@ -8809,8 +8916,8 @@ yyreduce:
     ;}
     break;
 
-  case 291:
-#line 3952 "Gmsh.y"
+  case 296:
+#line 3992 "Gmsh.y"
     {
       Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d));
       if(s){
@@ -8835,22 +8942,22 @@ yyreduce:
     ;}
     break;
 
-  case 292:
-#line 3975 "Gmsh.y"
+  case 297:
+#line 4015 "Gmsh.y"
     {
       Msg::Error("Point in Volume not implemented yet");
     ;}
     break;
 
-  case 293:
-#line 3979 "Gmsh.y"
+  case 298:
+#line 4019 "Gmsh.y"
     {
       Msg::Error("Line in Volume not implemented yet");
     ;}
     break;
 
-  case 294:
-#line 3983 "Gmsh.y"
+  case 299:
+#line 4023 "Gmsh.y"
     {
       Volume *v = FindVolume((int)(yyvsp[(8) - (10)].d));
       if(v){
@@ -8875,8 +8982,8 @@ yyreduce:
     ;}
     break;
 
-  case 295:
-#line 4006 "Gmsh.y"
+  case 300:
+#line 4046 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (4)].l)){
 	List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
@@ -8917,8 +9024,8 @@ yyreduce:
     ;}
     break;
 
-  case 296:
-#line 4045 "Gmsh.y"
+  case 301:
+#line 4085 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (4)].l)){
 	List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Curves);
@@ -8959,15 +9066,15 @@ yyreduce:
     ;}
     break;
 
-  case 297:
-#line 4090 "Gmsh.y"
+  case 302:
+#line 4130 "Gmsh.y"
     {
       ReplaceAllDuplicates();
     ;}
     break;
 
-  case 298:
-#line 4094 "Gmsh.y"
+  case 303:
+#line 4134 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (3)].c), "Geometry"))
         ReplaceAllDuplicates();
@@ -8979,8 +9086,8 @@ yyreduce:
     ;}
     break;
 
-  case 299:
-#line 4104 "Gmsh.y"
+  case 304:
+#line 4144 "Gmsh.y"
     {
       if(List_Nbr((yyvsp[(4) - (6)].l)) >= 2){
         double d;
@@ -9012,23 +9119,23 @@ yyreduce:
     ;}
     break;
 
-  case 300:
-#line 4138 "Gmsh.y"
+  case 305:
+#line 4178 "Gmsh.y"
     { (yyval.c) = (char*)"Homology"; ;}
     break;
 
-  case 301:
-#line 4139 "Gmsh.y"
+  case 306:
+#line 4179 "Gmsh.y"
     { (yyval.c) = (char*)"Cohomology"; ;}
     break;
 
-  case 302:
-#line 4140 "Gmsh.y"
+  case 307:
+#line 4180 "Gmsh.y"
     { (yyval.c) = (char*)"Betti"; ;}
     break;
 
-  case 303:
-#line 4145 "Gmsh.y"
+  case 308:
+#line 4185 "Gmsh.y"
     {
       std::vector<int> domain, subdomain, dim;
       for(int i = 0; i < 4; i++) dim.push_back(i);
@@ -9036,8 +9143,8 @@ yyreduce:
     ;}
     break;
 
-  case 304:
-#line 4151 "Gmsh.y"
+  case 309:
+#line 4191 "Gmsh.y"
     {
       std::vector<int> domain, subdomain, dim;
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (5)].l)); i++){
@@ -9051,8 +9158,8 @@ yyreduce:
     ;}
     break;
 
-  case 305:
-#line 4163 "Gmsh.y"
+  case 310:
+#line 4203 "Gmsh.y"
     {
       std::vector<int> domain, subdomain, dim;
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (7)].l)); i++){
@@ -9072,8 +9179,8 @@ yyreduce:
     ;}
     break;
 
-  case 306:
-#line 4181 "Gmsh.y"
+  case 311:
+#line 4221 "Gmsh.y"
     {
       std::vector<int> domain, subdomain, dim;
       for(int i = 0; i < List_Nbr((yyvsp[(6) - (10)].l)); i++){
@@ -9098,48 +9205,48 @@ yyreduce:
     ;}
     break;
 
-  case 307:
-#line 4208 "Gmsh.y"
+  case 312:
+#line 4248 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (1)].d);           ;}
     break;
 
-  case 308:
-#line 4209 "Gmsh.y"
+  case 313:
+#line 4249 "Gmsh.y"
     { (yyval.d) = (yyvsp[(2) - (3)].d);           ;}
     break;
 
-  case 309:
-#line 4210 "Gmsh.y"
+  case 314:
+#line 4250 "Gmsh.y"
     { (yyval.d) = -(yyvsp[(2) - (2)].d);          ;}
     break;
 
-  case 310:
-#line 4211 "Gmsh.y"
+  case 315:
+#line 4251 "Gmsh.y"
     { (yyval.d) = (yyvsp[(2) - (2)].d);           ;}
     break;
 
-  case 311:
-#line 4212 "Gmsh.y"
+  case 316:
+#line 4252 "Gmsh.y"
     { (yyval.d) = !(yyvsp[(2) - (2)].d);          ;}
     break;
 
-  case 312:
-#line 4213 "Gmsh.y"
+  case 317:
+#line 4253 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d);      ;}
     break;
 
-  case 313:
-#line 4214 "Gmsh.y"
+  case 318:
+#line 4254 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d);      ;}
     break;
 
-  case 314:
-#line 4215 "Gmsh.y"
+  case 319:
+#line 4255 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d);      ;}
     break;
 
-  case 315:
-#line 4217 "Gmsh.y"
+  case 320:
+#line 4257 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (3)].d))
 	yymsg(0, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d));
@@ -9148,318 +9255,318 @@ yyreduce:
     ;}
     break;
 
-  case 316:
-#line 4223 "Gmsh.y"
+  case 321:
+#line 4263 "Gmsh.y"
     { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d);  ;}
     break;
 
-  case 317:
-#line 4224 "Gmsh.y"
+  case 322:
+#line 4264 "Gmsh.y"
     { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d));  ;}
     break;
 
-  case 318:
-#line 4225 "Gmsh.y"
+  case 323:
+#line 4265 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d);      ;}
     break;
 
-  case 319:
-#line 4226 "Gmsh.y"
+  case 324:
+#line 4266 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d);      ;}
     break;
 
-  case 320:
-#line 4227 "Gmsh.y"
+  case 325:
+#line 4267 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d);     ;}
     break;
 
-  case 321:
-#line 4228 "Gmsh.y"
+  case 326:
+#line 4268 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d);     ;}
     break;
 
-  case 322:
-#line 4229 "Gmsh.y"
+  case 327:
+#line 4269 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d);     ;}
     break;
 
-  case 323:
-#line 4230 "Gmsh.y"
+  case 328:
+#line 4270 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d);     ;}
     break;
 
-  case 324:
-#line 4231 "Gmsh.y"
+  case 329:
+#line 4271 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d);     ;}
     break;
 
-  case 325:
-#line 4232 "Gmsh.y"
+  case 330:
+#line 4272 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d);     ;}
     break;
 
-  case 326:
-#line 4233 "Gmsh.y"
+  case 331:
+#line 4273 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;}
     break;
 
-  case 327:
-#line 4234 "Gmsh.y"
+  case 332:
+#line 4274 "Gmsh.y"
     { (yyval.d) = exp((yyvsp[(3) - (4)].d));      ;}
     break;
 
-  case 328:
-#line 4235 "Gmsh.y"
+  case 333:
+#line 4275 "Gmsh.y"
     { (yyval.d) = log((yyvsp[(3) - (4)].d));      ;}
     break;
 
-  case 329:
-#line 4236 "Gmsh.y"
+  case 334:
+#line 4276 "Gmsh.y"
     { (yyval.d) = log10((yyvsp[(3) - (4)].d));    ;}
     break;
 
-  case 330:
-#line 4237 "Gmsh.y"
+  case 335:
+#line 4277 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 331:
-#line 4238 "Gmsh.y"
+  case 336:
+#line 4278 "Gmsh.y"
     { (yyval.d) = sin((yyvsp[(3) - (4)].d));      ;}
     break;
 
-  case 332:
-#line 4239 "Gmsh.y"
+  case 337:
+#line 4279 "Gmsh.y"
     { (yyval.d) = asin((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 333:
-#line 4240 "Gmsh.y"
+  case 338:
+#line 4280 "Gmsh.y"
     { (yyval.d) = cos((yyvsp[(3) - (4)].d));      ;}
     break;
 
-  case 334:
-#line 4241 "Gmsh.y"
+  case 339:
+#line 4281 "Gmsh.y"
     { (yyval.d) = acos((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 335:
-#line 4242 "Gmsh.y"
+  case 340:
+#line 4282 "Gmsh.y"
     { (yyval.d) = tan((yyvsp[(3) - (4)].d));      ;}
     break;
 
-  case 336:
-#line 4243 "Gmsh.y"
+  case 341:
+#line 4283 "Gmsh.y"
     { (yyval.d) = atan((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 337:
-#line 4244 "Gmsh.y"
+  case 342:
+#line 4284 "Gmsh.y"
     { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;}
     break;
 
-  case 338:
-#line 4245 "Gmsh.y"
+  case 343:
+#line 4285 "Gmsh.y"
     { (yyval.d) = sinh((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 339:
-#line 4246 "Gmsh.y"
+  case 344:
+#line 4286 "Gmsh.y"
     { (yyval.d) = cosh((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 340:
-#line 4247 "Gmsh.y"
+  case 345:
+#line 4287 "Gmsh.y"
     { (yyval.d) = tanh((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 341:
-#line 4248 "Gmsh.y"
+  case 346:
+#line 4288 "Gmsh.y"
     { (yyval.d) = fabs((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 342:
-#line 4249 "Gmsh.y"
+  case 347:
+#line 4289 "Gmsh.y"
     { (yyval.d) = floor((yyvsp[(3) - (4)].d));    ;}
     break;
 
-  case 343:
-#line 4250 "Gmsh.y"
+  case 348:
+#line 4290 "Gmsh.y"
     { (yyval.d) = ceil((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 344:
-#line 4251 "Gmsh.y"
+  case 349:
+#line 4291 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
-  case 345:
-#line 4252 "Gmsh.y"
+  case 350:
+#line 4292 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
-  case 346:
-#line 4253 "Gmsh.y"
+  case 351:
+#line 4293 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;}
     break;
 
-  case 347:
-#line 4254 "Gmsh.y"
+  case 352:
+#line 4294 "Gmsh.y"
     { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;}
     break;
 
-  case 348:
-#line 4257 "Gmsh.y"
+  case 353:
+#line 4297 "Gmsh.y"
     { (yyval.d) = exp((yyvsp[(3) - (4)].d));      ;}
     break;
 
-  case 349:
-#line 4258 "Gmsh.y"
+  case 354:
+#line 4298 "Gmsh.y"
     { (yyval.d) = log((yyvsp[(3) - (4)].d));      ;}
     break;
 
-  case 350:
-#line 4259 "Gmsh.y"
+  case 355:
+#line 4299 "Gmsh.y"
     { (yyval.d) = log10((yyvsp[(3) - (4)].d));    ;}
     break;
 
-  case 351:
-#line 4260 "Gmsh.y"
+  case 356:
+#line 4300 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 352:
-#line 4261 "Gmsh.y"
+  case 357:
+#line 4301 "Gmsh.y"
     { (yyval.d) = sin((yyvsp[(3) - (4)].d));      ;}
     break;
 
-  case 353:
-#line 4262 "Gmsh.y"
+  case 358:
+#line 4302 "Gmsh.y"
     { (yyval.d) = asin((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 354:
-#line 4263 "Gmsh.y"
+  case 359:
+#line 4303 "Gmsh.y"
     { (yyval.d) = cos((yyvsp[(3) - (4)].d));      ;}
     break;
 
-  case 355:
-#line 4264 "Gmsh.y"
+  case 360:
+#line 4304 "Gmsh.y"
     { (yyval.d) = acos((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 356:
-#line 4265 "Gmsh.y"
+  case 361:
+#line 4305 "Gmsh.y"
     { (yyval.d) = tan((yyvsp[(3) - (4)].d));      ;}
     break;
 
-  case 357:
-#line 4266 "Gmsh.y"
+  case 362:
+#line 4306 "Gmsh.y"
     { (yyval.d) = atan((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 358:
-#line 4267 "Gmsh.y"
+  case 363:
+#line 4307 "Gmsh.y"
     { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;}
     break;
 
-  case 359:
-#line 4268 "Gmsh.y"
+  case 364:
+#line 4308 "Gmsh.y"
     { (yyval.d) = sinh((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 360:
-#line 4269 "Gmsh.y"
+  case 365:
+#line 4309 "Gmsh.y"
     { (yyval.d) = cosh((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 361:
-#line 4270 "Gmsh.y"
+  case 366:
+#line 4310 "Gmsh.y"
     { (yyval.d) = tanh((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 362:
-#line 4271 "Gmsh.y"
+  case 367:
+#line 4311 "Gmsh.y"
     { (yyval.d) = fabs((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 363:
-#line 4272 "Gmsh.y"
+  case 368:
+#line 4312 "Gmsh.y"
     { (yyval.d) = floor((yyvsp[(3) - (4)].d));    ;}
     break;
 
-  case 364:
-#line 4273 "Gmsh.y"
+  case 369:
+#line 4313 "Gmsh.y"
     { (yyval.d) = ceil((yyvsp[(3) - (4)].d));     ;}
     break;
 
-  case 365:
-#line 4274 "Gmsh.y"
+  case 370:
+#line 4314 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
-  case 366:
-#line 4275 "Gmsh.y"
+  case 371:
+#line 4315 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
-  case 367:
-#line 4276 "Gmsh.y"
+  case 372:
+#line 4316 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;}
     break;
 
-  case 368:
-#line 4277 "Gmsh.y"
+  case 373:
+#line 4317 "Gmsh.y"
     { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;}
     break;
 
-  case 369:
-#line 4286 "Gmsh.y"
+  case 374:
+#line 4326 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (1)].d); ;}
     break;
 
-  case 370:
-#line 4287 "Gmsh.y"
+  case 375:
+#line 4327 "Gmsh.y"
     { (yyval.d) = 3.141592653589793; ;}
     break;
 
-  case 371:
-#line 4288 "Gmsh.y"
+  case 376:
+#line 4328 "Gmsh.y"
     { (yyval.d) = Msg::GetCommRank(); ;}
     break;
 
-  case 372:
-#line 4289 "Gmsh.y"
+  case 377:
+#line 4329 "Gmsh.y"
     { (yyval.d) = Msg::GetCommSize(); ;}
     break;
 
-  case 373:
-#line 4290 "Gmsh.y"
+  case 378:
+#line 4330 "Gmsh.y"
     { (yyval.d) = GetGmshMajorVersion(); ;}
     break;
 
-  case 374:
-#line 4291 "Gmsh.y"
+  case 379:
+#line 4331 "Gmsh.y"
     { (yyval.d) = GetGmshMinorVersion(); ;}
     break;
 
-  case 375:
-#line 4292 "Gmsh.y"
+  case 380:
+#line 4332 "Gmsh.y"
     { (yyval.d) = GetGmshPatchVersion(); ;}
     break;
 
-  case 376:
-#line 4293 "Gmsh.y"
+  case 381:
+#line 4333 "Gmsh.y"
     { (yyval.d) = Cpu(); ;}
     break;
 
-  case 377:
-#line 4294 "Gmsh.y"
+  case 382:
+#line 4334 "Gmsh.y"
     { (yyval.d) = GetMemoryUsage()/1024./1024.; ;}
     break;
 
-  case 378:
-#line 4299 "Gmsh.y"
+  case 383:
+#line 4339 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (1)].c))){
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (1)].c));
@@ -9478,8 +9585,8 @@ yyreduce:
     ;}
     break;
 
-  case 379:
-#line 4320 "Gmsh.y"
+  case 384:
+#line 4360 "Gmsh.y"
     {
       char tmpstring[1024];
       sprintf(tmpstring, "%s_%d", (yyvsp[(1) - (5)].c), (int)(yyvsp[(4) - (5)].d)) ;
@@ -9500,8 +9607,8 @@ yyreduce:
     ;}
     break;
 
-  case 380:
-#line 4339 "Gmsh.y"
+  case 385:
+#line 4379 "Gmsh.y"
     {
       int index = (int)(yyvsp[(3) - (4)].d);
       if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){
@@ -9521,8 +9628,8 @@ yyreduce:
     ;}
     break;
 
-  case 381:
-#line 4357 "Gmsh.y"
+  case 386:
+#line 4397 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(2) - (4)].c));
@@ -9536,8 +9643,8 @@ yyreduce:
     ;}
     break;
 
-  case 382:
-#line 4369 "Gmsh.y"
+  case 387:
+#line 4409 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (2)].c));
@@ -9556,8 +9663,8 @@ yyreduce:
     ;}
     break;
 
-  case 383:
-#line 4386 "Gmsh.y"
+  case 388:
+#line 4426 "Gmsh.y"
     {
       int index = (int)(yyvsp[(3) - (5)].d);
       if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){
@@ -9577,24 +9684,24 @@ yyreduce:
     ;}
     break;
 
-  case 384:
-#line 4407 "Gmsh.y"
+  case 389:
+#line 4447 "Gmsh.y"
     {
       NumberOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), (yyval.d));
       Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c));
     ;}
     break;
 
-  case 385:
-#line 4412 "Gmsh.y"
+  case 390:
+#line 4452 "Gmsh.y"
     {
       NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), (yyval.d));
       Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c));
     ;}
     break;
 
-  case 386:
-#line 4417 "Gmsh.y"
+  case 391:
+#line 4457 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (4)].c), 0, (yyvsp[(3) - (4)].c), d)){
@@ -9606,8 +9713,8 @@ yyreduce:
     ;}
     break;
 
-  case 387:
-#line 4427 "Gmsh.y"
+  case 392:
+#line 4467 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c), d)){
@@ -9619,16 +9726,16 @@ yyreduce:
     ;}
     break;
 
-  case 388:
-#line 4437 "Gmsh.y"
+  case 393:
+#line 4477 "Gmsh.y"
     {
       (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d));
       Free((yyvsp[(3) - (6)].c));
     ;}
     break;
 
-  case 389:
-#line 4442 "Gmsh.y"
+  case 394:
+#line 4482 "Gmsh.y"
     {
       std::string s((yyvsp[(3) - (6)].c)), substr((yyvsp[(5) - (6)].c));
       if(s.find(substr) != std::string::npos)
@@ -9639,16 +9746,16 @@ yyreduce:
     ;}
     break;
 
-  case 390:
-#line 4451 "Gmsh.y"
+  case 395:
+#line 4491 "Gmsh.y"
     {
       (yyval.d) = strcmp((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c));
       Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c));
     ;}
     break;
 
-  case 391:
-#line 4456 "Gmsh.y"
+  case 396:
+#line 4496 "Gmsh.y"
     {
       int align = 0, font = 0, fontsize = CTX::instance()->glFontSize;
       if(List_Nbr((yyvsp[(3) - (4)].l)) % 2){
@@ -9674,116 +9781,116 @@ yyreduce:
     ;}
     break;
 
-  case 392:
-#line 4483 "Gmsh.y"
+  case 397:
+#line 4523 "Gmsh.y"
     {
       memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double));
     ;}
     break;
 
-  case 393:
-#line 4487 "Gmsh.y"
+  case 398:
+#line 4527 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i];
     ;}
     break;
 
-  case 394:
-#line 4491 "Gmsh.y"
+  case 399:
+#line 4531 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i];
     ;}
     break;
 
-  case 395:
-#line 4495 "Gmsh.y"
+  case 400:
+#line 4535 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i];
     ;}
     break;
 
-  case 396:
-#line 4499 "Gmsh.y"
+  case 401:
+#line 4539 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i];
     ;}
     break;
 
-  case 397:
-#line 4506 "Gmsh.y"
+  case 402:
+#line 4546 "Gmsh.y"
     {
       (yyval.v)[0] = (yyvsp[(2) - (11)].d);  (yyval.v)[1] = (yyvsp[(4) - (11)].d);  (yyval.v)[2] = (yyvsp[(6) - (11)].d);  (yyval.v)[3] = (yyvsp[(8) - (11)].d); (yyval.v)[4] = (yyvsp[(10) - (11)].d);
     ;}
     break;
 
-  case 398:
-#line 4510 "Gmsh.y"
+  case 403:
+#line 4550 "Gmsh.y"
     {
       (yyval.v)[0] = (yyvsp[(2) - (9)].d);  (yyval.v)[1] = (yyvsp[(4) - (9)].d);  (yyval.v)[2] = (yyvsp[(6) - (9)].d);  (yyval.v)[3] = (yyvsp[(8) - (9)].d); (yyval.v)[4] = 1.0;
     ;}
     break;
 
-  case 399:
-#line 4514 "Gmsh.y"
+  case 404:
+#line 4554 "Gmsh.y"
     {
       (yyval.v)[0] = (yyvsp[(2) - (7)].d);  (yyval.v)[1] = (yyvsp[(4) - (7)].d);  (yyval.v)[2] = (yyvsp[(6) - (7)].d);  (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0;
     ;}
     break;
 
-  case 400:
-#line 4518 "Gmsh.y"
+  case 405:
+#line 4558 "Gmsh.y"
     {
       (yyval.v)[0] = (yyvsp[(2) - (7)].d);  (yyval.v)[1] = (yyvsp[(4) - (7)].d);  (yyval.v)[2] = (yyvsp[(6) - (7)].d);  (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0;
     ;}
     break;
 
-  case 401:
-#line 4525 "Gmsh.y"
+  case 406:
+#line 4565 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(List_T*));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].l)));
     ;}
     break;
 
-  case 402:
-#line 4530 "Gmsh.y"
+  case 407:
+#line 4570 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].l)));
     ;}
     break;
 
-  case 403:
-#line 4537 "Gmsh.y"
+  case 408:
+#line 4577 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
     ;}
     break;
 
-  case 404:
-#line 4542 "Gmsh.y"
+  case 409:
+#line 4582 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(1) - (1)].l);
     ;}
     break;
 
-  case 405:
-#line 4546 "Gmsh.y"
+  case 410:
+#line 4586 "Gmsh.y"
     {
       // creates an empty list
       (yyval.l) = List_Create(2, 1, sizeof(double));
     ;}
     break;
 
-  case 406:
-#line 4551 "Gmsh.y"
+  case 411:
+#line 4591 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (3)].l);
     ;}
     break;
 
-  case 407:
-#line 4555 "Gmsh.y"
+  case 412:
+#line 4595 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(3) - (4)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -9793,8 +9900,8 @@ yyreduce:
     ;}
     break;
 
-  case 408:
-#line 4563 "Gmsh.y"
+  case 413:
+#line 4603 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(4) - (5)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -9804,15 +9911,15 @@ yyreduce:
     ;}
     break;
 
-  case 409:
-#line 4574 "Gmsh.y"
+  case 414:
+#line 4614 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(1) - (1)].l);
     ;}
     break;
 
-  case 410:
-#line 4578 "Gmsh.y"
+  case 415:
+#line 4618 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all"))
         (yyval.l) = 0;
@@ -9823,8 +9930,8 @@ yyreduce:
     ;}
     break;
 
-  case 411:
-#line 4590 "Gmsh.y"
+  case 416:
+#line 4630 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (2)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -9834,8 +9941,8 @@ yyreduce:
     ;}
     break;
 
-  case 412:
-#line 4598 "Gmsh.y"
+  case 417:
+#line 4638 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(3) - (3)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -9845,8 +9952,8 @@ yyreduce:
     ;}
     break;
 
-  case 413:
-#line 4606 "Gmsh.y"
+  case 418:
+#line 4646 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       for(double d = (yyvsp[(1) - (3)].d); ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d <= (yyvsp[(3) - (3)].d)) : (d >= (yyvsp[(3) - (3)].d));
@@ -9855,8 +9962,8 @@ yyreduce:
     ;}
     break;
 
-  case 414:
-#line 4613 "Gmsh.y"
+  case 419:
+#line 4653 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!(yyvsp[(5) - (5)].d)){  //|| ($1 < $3 && $5 < 0) || ($1 > $3 && $5 > 0)
@@ -9868,8 +9975,8 @@ yyreduce:
    ;}
     break;
 
-  case 415:
-#line 4623 "Gmsh.y"
+  case 420:
+#line 4663 "Gmsh.y"
     {
       // Returns the coordinates of a point and fills a list with it.
       // This allows to ensure e.g. that relative point positions are
@@ -9891,36 +9998,36 @@ yyreduce:
     ;}
     break;
 
-  case 416:
-#line 4643 "Gmsh.y"
+  case 421:
+#line 4683 "Gmsh.y"
     {
       (yyval.l) = GetAllEntityNumbers(0);
     ;}
     break;
 
-  case 417:
-#line 4647 "Gmsh.y"
+  case 422:
+#line 4687 "Gmsh.y"
     {
       (yyval.l) = GetAllEntityNumbers(1);
     ;}
     break;
 
-  case 418:
-#line 4651 "Gmsh.y"
+  case 423:
+#line 4691 "Gmsh.y"
     {
       (yyval.l) = GetAllEntityNumbers(2);
     ;}
     break;
 
-  case 419:
-#line 4655 "Gmsh.y"
+  case 424:
+#line 4695 "Gmsh.y"
     {
       (yyval.l) = GetAllEntityNumbers(3);
     ;}
     break;
 
-  case 420:
-#line 4659 "Gmsh.y"
+  case 425:
+#line 4699 "Gmsh.y"
     {
       (yyval.l) = List_Create(10, 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
@@ -9951,8 +10058,8 @@ yyreduce:
     ;}
     break;
 
-  case 421:
-#line 4688 "Gmsh.y"
+  case 426:
+#line 4728 "Gmsh.y"
     {
       (yyval.l) = List_Create(10, 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
@@ -9983,8 +10090,8 @@ yyreduce:
     ;}
     break;
 
-  case 422:
-#line 4717 "Gmsh.y"
+  case 427:
+#line 4757 "Gmsh.y"
     {
       (yyval.l) = List_Create(10, 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
@@ -10015,8 +10122,8 @@ yyreduce:
     ;}
     break;
 
-  case 423:
-#line 4746 "Gmsh.y"
+  case 428:
+#line 4786 "Gmsh.y"
     {
       (yyval.l) = List_Create(10, 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
@@ -10047,8 +10154,8 @@ yyreduce:
     ;}
     break;
 
-  case 424:
-#line 4775 "Gmsh.y"
+  case 429:
+#line 4815 "Gmsh.y"
     {
       (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){
@@ -10060,8 +10167,8 @@ yyreduce:
     ;}
     break;
 
-  case 425:
-#line 4785 "Gmsh.y"
+  case 430:
+#line 4825 "Gmsh.y"
     {
       (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){
@@ -10073,8 +10180,8 @@ yyreduce:
     ;}
     break;
 
-  case 426:
-#line 4795 "Gmsh.y"
+  case 431:
+#line 4835 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
@@ -10088,8 +10195,8 @@ yyreduce:
     ;}
     break;
 
-  case 427:
-#line 4808 "Gmsh.y"
+  case 432:
+#line 4848 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
@@ -10103,8 +10210,8 @@ yyreduce:
     ;}
     break;
 
-  case 428:
-#line 4820 "Gmsh.y"
+  case 433:
+#line 4860 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(3) - (4)].c)))
@@ -10118,8 +10225,8 @@ yyreduce:
     ;}
     break;
 
-  case 429:
-#line 4832 "Gmsh.y"
+  case 434:
+#line 4872 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
@@ -10139,8 +10246,8 @@ yyreduce:
     ;}
     break;
 
-  case 430:
-#line 4851 "Gmsh.y"
+  case 435:
+#line 4891 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
@@ -10160,30 +10267,30 @@ yyreduce:
     ;}
     break;
 
-  case 431:
-#line 4872 "Gmsh.y"
+  case 436:
+#line 4912 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
     ;}
     break;
 
-  case 432:
-#line 4877 "Gmsh.y"
+  case 437:
+#line 4917 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(1) - (1)].l);
     ;}
     break;
 
-  case 433:
-#line 4881 "Gmsh.y"
+  case 438:
+#line 4921 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].d)));
     ;}
     break;
 
-  case 434:
-#line 4885 "Gmsh.y"
+  case 439:
+#line 4925 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){
 	double d;
@@ -10194,22 +10301,22 @@ yyreduce:
     ;}
     break;
 
-  case 435:
-#line 4897 "Gmsh.y"
+  case 440:
+#line 4937 "Gmsh.y"
     {
       (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d));
     ;}
     break;
 
-  case 436:
-#line 4901 "Gmsh.y"
+  case 441:
+#line 4941 "Gmsh.y"
     {
       (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255);
     ;}
     break;
 
-  case 437:
-#line 4913 "Gmsh.y"
+  case 442:
+#line 4953 "Gmsh.y"
     {
       int flag;
       (yyval.u) = GetColorForString(-1, (yyvsp[(1) - (1)].c), &flag);
@@ -10218,8 +10325,8 @@ yyreduce:
     ;}
     break;
 
-  case 438:
-#line 4920 "Gmsh.y"
+  case 443:
+#line 4960 "Gmsh.y"
     {
       unsigned int val = 0;
       ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val);
@@ -10228,15 +10335,15 @@ yyreduce:
     ;}
     break;
 
-  case 439:
-#line 4930 "Gmsh.y"
+  case 444:
+#line 4970 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (3)].l);
     ;}
     break;
 
-  case 440:
-#line 4934 "Gmsh.y"
+  case 445:
+#line 4974 "Gmsh.y"
     {
       (yyval.l) = List_Create(256, 10, sizeof(unsigned int));
       GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (6)].d));
@@ -10250,30 +10357,30 @@ yyreduce:
     ;}
     break;
 
-  case 441:
-#line 4949 "Gmsh.y"
+  case 446:
+#line 4989 "Gmsh.y"
     {
       (yyval.l) = List_Create(256, 10, sizeof(unsigned int));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].u)));
     ;}
     break;
 
-  case 442:
-#line 4954 "Gmsh.y"
+  case 447:
+#line 4994 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].u)));
     ;}
     break;
 
-  case 443:
-#line 4961 "Gmsh.y"
+  case 448:
+#line 5001 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(1) - (1)].c);
     ;}
     break;
 
-  case 444:
-#line 4965 "Gmsh.y"
+  case 449:
+#line 5005 "Gmsh.y"
     {
       if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){
 	yymsg(0, "Unknown string variable '%s'", (yyvsp[(1) - (1)].c));
@@ -10288,8 +10395,8 @@ yyreduce:
     ;}
     break;
 
-  case 445:
-#line 4978 "Gmsh.y"
+  case 450:
+#line 5018 "Gmsh.y"
     {
       std::string out;
       StringOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), out);
@@ -10299,8 +10406,8 @@ yyreduce:
     ;}
     break;
 
-  case 446:
-#line 4986 "Gmsh.y"
+  case 451:
+#line 5026 "Gmsh.y"
     {
       std::string out;
       StringOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), out);
@@ -10310,15 +10417,15 @@ yyreduce:
     ;}
     break;
 
-  case 447:
-#line 4997 "Gmsh.y"
+  case 452:
+#line 5037 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(1) - (1)].c);
     ;}
     break;
 
-  case 448:
-#line 5001 "Gmsh.y"
+  case 453:
+#line 5041 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc(32 * sizeof(char));
       time_t now;
@@ -10328,8 +10435,8 @@ yyreduce:
     ;}
     break;
 
-  case 449:
-#line 5009 "Gmsh.y"
+  case 454:
+#line 5049 "Gmsh.y"
     {
       const char *env = GetEnvironmentVar((yyvsp[(3) - (4)].c));
       if(!env) env = "";
@@ -10339,8 +10446,8 @@ yyreduce:
     ;}
     break;
 
-  case 450:
-#line 5017 "Gmsh.y"
+  case 455:
+#line 5057 "Gmsh.y"
     {
       std::string s = Msg::GetString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c));
       (yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char));
@@ -10350,8 +10457,8 @@ yyreduce:
     ;}
     break;
 
-  case 451:
-#line 5025 "Gmsh.y"
+  case 456:
+#line 5065 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (6)].c)) + strlen((yyvsp[(5) - (6)].c)) + 1) * sizeof(char));
       strcpy((yyval.c), (yyvsp[(3) - (6)].c));
@@ -10361,8 +10468,8 @@ yyreduce:
     ;}
     break;
 
-  case 452:
-#line 5033 "Gmsh.y"
+  case 457:
+#line 5073 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char));
       int i;
@@ -10378,8 +10485,8 @@ yyreduce:
     ;}
     break;
 
-  case 453:
-#line 5047 "Gmsh.y"
+  case 458:
+#line 5087 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char));
       int i;
@@ -10395,8 +10502,8 @@ yyreduce:
     ;}
     break;
 
-  case 454:
-#line 5061 "Gmsh.y"
+  case 459:
+#line 5101 "Gmsh.y"
     {
       std::string input = (yyvsp[(3) - (8)].c);
       std::string substr_old = (yyvsp[(5) - (8)].c);
@@ -10410,8 +10517,8 @@ yyreduce:
     ;}
     break;
 
-  case 455:
-#line 5073 "Gmsh.y"
+  case 460:
+#line 5113 "Gmsh.y"
     {
       int size = 0;
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++)
@@ -10429,8 +10536,8 @@ yyreduce:
     ;}
     break;
 
-  case 456:
-#line 5090 "Gmsh.y"
+  case 461:
+#line 5130 "Gmsh.y"
     {
       int size = 0;
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++)
@@ -10448,22 +10555,22 @@ yyreduce:
     ;}
     break;
 
-  case 457:
-#line 5106 "Gmsh.y"
+  case 462:
+#line 5146 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(3) - (4)].c);
     ;}
     break;
 
-  case 458:
-#line 5111 "Gmsh.y"
+  case 463:
+#line 5151 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(3) - (4)].c);
     ;}
     break;
 
-  case 459:
-#line 5115 "Gmsh.y"
+  case 464:
+#line 5155 "Gmsh.y"
     {
       char tmpstring[5000];
       int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring);
@@ -10484,8 +10591,8 @@ yyreduce:
     ;}
     break;
 
-  case 460:
-#line 5135 "Gmsh.y"
+  case 465:
+#line 5175 "Gmsh.y"
     {
       char tmpstring[5000];
       int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring);
@@ -10506,22 +10613,22 @@ yyreduce:
     ;}
     break;
 
-  case 461:
-#line 5157 "Gmsh.y"
+  case 466:
+#line 5197 "Gmsh.y"
     {
       (yyval.l) = List_Create(20,20,sizeof(char*));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].c)));
     ;}
     break;
 
-  case 462:
-#line 5162 "Gmsh.y"
+  case 467:
+#line 5202 "Gmsh.y"
     { List_Add((yyval.l), &((yyvsp[(3) - (3)].c))); ;}
     break;
 
 
 /* Line 1267 of yacc.c.  */
-#line 10525 "Gmsh.tab.cpp"
+#line 10632 "Gmsh.tab.cpp"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -10735,7 +10842,7 @@ yyreturn:
 }
 
 
-#line 5165 "Gmsh.y"
+#line 5205 "Gmsh.y"
 
 
 int PrintListOfDouble(char *format, List_T *list, char *buffer)
diff --git a/Parser/Gmsh.tab.hpp b/Parser/Gmsh.tab.hpp
index bae21f58ff0275b90aafeef55c9ef2dad86ea1ef..7b06aead3066ebe630154ec9776e13726d833cf8 100644
--- a/Parser/Gmsh.tab.hpp
+++ b/Parser/Gmsh.tab.hpp
@@ -135,61 +135,64 @@
      tMeshAlgorithm = 351,
      tReverse = 352,
      tLayers = 353,
-     tHole = 354,
-     tAlias = 355,
-     tAliasWithOptions = 356,
-     tQuadTriDbl = 357,
-     tQuadTriSngl = 358,
-     tRecombLaterals = 359,
-     tTransfQuadTri = 360,
-     tText2D = 361,
-     tText3D = 362,
-     tInterpolationScheme = 363,
-     tTime = 364,
-     tCombine = 365,
-     tBSpline = 366,
-     tBezier = 367,
-     tNurbs = 368,
-     tNurbsOrder = 369,
-     tNurbsKnots = 370,
-     tColor = 371,
-     tColorTable = 372,
-     tFor = 373,
-     tIn = 374,
-     tEndFor = 375,
-     tIf = 376,
-     tEndIf = 377,
-     tExit = 378,
-     tAbort = 379,
-     tField = 380,
-     tReturn = 381,
-     tCall = 382,
-     tFunction = 383,
-     tShow = 384,
-     tHide = 385,
-     tGetValue = 386,
-     tGetEnv = 387,
-     tGetString = 388,
-     tHomology = 389,
-     tCohomology = 390,
-     tBetti = 391,
-     tSetOrder = 392,
-     tGMSH_MAJOR_VERSION = 393,
-     tGMSH_MINOR_VERSION = 394,
-     tGMSH_PATCH_VERSION = 395,
-     tAFFECTDIVIDE = 396,
-     tAFFECTTIMES = 397,
-     tAFFECTMINUS = 398,
-     tAFFECTPLUS = 399,
-     tOR = 400,
-     tAND = 401,
-     tNOTEQUAL = 402,
-     tEQUAL = 403,
-     tGREATEROREQUAL = 404,
-     tLESSOREQUAL = 405,
-     UNARYPREC = 406,
-     tMINUSMINUS = 407,
-     tPLUSPLUS = 408
+     tScaleLast = 354,
+     tHole = 355,
+     tAlias = 356,
+     tAliasWithOptions = 357,
+     tQuadTriAddVerts = 358,
+     tQuadTriNoNewVerts = 359,
+     tQuadTriSngl = 360,
+     tQuadTriDbl = 361,
+     tRecombLaterals = 362,
+     tTransfQuadTri = 363,
+     tText2D = 364,
+     tText3D = 365,
+     tInterpolationScheme = 366,
+     tTime = 367,
+     tCombine = 368,
+     tBSpline = 369,
+     tBezier = 370,
+     tNurbs = 371,
+     tNurbsOrder = 372,
+     tNurbsKnots = 373,
+     tColor = 374,
+     tColorTable = 375,
+     tFor = 376,
+     tIn = 377,
+     tEndFor = 378,
+     tIf = 379,
+     tEndIf = 380,
+     tExit = 381,
+     tAbort = 382,
+     tField = 383,
+     tReturn = 384,
+     tCall = 385,
+     tFunction = 386,
+     tShow = 387,
+     tHide = 388,
+     tGetValue = 389,
+     tGetEnv = 390,
+     tGetString = 391,
+     tHomology = 392,
+     tCohomology = 393,
+     tBetti = 394,
+     tSetOrder = 395,
+     tGMSH_MAJOR_VERSION = 396,
+     tGMSH_MINOR_VERSION = 397,
+     tGMSH_PATCH_VERSION = 398,
+     tAFFECTDIVIDE = 399,
+     tAFFECTTIMES = 400,
+     tAFFECTMINUS = 401,
+     tAFFECTPLUS = 402,
+     tOR = 403,
+     tAND = 404,
+     tNOTEQUAL = 405,
+     tEQUAL = 406,
+     tGREATEROREQUAL = 407,
+     tLESSOREQUAL = 408,
+     UNARYPREC = 409,
+     tMINUSMINUS = 410,
+     tPLUSPLUS = 411
    };
 #endif
 /* Tokens.  */
@@ -289,61 +292,64 @@
 #define tMeshAlgorithm 351
 #define tReverse 352
 #define tLayers 353
-#define tHole 354
-#define tAlias 355
-#define tAliasWithOptions 356
-#define tQuadTriDbl 357
-#define tQuadTriSngl 358
-#define tRecombLaterals 359
-#define tTransfQuadTri 360
-#define tText2D 361
-#define tText3D 362
-#define tInterpolationScheme 363
-#define tTime 364
-#define tCombine 365
-#define tBSpline 366
-#define tBezier 367
-#define tNurbs 368
-#define tNurbsOrder 369
-#define tNurbsKnots 370
-#define tColor 371
-#define tColorTable 372
-#define tFor 373
-#define tIn 374
-#define tEndFor 375
-#define tIf 376
-#define tEndIf 377
-#define tExit 378
-#define tAbort 379
-#define tField 380
-#define tReturn 381
-#define tCall 382
-#define tFunction 383
-#define tShow 384
-#define tHide 385
-#define tGetValue 386
-#define tGetEnv 387
-#define tGetString 388
-#define tHomology 389
-#define tCohomology 390
-#define tBetti 391
-#define tSetOrder 392
-#define tGMSH_MAJOR_VERSION 393
-#define tGMSH_MINOR_VERSION 394
-#define tGMSH_PATCH_VERSION 395
-#define tAFFECTDIVIDE 396
-#define tAFFECTTIMES 397
-#define tAFFECTMINUS 398
-#define tAFFECTPLUS 399
-#define tOR 400
-#define tAND 401
-#define tNOTEQUAL 402
-#define tEQUAL 403
-#define tGREATEROREQUAL 404
-#define tLESSOREQUAL 405
-#define UNARYPREC 406
-#define tMINUSMINUS 407
-#define tPLUSPLUS 408
+#define tScaleLast 354
+#define tHole 355
+#define tAlias 356
+#define tAliasWithOptions 357
+#define tQuadTriAddVerts 358
+#define tQuadTriNoNewVerts 359
+#define tQuadTriSngl 360
+#define tQuadTriDbl 361
+#define tRecombLaterals 362
+#define tTransfQuadTri 363
+#define tText2D 364
+#define tText3D 365
+#define tInterpolationScheme 366
+#define tTime 367
+#define tCombine 368
+#define tBSpline 369
+#define tBezier 370
+#define tNurbs 371
+#define tNurbsOrder 372
+#define tNurbsKnots 373
+#define tColor 374
+#define tColorTable 375
+#define tFor 376
+#define tIn 377
+#define tEndFor 378
+#define tIf 379
+#define tEndIf 380
+#define tExit 381
+#define tAbort 382
+#define tField 383
+#define tReturn 384
+#define tCall 385
+#define tFunction 386
+#define tShow 387
+#define tHide 388
+#define tGetValue 389
+#define tGetEnv 390
+#define tGetString 391
+#define tHomology 392
+#define tCohomology 393
+#define tBetti 394
+#define tSetOrder 395
+#define tGMSH_MAJOR_VERSION 396
+#define tGMSH_MINOR_VERSION 397
+#define tGMSH_PATCH_VERSION 398
+#define tAFFECTDIVIDE 399
+#define tAFFECTTIMES 400
+#define tAFFECTMINUS 401
+#define tAFFECTPLUS 402
+#define tOR 403
+#define tAND 404
+#define tNOTEQUAL 405
+#define tEQUAL 406
+#define tGREATEROREQUAL 407
+#define tLESSOREQUAL 408
+#define UNARYPREC 409
+#define tMINUSMINUS 410
+#define tPLUSPLUS 411
 
 
 
@@ -361,7 +367,7 @@ typedef union YYSTYPE
   List_T *l;
 }
 /* Line 1529 of yacc.c.  */
-#line 365 "Gmsh.tab.hpp"
+#line 371 "Gmsh.tab.hpp"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y
index b00180bbbaea77bda1ee47d3a8f1b64091982f21..90ebb82c38108da31aec3511913bfff1591c2d6e 100644
--- a/Parser/Gmsh.y
+++ b/Parser/Gmsh.y
@@ -120,8 +120,9 @@ struct doubleXstring{
 %token tRotate tTranslate tSymmetry tDilate tExtrude tLevelset
 %token tRecombine tSmoother tSplit tDelete tCoherence
 %token tIntersect tMeshAlgorithm tReverse
-%token tLayers tHole tAlias tAliasWithOptions
-%token tQuadTriDbl tQuadTriSngl tRecombLaterals tTransfQuadTri
+%token tLayers tScaleLast tHole tAlias tAliasWithOptions
+%token tQuadTriAddVerts tQuadTriNoNewVerts tQuadTriSngl tQuadTriDbl
+%token tRecombLaterals tTransfQuadTri
 %token tText2D tText3D tInterpolationScheme  tTime tCombine
 %token tBSpline tBezier tNurbs tNurbsOrder tNurbsKnots
 %token tColor tColorTable tFor tIn tEndFor tIf tEndIf tExit tAbort
@@ -1846,6 +1847,8 @@ Shape :
         for(int i = 0; i < List_Nbr($7); i++){
           s->compound.push_back((int)*(double*)List_Pointer($7, i));
 	}
+        // Added by Trevor Strickler
+	setSurfaceGeneratrices(s, (List_T*) 0 );
 	Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &s);
       }
       List_Delete($7);
@@ -1873,6 +1876,9 @@ Shape :
             s->compoundBoundary[i].push_back((int)*(double*)List_Pointer(l, j));
 	  }
 	}
+        // Added by Trevor Strickler
+        setSurfaceGeneratrices(s, (List_T*) 0 );
+
 	Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &s);
       }
       List_Delete($7);
@@ -3117,6 +3123,7 @@ Extrude :
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     }
                        ExtrudeParameters '}'
     {
@@ -3130,6 +3137,7 @@ Extrude :
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     }
                                                    ExtrudeParameters '}'
     {
@@ -3143,6 +3151,7 @@ Extrude :
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     }
                                                              ExtrudeParameters '}'
     {
@@ -3156,6 +3165,7 @@ Extrude :
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     }
                        ExtrudeParameters '}'
     {
@@ -3232,6 +3242,7 @@ Extrude :
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     }
                     '{' ExtrudeParameters '}' tEND
     {
@@ -3244,6 +3255,7 @@ Extrude :
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     }
                    '{' ExtrudeParameters '}' tEND
     {
@@ -3256,6 +3268,7 @@ Extrude :
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     }
                       '{' ExtrudeParameters '}' tEND
     {
@@ -3268,6 +3281,7 @@ Extrude :
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     }
                     '{' ExtrudeParameters '}' tEND
     {
@@ -3280,6 +3294,7 @@ Extrude :
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     }
                    '{' ExtrudeParameters '}' tEND
     {
@@ -3292,6 +3307,7 @@ Extrude :
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     }
                       '{' ExtrudeParameters '}' tEND
     {
@@ -3304,6 +3320,7 @@ Extrude :
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     }
                     '{' ExtrudeParameters '}' tEND
     {
@@ -3316,6 +3333,7 @@ Extrude :
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     }
                    '{' ExtrudeParameters '}' tEND
     {
@@ -3328,6 +3346,7 @@ Extrude :
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
+      extr.mesh.ScaleLast = false;
     }
                       '{' ExtrudeParameters '}' tEND
     {
@@ -3404,25 +3423,47 @@ ExtrudeParameter :
       List_Delete($5);
       List_Delete($7);
     }
+//Added by Trevor Strickler 07/07/2013
+  | tScaleLast tEND
+    {
+      extr.mesh.ScaleLast = true;
+    }
+
   | tRecombine tEND
     {
       extr.mesh.Recombine = true;
     }
+  | tQuadTriSngl tEND
+    {
+      yymsg(0, "Keyword 'QuadTriSngl' deprecated. Use 'QuadTriNoNewVerts' instead.");
+    }
+  | tQuadTriSngl tRecombLaterals tEND
+    {
+      yymsg(0, "Keyword 'QuadTriSngl' deprecated. Use 'QuadTriNoNewVerts' instead.");
+    }
   | tQuadTriDbl tEND
     {
-      extr.mesh.QuadToTri = QUADTRI_DBL_1;
+      yymsg(0, "Method 'QuadTriDbl' deprecated. Use 'QuadTriAddVerts' instead, which has no requirement for the number of extrusion layers and meshes with body-centered vertices.");
     }
   | tQuadTriDbl tRecombLaterals tEND
     {
-      extr.mesh.QuadToTri = QUADTRI_DBL_1_RECOMB;
+      yymsg(0, "Method 'QuadTriDbl' deprecated. Use 'QuadTriAddVerts' instead, which has no requirement for the number of extrusion layers and meshes with body-centered vertices.");
     }
-  | tQuadTriSngl tEND
+  | tQuadTriAddVerts tEND
     {
-      extr.mesh.QuadToTri = QUADTRI_SNGL_1;
+      extr.mesh.QuadToTri = QUADTRI_ADDVERTS_1;
     }
-  | tQuadTriSngl tRecombLaterals tEND
+  | tQuadTriAddVerts tRecombLaterals tEND
+    {
+      extr.mesh.QuadToTri = QUADTRI_ADDVERTS_1_RECOMB;
+    }
+  | tQuadTriNoNewVerts tEND
+    {
+      extr.mesh.QuadToTri = QUADTRI_NOVERTS_1;
+    }
+  | tQuadTriNoNewVerts tRecombLaterals tEND
     {
-      extr.mesh.QuadToTri = QUADTRI_SNGL_1_RECOMB;
+      extr.mesh.QuadToTri = QUADTRI_NOVERTS_1_RECOMB;
     }
   | tHole '(' FExpr ')' tAFFECT ListOfDouble tUsing FExpr tEND
     {
diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp
index fd17a133c66bca8ea8e2deb01eaa0e631463f813..88951d2c2f8e3711ac2b1559f0f0ae081c935d06 100644
--- a/Parser/Gmsh.yy.cpp
+++ b/Parser/Gmsh.yy.cpp
@@ -380,8 +380,8 @@ static void yy_fatal_error (yyconst char msg[]  );
 	*yy_cp = '\0'; \
 	(yy_c_buf_p) = yy_cp;
 
-#define YY_NUM_RULES 174
-#define YY_END_OF_BUFFER 175
+#define YY_NUM_RULES 177
+#define YY_END_OF_BUFFER 178
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -389,97 +389,100 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[806] =
+static yyconst flex_int16_t yy_accept[837] =
     {   0,
-        0,    0,  175,  173,    1,    1,  173,    5,  173,    6,
-      173,  173,  173,  173,  173,  168,   21,    2,  173,   16,
-      173,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,  172,  172,  172,  173,   28,   24,   19,   25,   17,
-       26,   18,    0,  170,    3,    4,   20,  169,  168,    0,
-       29,   27,   30,  172,  172,  172,  172,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-
-      172,   97,   96,  172,  172,  172,  172,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,  117,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,  172,  172,  172,  155,  156,  172,  172,  172,  172,
-      172,  172,  172,  172,  172,   23,   22,    0,  169,    0,
-        0,  171,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,  172,   53,   64,  172,  172,  172,  172,  172,  172,
-      172,  172,  172,  172,  172,   70,  172,  172,  172,  172,
-      172,   84,  172,  172,  172,  172,  172,  172,  172,  172,
-
-      172,  172,  172,  172,  172,  172,  172,  104,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,  172,  138,  172,  172,  172,  172,  172,  144,  172,
-      172,  172,  172,  163,  172,  172,  172,  172,  172,  172,
-      172,    0,  170,    0,    0,  169,  172,   32,  172,  172,
-      172,  172,  172,   37,   39,  172,  172,  172,  172,   61,
-      172,   47,  172,  172,  172,  172,  172,  172,  172,  172,
-       52,  172,  172,  172,  172,  172,   69,  172,  172,  172,
-      172,  172,   79,  172,   80,  172,  172,   83,  172,  172,
-
-      172,  172,  172,   92,   93,  172,  172,  172,  172,  172,
-      172,  172,  172,  102,  103,  172,  172,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,  131,  172,  172,  172,  172,  172,  172,  172,  172,
-      152,  139,  172,  172,  172,  172,  137,  172,  172,  172,
-      172,  172,  172,  172,  158,  162,  172,  172,  172,  172,
-      172,  172,   10,   15,    9,    8,  172,   12,   14,    0,
-      169,   31,  172,   35,  172,  172,  172,   41,  172,   43,
-      172,  172,  172,  172,  172,  172,  172,   56,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,   76,
-
-       78,  172,  172,   81,   82,  172,  172,  172,  172,  172,
-      172,   95,  172,  172,  100,  172,  172,  172,  105,  172,
-      172,  172,  172,  172,  113,  114,  172,  172,  172,  118,
-      172,  119,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,  130,  172,  172,  172,  172,  142,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  164,  172,  172,
-      166,  172,   11,  172,   13,  172,  172,   34,   38,   40,
-      172,   44,  172,  172,  172,   48,  172,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,   66,   68,  172,  172,
-       75,  172,  172,  172,  172,  172,   86,  172,  172,  172,
-
-      172,  172,  106,  101,  172,  172,  172,  112,  172,  109,
-      172,  172,  172,  123,  172,  122,  172,  172,  172,  172,
-      133,  172,  129,  172,  172,  140,  141,  172,  146,  151,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,  167,    7,  172,  172,   42,   45,  172,  172,  172,
-      172,  172,  172,   51,   55,  172,  172,  172,  172,  172,
-       72,  172,  172,  172,   73,  172,  172,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  134,  172,  172,
-      145,  150,  172,  172,  172,  143,  172,  172,  172,  172,
-
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,   58,  172,  172,  172,  172,   71,   74,  172,   85,
-      172,  172,  172,  172,   88,   94,  172,  172,  107,  110,
-      111,  172,  172,  115,  116,  172,  172,  172,  172,  172,
-      172,  172,  136,  135,  172,  172,  172,  153,  172,  172,
-      172,  172,  172,  172,   33,  172,  172,  172,  172,   49,
-      172,  172,  172,  172,  172,  172,   77,  172,  172,  172,
-       87,  172,   98,  172,  172,  172,  172,  172,  172,  126,
-      128,  172,  148,  172,  172,  154,  172,  172,  172,  161,
-      172,  172,  172,   60,  172,   50,   57,  172,  172,  172,
-
-      172,  172,  172,  172,  172,  172,  120,  172,  124,  172,
-      172,  132,  172,  147,  172,  172,  172,  172,  172,   46,
-      172,   59,  172,  172,   67,  172,  172,  172,  172,  172,
-      121,  125,  172,  149,  172,  172,  159,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  108,
-      172,  172,  160,  172,  172,   54,   62,   65,  172,  172,
-      172,  172,  127,  157,  172,  172,  172,  172,  172,  172,
-      172,  172,   36,  172,  172,  172,  172,  172,  165,  172,
-      172,  172,  172,  172,  172,   89,   90,   91,  172,  172,
-
-      172,  172,   99,   63,    0
+        0,    0,  178,  176,    1,    1,  176,    5,  176,    6,
+      176,  176,  176,  176,  176,  171,   21,    2,  176,   16,
+      176,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  176,   28,   24,   19,   25,   17,
+       26,   18,    0,  173,    3,    4,   20,  172,  171,    0,
+       29,   27,   30,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+
+      175,   97,   96,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,  117,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  175,  158,  159,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,   23,   22,    0,  172,
+        0,    0,  174,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,   53,   64,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,   70,  175,  175,  175,
+      175,  175,   84,  175,  175,  175,  175,  175,  175,  175,
+
+      175,  175,  175,  175,  175,  175,  175,  175,  104,  175,
+      175,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  141,  175,  175,  175,  175,  175,
+      147,  175,  175,  175,  175,  166,  175,  175,  175,  175,
+      175,  175,  175,    0,  173,    0,    0,  172,  175,   32,
+      175,  175,  175,  175,  175,   37,   39,  175,  175,  175,
+      175,   61,  175,   47,  175,  175,  175,  175,  175,  175,
+      175,  175,   52,  175,  175,  175,  175,  175,   69,  175,
+      175,  175,  175,  175,   79,  175,   80,  175,  175,   83,
+
+      175,  175,  175,  175,  175,   92,   93,  175,  175,  175,
+      175,  175,  175,  175,  175,  102,  103,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,  133,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,  155,  142,  175,  175,  175,  175,  140,
+      175,  175,  175,  175,  175,  175,  175,  161,  165,  175,
+      175,  175,  175,  175,  175,   10,   15,    9,    8,  175,
+       12,   14,    0,  172,   31,  175,   35,  175,  175,  175,
+       41,  175,   43,  175,  175,  175,  175,  175,  175,  175,
+       56,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+
+      175,  175,   76,   78,  175,  175,   81,   82,  175,  175,
+      175,  175,  175,  175,   95,  175,  175,  100,  175,  175,
+      175,  105,  175,  175,  175,  175,  175,  113,  114,  175,
+      175,  175,  118,  175,  119,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  132,  175,  175,  175,  175,  175,
+      145,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+      175,  167,  175,  175,  169,  175,   11,  175,   13,  175,
+      175,   34,   38,   40,  175,   44,  175,  175,  175,   48,
+      175,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+       66,   68,  175,  175,   75,  175,  175,  175,  175,  175,
+
+       86,  175,  175,  175,  175,  175,  106,  101,  175,  175,
+      175,  112,  175,  109,  175,  175,  175,  123,  175,  122,
+      175,  175,  175,  175,  135,  175,  131,  175,  175,  175,
+      143,  144,  175,  149,  154,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,  170,    7,  175,  175,
+       42,   45,  175,  175,  175,  175,  175,  175,   51,   55,
+      175,  175,  175,  175,  175,   72,  175,  175,  175,   73,
+      175,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  136,  175,  175,  175,  148,  153,  175,  175,
+
+      175,  146,  175,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,  175,   58,  175,  175,
+      175,  175,   71,   74,  175,   85,  175,  175,  175,  175,
+       88,   94,  175,  175,  107,  110,  111,  175,  175,  115,
+      116,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+      175,  139,  138,  175,  175,  175,  156,  175,  175,  175,
+      175,  175,  175,   33,  175,  175,  175,  175,   49,  175,
+      175,  175,  175,  175,  175,   77,  175,  175,  175,   87,
+      175,   98,  175,  175,  175,  175,  175,  175,  175,  175,
+      128,  130,  175,  175,  151,  175,  175,  157,  175,  175,
+
+      175,  164,  175,  175,  175,   60,  175,   50,   57,  175,
+      175,  175,  175,  175,  175,  175,  175,  175,  120,  175,
+      175,  126,  175,  175,  175,  134,  175,  175,  150,  175,
+      175,  175,  175,  175,   46,  175,   59,  175,  175,   67,
+      175,  175,  175,  175,  175,  121,  175,  175,  127,  175,
+      175,  152,  175,  175,  162,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+      175,  175,  175,  175,  175,  175,  175,  175,  175,  175,
+      108,  175,  175,  175,  175,  175,  163,  175,  175,   54,
+       62,   65,  175,  175,  175,  175,  175,  175,  129,  137,
+
+      160,  175,  175,  175,  175,  175,  175,  175,  124,  175,
+      175,   36,  175,  175,  175,  175,  175,  175,  168,  175,
+      175,  175,  175,  175,  125,  175,   89,   90,   91,  175,
+      175,  175,  175,   99,   63,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -526,193 +529,199 @@ static yyconst flex_int32_t yy_meta[74] =
         2,    2,    1
     } ;
 
-static yyconst flex_int16_t yy_base[807] =
+static yyconst flex_int16_t yy_base[838] =
     {   0,
-        0,    0,  933,  934,  934,  934,  911,  934,  925,  934,
-      909,   65,   66,   64,   76,   78,  934,  934,  908,  907,
-      906,   49,   49,   56,   67,   68,   81,   50,   80,   97,
-        0,  866,   97,  108,  858,  860,  107,  856,  118,  121,
-      159,   56,  861,  869,  847,  934,  934,  934,  934,  934,
-      934,  934,  908,  181,  934,  934,  934,  186,  201,  226,
-      934,  934,  934,    0,  857,  856,  868,  859,  864,  857,
-      864,  849,   37,  843,   86,  853,  860,  843,  166,  839,
-      853,  128,  846,  855,  844,  850,  836,  849,  188,  849,
-      845,  835,  834,  830,  833,  851,  825,  839,   24,  827,
-
-      846,    0,  821,  825,  814,   96,   62,  830,  852,  102,
-      831,  817,  829,  815,  814,  806,    0,   58,  133,  820,
-      827,  814,  179,  807,  814,  805,  809,  809,  807,  191,
-      803,  802,  801,  145,    0,    0,  829,  803,  792,  810,
-      812,  808,  802,  799,  787,  934,  934,  247,  252,  261,
-      267,  272,  791,  789,  791,  804,  168,  791,  790,  791,
-      782,  791,  786,  787,  785,  785,  778,  791,   82,  779,
-      157,  775,  783,    0,  789,  780,  783,  782,  785,  763,
-      775,  206,  769,  771,  762,    0,  763,  761,  767,  763,
-      772,    0,  772,  791,  264,  768,  767,  757,  756,  789,
-
-      763,  748,  761,  758,  759,  758,  743,  794,  760,  745,
-      750,  737,  754,  750,  753,  744,  734,  738,  743,  736,
-      747,  734,  742,  741,  111,  735,  723,  737,  740,  735,
-      749,  716,  729,  722,  730,  725,  724,  713,  269,  725,
-      718,  726,  748,  719,  707,  724,  711,  718,  709,  701,
-      248,  304,  309,  318,  323,  328,  701,    0,  700,  700,
-      703,  707,  714,    0,  746,  704,  703,  706,  706,    0,
-      689,    0,  707,  696,  689,  693,  687,  694,  190,  698,
-        0,  682,  687,  686,  679,  678,    0,  681,  681,  688,
-      676,  683,    0,  671,    0,  686,  672,    0,  669,  687,
-
-      673,  666,  683,    0,    0,  672,  663,  688,  663,  661,
-      661,  658,  665,    0,    0,  709,  218,  657,  697,  661,
-      653,  653,  657,  654,  658,  661,  656,  645,  646,  643,
-      230,    0,  649,  643,  646,  641,  640,  637,  651,  637,
-        0,    0,  634,  635,  233,  638,    0,  244,  641,  632,
-      643,  646,  641,  657,    0,    0,  668,  619,  624,  635,
-      633,  627,    0,    0,  627,    0,  632,  625,    0,  333,
-      338,    0,  647,  636,  615,  619,  618,    0,  617,    0,
-      612,  619,  616,  623,  620,  619,  609,  627,  608,  615,
-      599,  609,  612,  611,  610,  609,  608,  249,  595,    0,
-
-        0,  607,  606,    0,    0,  600,  321,  587,  590,  595,
-      591,    0,  613,  585,    0,  584,  593,  582,    0,  598,
-      589,  573,  585,  581,    0,    0,  589,  589,  589,    0,
-      578,    0,  596,  583,  571,  585,  568,  580,  571,  565,
-      577,    0,  577,  572,  574,  573,    0,  558,  557,  560,
-      561,  568,  164,  569,  552,  556,  550,    0,  237,  559,
-        0,  562,    0,  559,    0,  560,  555,    0,    0,  595,
-      557,    0,  548,  549,  540,    0,  545,  546,  555,  550,
-      531,  540,  539,  556,  572,  532,    0,    0,  305,  539,
-        0,  538,  541,  531,  335,  568,    0,  534,  522,  534,
-
-      550,  534,    0,    0,  533,  524,  511,    0,  528,    0,
-      515,  524,  531,    0,  516,    0,  521,  326,  520,  540,
-        0,  522,    0,  521,  520,    0,    0,  518,    0,    0,
-      519,  516,  520,  509,  514,  501,  513,  497,  323,  514,
-      501,    0,    0,  495,  493,    0,    0,  504,  517,  504,
-      505,  493,  504,    0,    0,  501,  503,  489,  488,  500,
-        0,  482,  496,  497,    0,  484,  511,  506,  499,  480,
-      487,  467,  503,  486,  469,  477,  481,  471,  467,  480,
-      471,  473,  337,  479,  466,  457,  472,    0,  459,  458,
-        0,    0,  465,  454,  471,    0,  447,  465,  452,  448,
-
-      454,  447,  460,  456,  455,  485,  447,  443,  454,  451,
-      446,    0,  437,  440,  441,  434,    0,    0,  439,    0,
-      461,  460,  471,  441,    0,    0,  471,  427,    0,    0,
-        0,  428,  435,    0,    0,  438,  440,  428,  421,  434,
-      433,  419,    0,    0,  413,  426,  431,    0,  422,  423,
-      430,  421,  424,  450,    0,  437,  412,  413,  415,    0,
-      399,  417,  416,  406,  401,  413,    0,  424,  423,  432,
-        0,  419,    0,  404,  409,  394,  399,  402,  403,    0,
-        0,  399,    0,  385,  400,    0,  402,  399,  383,    0,
-      387,  385,  376,    0,  380,    0,    0,  379,  385,  376,
-
-      390,  393,  392,  391,  406,  370,    0,  383,    0,   38,
-       60,    0,   95,    0,   87,  323,  178,  192,  207,    0,
-      234,    0,  241,  263,    0,  285,  286,  320,  330,  313,
-        0,    0,  321,    0,  304,  307,    0,  307,  317,  318,
-      321,  316,  350,  353,  354,  347,  326,  329,  338,  335,
-      326,  332,  344,  324,  330,  357,  358,  359,  353,    0,
-      336,  338,    0,  356,  345,    0,  370,    0,  366,  367,
-      368,  369,    0,    0,  351,  347,  352,  383,  384,  385,
-      392,  352,    0,  389,  383,  384,  385,  393,    0,  363,
-      389,  390,  391,  401,  371,    0,    0,    0,  395,  379,
-
-      405,  368,    0,    0,  934,  432
+        0,    0,  969,  970,  970,  970,  947,  970,  961,  970,
+      945,   65,   66,   64,   76,   78,  970,  970,  944,  943,
+      942,   49,   49,   56,   67,   68,   81,   50,   80,   97,
+        0,  902,   97,  108,  894,  896,  107,  892,  118,  125,
+      158,   56,  897,  905,  883,  970,  970,  970,  970,  970,
+      970,  970,  944,  184,  970,  970,  970,  199,  214,  229,
+      970,  970,  970,    0,  893,  892,  904,  895,  900,  893,
+      900,  885,   37,  879,   86,  889,  896,  879,  194,  875,
+      889,  149,  882,  891,  880,  886,  872,  885,  116,  885,
+      881,  871,  870,  866,  869,  887,  861,  875,   24,  863,
+
+      882,    0,  857,  861,  850,   96,   62,  866,  888,  102,
+      867,  853,  865,  851,  850,  842,    0,   58,  137,  856,
+      863,  850,  155,  843,  850,  859,  840,  844,  844,  842,
+      192,  838,  837,  836,  158,    0,    0,  864,  838,  827,
+      845,  847,  843,  837,  834,  822,  970,  970,  248,  254,
+      263,  269,  274,  826,  824,  826,  839,  267,  826,  825,
+      826,  817,  826,  821,  822,  820,  820,  813,  826,   82,
+      814,  171,  810,  818,    0,  824,  815,  818,  817,  820,
+      798,  810,  155,  804,  806,  797,    0,  798,  796,  802,
+      798,  807,    0,  807,  826,  266,  803,  802,  792,  791,
+
+      824,  798,  783,  796,  793,  794,  793,  778,  829,  795,
+      780,  785,  772,  789,  785,  788,  779,  769,  773,  778,
+      771,  782,  769,  777,  776,  173,  770,  758,  772,  775,
+      770,  763,  783,  750,  763,  756,  764,  759,  758,  747,
+      273,  759,  752,  760,  782,  753,  741,  758,  745,  752,
+      743,  735,  262,  318,  323,  332,  337,  342,  735,    0,
+      734,  734,  737,  741,  748,    0,  780,  738,  737,  740,
+      740,    0,  723,    0,  741,  730,  723,  727,  721,  728,
+      174,  732,    0,  716,  721,  720,  713,  712,    0,  715,
+      715,  722,  710,  717,    0,  705,    0,  720,  706,    0,
+
+      703,  721,  707,  700,  717,    0,    0,  706,  697,  722,
+      697,  695,  695,  692,  699,    0,    0,  743,  234,  691,
+      731,  695,  687,  687,  691,  688,  692,  695,  690,  679,
+      680,  677,  182,    0,  683,  677,  680,  675,  674,  671,
+      685,  683,  670,    0,    0,  667,  668,  194,  671,    0,
+      246,  674,  665,  676,  679,  674,  690,    0,    0,  701,
+      652,  657,  668,  666,  660,    0,    0,  660,    0,  665,
+      658,    0,  347,  352,    0,  680,  669,  648,  652,  651,
+        0,  650,    0,  645,  652,  649,  656,  653,  652,  642,
+      660,  641,  648,  632,  642,  645,  644,  643,  642,  641,
+
+      230,  628,    0,    0,  640,  639,    0,    0,  633,  262,
+      620,  623,  628,  624,    0,  646,  618,    0,  617,  626,
+      615,    0,  631,  622,  606,  618,  614,    0,    0,  622,
+      622,  622,    0,  611,    0,  629,  616,  604,  618,  601,
+      613,  604,  598,  610,    0,  627,  609,  604,  606,  605,
+        0,  590,  589,  592,  593,  600,  132,  601,  584,  588,
+      582,    0,  151,  591,    0,  594,    0,  591,    0,  592,
+      587,    0,    0,  627,  589,    0,  580,  581,  572,    0,
+      577,  578,  587,  582,  563,  572,  571,  588,  604,  564,
+        0,    0,  247,  571,    0,  570,  573,  563,  291,  600,
+
+        0,  566,  554,  566,  582,  566,    0,    0,  565,  556,
+      543,    0,  560,    0,  547,  556,  563,    0,  548,    0,
+      553,  336,  552,  572,    0,  554,    0,  557,  552,  551,
+        0,    0,  549,    0,    0,  550,  547,  551,  540,  545,
+      532,  544,  528,  265,  545,  532,    0,    0,  526,  524,
+        0,    0,  535,  548,  535,  536,  524,  535,    0,    0,
+      532,  534,  520,  519,  531,    0,  513,  527,  528,    0,
+      515,  542,  537,  530,  511,  518,  498,  534,  517,  500,
+      508,  512,  502,  498,  511,  502,  504,  348,  510,  497,
+      488,  503,    0,  489,  489,  488,    0,    0,  495,  484,
+
+      501,    0,  477,  495,  482,  478,  484,  477,  490,  486,
+      485,  515,  477,  473,  484,  481,  476,    0,  467,  470,
+      471,  464,    0,    0,  469,    0,  491,  490,  501,  471,
+        0,    0,  501,  457,    0,    0,    0,  458,  465,    0,
+        0,  468,  468,  469,  456,  456,  449,  462,  461,  447,
+      445,    0,    0,  440,  453,  458,    0,  449,  450,  457,
+      448,  451,  477,    0,  464,  439,  440,  442,    0,  426,
+      444,  443,  433,  428,  440,    0,  451,  450,  459,    0,
+      446,    0,  431,  436,  421,  433,  425,  283,  428,  429,
+        0,    0,  425,  445,    0,  410,  425,    0,  427,  424,
+
+      408,    0,  412,  410,  401,    0,   31,    0,    0,   59,
+       89,   88,  125,  190,  255,  269,  286,  252,    0,  271,
+      329,    0,  273,  271,  280,    0,  324,  323,    0,  309,
+      335,  326,  319,  314,    0,  315,    0,  321,  335,    0,
+      341,  342,  343,  351,  335,    0,  339,  324,    0,  347,
+      327,    0,  334,  338,    0,  338,  348,  349,  352,  347,
+      382,  383,  384,  376,  355,  351,  372,  359,  366,  367,
+      364,  355,  361,  373,  353,  359,  386,  387,  388,  382,
+        0,  364,  379,  367,  369,  369,    0,  387,  376,    0,
+      401,    0,  397,  398,  400,  401,  378,  380,    0,    0,
+
+        0,  385,  381,  386,  417,  418,  419,  426,    0,  386,
+      387,    0,  424,  418,  419,  420,  428,  394,    0,  399,
+      425,  426,  427,  437,    0,  407,    0,    0,    0,  431,
+      415,  441,  404,    0,    0,  970,  468
     } ;
 
-static yyconst flex_int16_t yy_def[807] =
+static yyconst flex_int16_t yy_def[838] =
     {   0,
-      805,    1,  805,  805,  805,  805,  805,  805,  805,  805,
-      805,  805,  805,  805,  805,  805,  805,  805,  805,  805,
-      805,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  805,  805,  805,  805,  805,  805,
-      805,  805,  805,  805,  805,  805,  805,  805,  805,  805,
-      805,  805,  805,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  805,  805,  805,  805,  805,
-      805,  805,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  805,  805,  805,  805,  805,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  805,
-      805,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-      806,  806,  806,  806,  806,  806,  806,  806,  806,  806,
-
-      806,  806,  806,  806,    0,  805
+      836,    1,  836,  836,  836,  836,  836,  836,  836,  836,
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+      836,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  836,  836,  836,  836,  836,  836,
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+      836,  836,  836,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  836,  836,  836,  836,
+      836,  836,  836,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  836,  836,  836,  836,  836,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  836,  836,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+      837,  837,  837,  837,  837,    0,  836
     } ;
 
-static yyconst flex_int16_t yy_nxt[1008] =
+static yyconst flex_int16_t yy_nxt[1044] =
     {   0,
         4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
        14,   15,   16,   16,   16,   16,   16,   17,   18,   19,
@@ -722,112 +731,116 @@ static yyconst flex_int16_t yy_nxt[1008] =
        31,   31,   31,   31,   31,   31,   31,   31,   31,   44,
        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
        31,   31,   45,   49,   53,   51,   54,   54,   54,   54,
-       54,  197,  198,   55,   96,   50,   52,   56,   58,   72,
-       59,   59,   59,   59,   59,  732,   57,   65,   66,   67,
-
-       73,   97,  161,   75,   60,  218,   68,   76,  162,   74,
-       77,   78,   69,   70,   71,  142,   79,   80,   82,   81,
-      143,  206,   83,  733,  219,   85,  207,   86,   90,   60,
-       84,   87,  101,  275,   88,   98,   91,   89,   92,   93,
-       99,   94,  276,  164,  105,  109,  734,   95,  106,  102,
-      100,  165,  107,  735,  114,  204,  103,  108,  115,  110,
-      210,  116,  117,  205,  118,  122,  211,  119,  111,  123,
-      120,  333,  126,  135,  136,  127,  128,  334,  124,  129,
-      176,  177,  130,  131,  125,  178,  132,  133,  220,  137,
-      221,  134,  261,   54,   54,   54,   54,   54,  149,  149,
-
-      149,  149,  149,  241,  242,  278,  138,  148,  262,  263,
-      139,   58,  150,   59,   59,   59,   59,   59,  279,  140,
-      169,  533,  141,  170,  171,  534,  172,   60,  225,  737,
-      173,  226,  148,  289,  151,  151,  290,  150,  152,  152,
-      152,  152,  152,  185,  227,  235,  228,  390,  236,  186,
-      391,  738,   60,  187,  237,  252,  252,  420,  421,  253,
-      253,  253,  253,  253,  149,  149,  149,  149,  149,  255,
-      255,  435,  739,  256,  256,  256,  256,  256,  254,  152,
-      152,  152,  152,  152,  152,  152,  152,  152,  152,  539,
-      301,  449,  446,  348,  540,  435,  349,  363,  447,  740,
-
-      364,  741,  450,  254,  302,  365,  350,  303,  351,  366,
-      742,  367,  368,  489,  490,  369,  253,  253,  253,  253,
-      253,  253,  253,  253,  253,  253,  370,  370,  743,  744,
-      371,  371,  371,  371,  371,  256,  256,  256,  256,  256,
-      256,  256,  256,  256,  256,  371,  371,  371,  371,  371,
-      371,  371,  371,  371,  371,  495,  561,  567,  496,  584,
-      562,  600,  637,  745,  736,  568,  746,  747,  748,  749,
-      750,  751,  752,  753,  754,  755,  756,  638,  601,  757,
-      758,  585,  759,  584,  760,  600,  761,  637,  736,  762,
-      763,  764,  765,  766,  767,  768,  769,  770,  771,  772,
-
-      773,  638,  774,  775,  776,  777,  778,  779,  780,  781,
-      782,  783,  784,  785,  786,  787,  788,  789,  790,  791,
-      792,  793,  794,  795,  796,  797,  798,  799,  800,  801,
-      802,  803,  804,   64,  731,  730,  729,  728,  727,  726,
-      725,  724,  723,  722,  721,  720,  719,  718,  717,  716,
-      715,  714,  713,  712,  711,  710,  709,  708,  707,  706,
-      705,  704,  703,  702,  701,  700,  699,  698,  697,  696,
-      695,  694,  693,  692,  691,  690,  689,  688,  687,  686,
-      685,  684,  683,  682,  681,  680,  679,  678,  677,  676,
-      675,  674,  673,  672,  671,  670,  669,  668,  667,  666,
-
-      665,  664,  663,  662,  661,  660,  659,  658,  657,  656,
-      655,  654,  653,  652,  651,  650,  649,  648,  647,  646,
-      645,  644,  643,  642,  641,  640,  639,  636,  635,  634,
-      633,  632,  631,  630,  629,  628,  627,  626,  625,  624,
-      623,  622,  621,  620,  619,  618,  617,  616,  615,  614,
-      613,  612,  611,  610,  609,  608,  607,  606,  605,  604,
-      603,  602,  599,  598,  597,  596,  595,  594,  593,  592,
-      591,  590,  589,  588,  587,  586,  583,  582,  581,  580,
-      579,  578,  577,  576,  575,  574,  573,  572,  571,  570,
-      569,  566,  565,  564,  563,  560,  559,  558,  557,  556,
-
-      555,  554,  553,  552,  551,  550,  549,  548,  547,  546,
-      545,  544,  543,  542,  541,  538,  537,  536,  535,  532,
-      531,  530,  529,  528,  527,  526,  525,  524,  523,  522,
-      521,  520,  519,  518,  517,  516,  515,  514,  513,  512,
-      511,  510,  509,  508,  507,  506,  505,  504,  503,  502,
-      501,  500,  499,  498,  497,  494,  493,  492,  491,  488,
-      487,  486,  485,  484,  483,  482,  481,  480,  479,  478,
-      477,  476,  475,  474,  473,  472,  471,  470,  469,  468,
-      467,  466,  465,  464,  463,  462,  461,  460,  459,  458,
-      457,  456,  455,  454,  453,  452,  451,  448,  445,  444,
-
-      443,  442,  441,  440,  439,  438,  437,  436,  434,  433,
-      432,  431,  430,  429,  428,  427,  426,  425,  424,  423,
-      422,  419,  418,  417,  416,  415,  414,  413,  412,  411,
-      410,  409,  408,  407,  406,  405,  404,  403,  402,  401,
-      400,  399,  398,  397,  396,  395,  394,  393,  392,  389,
-      388,  387,  386,  385,  384,  383,  382,  381,  380,  379,
-      378,  377,  376,  375,  374,  373,  372,  362,  361,  360,
-      359,  358,  357,  356,  355,  354,  353,  352,  347,  346,
-      345,  344,  343,  342,  341,  340,  339,  338,  337,  336,
-      335,  332,  331,  330,  329,  328,  327,  326,  325,  324,
-
-      323,  322,  321,  320,  319,  318,  317,  316,  315,  314,
-      313,  312,  311,  310,  309,  308,  307,  306,  305,  304,
-      300,  299,  298,  297,  296,  295,  294,  293,  292,  291,
-      288,  287,  286,  285,  284,  283,  282,  281,  280,  277,
-      274,  273,  272,  271,  270,  269,  268,  267,  266,  265,
-      264,  260,  259,  258,  257,  251,  250,  249,  248,  247,
-      246,  245,  244,  243,  240,  239,  238,  234,  233,  232,
-      231,  230,  229,  224,  223,  222,  217,  216,  215,  214,
-      213,  212,  209,  208,  203,  202,  201,  200,  199,  196,
-      195,  194,  193,  192,  191,  190,  189,  188,  184,  183,
-
-      182,  181,  180,  179,  175,  174,  168,  167,  166,  163,
-      160,  159,  158,  157,  156,  155,  154,  153,  147,  146,
-      145,  144,  121,  113,  112,  104,   63,   62,   61,   48,
-       47,   46,  805,    3,  805,  805,  805,  805,  805,  805,
-      805,  805,  805,  805,  805,  805,  805,  805,  805,  805,
-      805,  805,  805,  805,  805,  805,  805,  805,  805,  805,
-      805,  805,  805,  805,  805,  805,  805,  805,  805,  805,
-      805,  805,  805,  805,  805,  805,  805,  805,  805,  805,
-      805,  805,  805,  805,  805,  805,  805,  805,  805,  805,
-      805,  805,  805,  805,  805,  805,  805,  805,  805,  805,
-
-      805,  805,  805,  805,  805,  805,  805
+       54,  198,  199,   55,   96,   50,   52,   56,   58,   72,
+       59,   59,   59,   59,   59,  736,   57,   65,   66,   67,
+
+       73,   97,  162,   75,   60,  219,   68,   76,  163,   74,
+       77,   78,   69,   70,   71,  143,   79,   80,   82,   81,
+      144,  207,   83,  737,  220,   85,  208,   86,   90,   60,
+       84,   87,  101,  277,   88,   98,   91,   89,   92,   93,
+       99,   94,  278,  165,  105,  109,  738,   95,  106,  102,
+      100,  166,  107,  739,  114,  205,  103,  108,  115,  110,
+      211,  116,  117,  206,  118,  122,  212,  119,  111,  123,
+      120,  186,  136,  137,  126,  740,  127,  187,  124,  128,
+      129,  188,  291,  130,  125,  292,  131,  132,  138,  538,
+      133,  134,  221,  539,  222,  135,   54,   54,   54,   54,
+
+       54,  177,  178,  544,  226,  139,  179,  227,  545,  140,
+      149,  150,  150,  150,  150,  150,  243,  244,  141,  280,
+      228,  142,  229,  438,   58,  151,   59,   59,   59,   59,
+       59,  393,  281,  335,  394,  149,  741,  152,  152,  336,
+       60,  153,  153,  153,  153,  153,  237,  438,  170,  238,
+      151,  171,  172,  450,  173,  239,  254,  254,  174,  451,
+      255,  255,  255,  255,  255,   60,  150,  150,  150,  150,
+      150,  257,  257,  423,  424,  258,  258,  258,  258,  258,
+      256,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  263,  303,  453,  493,  494,  499,  351,  566,  500,
+
+      352,  742,  567,  606,  454,  256,  304,  264,  265,  305,
+      353,  366,  354,  572,  367,  743,  744,  745,  723,  368,
+      607,  573,  746,  369,  748,  370,  371,  606,  749,  372,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      373,  373,  723,  750,  374,  374,  374,  374,  374,  258,
+      258,  258,  258,  258,  258,  258,  258,  258,  258,  374,
+      374,  374,  374,  374,  374,  374,  374,  374,  374,  589,
+      643,  751,  747,  644,  752,  753,  754,  755,  756,  757,
+      758,  759,  760,  645,  761,  762,  763,  764,  646,  765,
+      766,  590,  767,  589,  768,  643,  747,  769,  644,  770,
+
+      754,  771,  772,  773,  774,  775,  776,  645,  777,  778,
+      779,  780,  646,  781,  782,  783,  784,  785,  786,  787,
+      788,  789,  790,  791,  792,  793,  794,  795,  796,  797,
+      798,  799,  800,  801,  802,  803,  804,  805,  806,  783,
+      807,  808,  809,  810,  811,  812,  813,  814,  815,  816,
+      817,  818,  819,  820,  821,  822,  823,  824,  825,  826,
+      827,  828,  829,  830,  831,  832,  833,  834,  835,   64,
+      735,  734,  733,  732,  731,  730,  729,  728,  727,  726,
+      725,  724,  722,  721,  720,  719,  718,  717,  716,  715,
+      714,  713,  712,  711,  710,  709,  708,  707,  706,  705,
+
+      704,  703,  702,  701,  700,  699,  698,  697,  696,  695,
+      694,  693,  692,  691,  690,  689,  688,  687,  686,  685,
+      684,  683,  682,  681,  680,  679,  678,  677,  676,  675,
+      674,  673,  672,  671,  670,  669,  668,  667,  666,  665,
+      664,  663,  662,  661,  660,  659,  658,  657,  656,  655,
+      654,  653,  652,  651,  650,  649,  648,  647,  642,  641,
+      640,  639,  638,  637,  636,  635,  634,  633,  632,  631,
+      630,  629,  628,  627,  626,  625,  624,  623,  622,  621,
+      620,  619,  618,  617,  616,  615,  614,  613,  612,  611,
+      610,  609,  608,  605,  604,  603,  602,  601,  600,  599,
+
+      598,  597,  596,  595,  594,  593,  592,  591,  588,  587,
+      586,  585,  584,  583,  582,  581,  580,  579,  578,  577,
+      576,  575,  574,  571,  570,  569,  568,  565,  564,  563,
+      562,  561,  560,  559,  558,  557,  556,  555,  554,  553,
+      552,  551,  550,  549,  548,  547,  546,  543,  542,  541,
+      540,  537,  536,  535,  534,  533,  532,  531,  530,  529,
+      528,  527,  526,  525,  524,  523,  522,  521,  520,  519,
+      518,  517,  516,  515,  514,  513,  512,  511,  510,  509,
+      508,  507,  506,  505,  504,  503,  502,  501,  498,  497,
+      496,  495,  492,  491,  490,  489,  488,  487,  486,  485,
+
+      484,  483,  482,  481,  480,  479,  478,  477,  476,  475,
+      474,  473,  472,  471,  470,  469,  468,  467,  466,  465,
+      464,  463,  462,  461,  460,  459,  458,  457,  456,  455,
+      452,  449,  448,  447,  446,  445,  444,  443,  442,  441,
+      440,  439,  437,  436,  435,  434,  433,  432,  431,  430,
+      429,  428,  427,  426,  425,  422,  421,  420,  419,  418,
+      417,  416,  415,  414,  413,  412,  411,  410,  409,  408,
+      407,  406,  405,  404,  403,  402,  401,  400,  399,  398,
+      397,  396,  395,  392,  391,  390,  389,  388,  387,  386,
+      385,  384,  383,  382,  381,  380,  379,  378,  377,  376,
+
+      375,  365,  364,  363,  362,  361,  360,  359,  358,  357,
+      356,  355,  350,  349,  348,  347,  346,  345,  344,  343,
+      342,  341,  340,  339,  338,  337,  334,  333,  332,  331,
+      330,  329,  328,  327,  326,  325,  324,  323,  322,  321,
+      320,  319,  318,  317,  316,  315,  314,  313,  312,  311,
+      310,  309,  308,  307,  306,  302,  301,  300,  299,  298,
+      297,  296,  295,  294,  293,  290,  289,  288,  287,  286,
+      285,  284,  283,  282,  279,  276,  275,  274,  273,  272,
+      271,  270,  269,  268,  267,  266,  262,  261,  260,  259,
+      253,  252,  251,  250,  249,  248,  247,  246,  245,  242,
+
+      241,  240,  236,  235,  234,  233,  232,  231,  230,  225,
+      224,  223,  218,  217,  216,  215,  214,  213,  210,  209,
+      204,  203,  202,  201,  200,  197,  196,  195,  194,  193,
+      192,  191,  190,  189,  185,  184,  183,  182,  181,  180,
+      176,  175,  169,  168,  167,  164,  161,  160,  159,  158,
+      157,  156,  155,  154,  148,  147,  146,  145,  121,  113,
+      112,  104,   63,   62,   61,   48,   47,   46,  836,    3,
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+      836,  836,  836
     } ;
 
-static yyconst flex_int16_t yy_chk[1008] =
+static yyconst flex_int16_t yy_chk[1044] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -838,108 +851,112 @@ static yyconst flex_int16_t yy_chk[1008] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,   12,   14,   13,   14,   14,   14,   14,
        14,   99,   99,   15,   28,   12,   13,   15,   16,   23,
-       16,   16,   16,   16,   16,  710,   15,   22,   22,   22,
+       16,   16,   16,   16,   16,  707,   15,   22,   22,   22,
 
        23,   28,   73,   24,   16,  118,   22,   24,   73,   23,
        24,   24,   22,   22,   22,   42,   24,   24,   25,   24,
-       42,  107,   25,  711,  118,   26,  107,   26,   27,   16,
-       25,   26,   30,  169,   26,   29,   27,   26,   27,   27,
-       29,   27,  169,   75,   33,   34,  713,   27,   33,   30,
-       29,   75,   33,  715,   37,  106,   30,   33,   37,   34,
+       42,  107,   25,  710,  118,   26,  107,   26,   27,   16,
+       25,   26,   30,  170,   26,   29,   27,   26,   27,   27,
+       29,   27,  170,   75,   33,   34,  711,   27,   33,   30,
+       29,   75,   33,  712,   37,  106,   30,   33,   37,   34,
       110,   37,   37,  106,   37,   39,  110,   37,   34,   39,
-       37,  225,   40,   41,   41,   40,   40,  225,   39,   40,
-       82,   82,   40,   40,   39,   82,   40,   40,  119,   41,
-      119,   40,  157,   54,   54,   54,   54,   54,   58,   58,
-
-       58,   58,   58,  134,  134,  171,   41,   54,  157,  157,
-       41,   59,   58,   59,   59,   59,   59,   59,  171,   41,
-       79,  453,   41,   79,   79,  453,   79,   59,  123,  717,
-       79,  123,   54,  182,   60,   60,  182,   58,   60,   60,
-       60,   60,   60,   89,  123,  130,  123,  279,  130,   89,
-      279,  718,   59,   89,  130,  148,  148,  317,  317,  148,
-      148,  148,  148,  148,  149,  149,  149,  149,  149,  150,
-      150,  331,  719,  150,  150,  150,  150,  150,  149,  151,
-      151,  151,  151,  151,  152,  152,  152,  152,  152,  459,
-      195,  348,  345,  239,  459,  331,  239,  251,  345,  721,
-
-      251,  723,  348,  149,  195,  251,  239,  195,  239,  251,
-      724,  251,  251,  398,  398,  251,  252,  252,  252,  252,
-      252,  253,  253,  253,  253,  253,  254,  254,  726,  727,
+       37,   89,   41,   41,   40,  713,   40,   89,   39,   40,
+       40,   89,  183,   40,   39,  183,   40,   40,   41,  457,
+       40,   40,  119,  457,  119,   40,   54,   54,   54,   54,
+
+       54,   82,   82,  463,  123,   41,   82,  123,  463,   41,
+       54,   58,   58,   58,   58,   58,  135,  135,   41,  172,
+      123,   41,  123,  333,   59,   58,   59,   59,   59,   59,
+       59,  281,  172,  226,  281,   54,  714,   60,   60,  226,
+       59,   60,   60,   60,   60,   60,  131,  333,   79,  131,
+       58,   79,   79,  348,   79,  131,  149,  149,   79,  348,
+      149,  149,  149,  149,  149,   59,  150,  150,  150,  150,
+      150,  151,  151,  319,  319,  151,  151,  151,  151,  151,
+      150,  152,  152,  152,  152,  152,  153,  153,  153,  153,
+      153,  158,  196,  351,  401,  401,  410,  241,  493,  410,
+
+      241,  715,  493,  544,  351,  150,  196,  158,  158,  196,
+      241,  253,  241,  499,  253,  716,  717,  718,  688,  253,
+      544,  499,  720,  253,  723,  253,  253,  544,  724,  253,
       254,  254,  254,  254,  254,  255,  255,  255,  255,  255,
-      256,  256,  256,  256,  256,  370,  370,  370,  370,  370,
-      371,  371,  371,  371,  371,  407,  489,  495,  407,  518,
-      489,  539,  583,  728,  716,  495,  729,  730,  733,  735,
-      736,  738,  739,  740,  741,  742,  743,  583,  539,  744,
-      745,  518,  746,  518,  747,  539,  748,  583,  716,  749,
-      750,  751,  752,  753,  754,  755,  756,  757,  758,  759,
-
-      761,  583,  762,  764,  765,  767,  769,  770,  771,  772,
-      775,  776,  777,  778,  779,  780,  781,  782,  784,  785,
-      786,  787,  788,  790,  791,  792,  793,  794,  795,  799,
-      800,  801,  802,  806,  708,  706,  705,  704,  703,  702,
-      701,  700,  699,  698,  695,  693,  692,  691,  689,  688,
-      687,  685,  684,  682,  679,  678,  677,  676,  675,  674,
-      672,  670,  669,  668,  666,  665,  664,  663,  662,  661,
-      659,  658,  657,  656,  654,  653,  652,  651,  650,  649,
-      647,  646,  645,  642,  641,  640,  639,  638,  637,  636,
-      633,  632,  628,  627,  624,  623,  622,  621,  619,  616,
-
-      615,  614,  613,  611,  610,  609,  608,  607,  606,  605,
-      604,  603,  602,  601,  600,  599,  598,  597,  595,  594,
-      593,  590,  589,  587,  586,  585,  584,  582,  581,  580,
-      579,  578,  577,  576,  575,  574,  573,  572,  571,  570,
-      569,  568,  567,  566,  564,  563,  562,  560,  559,  558,
-      557,  556,  553,  552,  551,  550,  549,  548,  545,  544,
-      541,  540,  538,  537,  536,  535,  534,  533,  532,  531,
-      528,  525,  524,  522,  520,  519,  517,  515,  513,  512,
-      511,  509,  507,  506,  505,  502,  501,  500,  499,  498,
-      496,  494,  493,  492,  490,  486,  485,  484,  483,  482,
-
-      481,  480,  479,  478,  477,  475,  474,  473,  471,  470,
-      467,  466,  464,  462,  460,  457,  456,  455,  454,  452,
-      451,  450,  449,  448,  446,  445,  444,  443,  441,  440,
-      439,  438,  437,  436,  435,  434,  433,  431,  429,  428,
-      427,  424,  423,  422,  421,  420,  418,  417,  416,  414,
-      413,  411,  410,  409,  408,  406,  403,  402,  399,  397,
-      396,  395,  394,  393,  392,  391,  390,  389,  388,  387,
-      386,  385,  384,  383,  382,  381,  379,  377,  376,  375,
-      374,  373,  368,  367,  365,  362,  361,  360,  359,  358,
-      357,  354,  353,  352,  351,  350,  349,  346,  344,  343,
-
-      340,  339,  338,  337,  336,  335,  334,  333,  330,  329,
-      328,  327,  326,  325,  324,  323,  322,  321,  320,  319,
-      318,  316,  313,  312,  311,  310,  309,  308,  307,  306,
-      303,  302,  301,  300,  299,  297,  296,  294,  292,  291,
-      290,  289,  288,  286,  285,  284,  283,  282,  280,  278,
-      277,  276,  275,  274,  273,  271,  269,  268,  267,  266,
-      265,  263,  262,  261,  260,  259,  257,  250,  249,  248,
-      247,  246,  245,  244,  243,  242,  241,  240,  238,  237,
-      236,  235,  234,  233,  232,  231,  230,  229,  228,  227,
-      226,  224,  223,  222,  221,  220,  219,  218,  217,  216,
-
-      215,  214,  213,  212,  211,  210,  209,  208,  207,  206,
-      205,  204,  203,  202,  201,  200,  199,  198,  197,  196,
-      194,  193,  191,  190,  189,  188,  187,  185,  184,  183,
-      181,  180,  179,  178,  177,  176,  175,  173,  172,  170,
-      168,  167,  166,  165,  164,  163,  162,  161,  160,  159,
-      158,  156,  155,  154,  153,  145,  144,  143,  142,  141,
-      140,  139,  138,  137,  133,  132,  131,  129,  128,  127,
-      126,  125,  124,  122,  121,  120,  116,  115,  114,  113,
-      112,  111,  109,  108,  105,  104,  103,  101,  100,   98,
-       97,   96,   95,   94,   93,   92,   91,   90,   88,   87,
-
-       86,   85,   84,   83,   81,   80,   78,   77,   76,   74,
-       72,   71,   70,   69,   68,   67,   66,   65,   53,   45,
-       44,   43,   38,   36,   35,   32,   21,   20,   19,   11,
-        9,    7,    3,  805,  805,  805,  805,  805,  805,  805,
-      805,  805,  805,  805,  805,  805,  805,  805,  805,  805,
-      805,  805,  805,  805,  805,  805,  805,  805,  805,  805,
-      805,  805,  805,  805,  805,  805,  805,  805,  805,  805,
-      805,  805,  805,  805,  805,  805,  805,  805,  805,  805,
-      805,  805,  805,  805,  805,  805,  805,  805,  805,  805,
-      805,  805,  805,  805,  805,  805,  805,  805,  805,  805,
-
-      805,  805,  805,  805,  805,  805,  805
+      256,  256,  688,  725,  256,  256,  256,  256,  256,  257,
+      257,  257,  257,  257,  258,  258,  258,  258,  258,  373,
+      373,  373,  373,  373,  374,  374,  374,  374,  374,  522,
+      588,  727,  721,  588,  728,  730,  731,  732,  733,  734,
+      736,  738,  739,  588,  741,  742,  743,  744,  588,  745,
+      747,  522,  748,  522,  750,  588,  721,  751,  588,  753,
+
+      731,  754,  756,  757,  758,  759,  760,  588,  761,  762,
+      763,  764,  588,  765,  766,  767,  768,  769,  770,  771,
+      772,  773,  774,  775,  776,  777,  778,  779,  780,  782,
+      783,  784,  785,  786,  788,  789,  791,  793,  794,  767,
+      795,  796,  797,  798,  802,  803,  804,  805,  806,  807,
+      808,  810,  811,  813,  814,  815,  816,  817,  818,  820,
+      821,  822,  823,  824,  826,  830,  831,  832,  833,  837,
+      705,  704,  703,  701,  700,  699,  697,  696,  694,  693,
+      690,  689,  687,  686,  685,  684,  683,  681,  679,  678,
+      677,  675,  674,  673,  672,  671,  670,  668,  667,  666,
+
+      665,  663,  662,  661,  660,  659,  658,  656,  655,  654,
+      651,  650,  649,  648,  647,  646,  645,  644,  643,  642,
+      639,  638,  634,  633,  630,  629,  628,  627,  625,  622,
+      621,  620,  619,  617,  616,  615,  614,  613,  612,  611,
+      610,  609,  608,  607,  606,  605,  604,  603,  601,  600,
+      599,  596,  595,  594,  592,  591,  590,  589,  587,  586,
+      585,  584,  583,  582,  581,  580,  579,  578,  577,  576,
+      575,  574,  573,  572,  571,  569,  568,  567,  565,  564,
+      563,  562,  561,  558,  557,  556,  555,  554,  553,  550,
+      549,  546,  545,  543,  542,  541,  540,  539,  538,  537,
+
+      536,  533,  530,  529,  528,  526,  524,  523,  521,  519,
+      517,  516,  515,  513,  511,  510,  509,  506,  505,  504,
+      503,  502,  500,  498,  497,  496,  494,  490,  489,  488,
+      487,  486,  485,  484,  483,  482,  481,  479,  478,  477,
+      475,  474,  471,  470,  468,  466,  464,  461,  460,  459,
+      458,  456,  455,  454,  453,  452,  450,  449,  448,  447,
+      446,  444,  443,  442,  441,  440,  439,  438,  437,  436,
+      434,  432,  431,  430,  427,  426,  425,  424,  423,  421,
+      420,  419,  417,  416,  414,  413,  412,  411,  409,  406,
+      405,  402,  400,  399,  398,  397,  396,  395,  394,  393,
+
+      392,  391,  390,  389,  388,  387,  386,  385,  384,  382,
+      380,  379,  378,  377,  376,  371,  370,  368,  365,  364,
+      363,  362,  361,  360,  357,  356,  355,  354,  353,  352,
+      349,  347,  346,  343,  342,  341,  340,  339,  338,  337,
+      336,  335,  332,  331,  330,  329,  328,  327,  326,  325,
+      324,  323,  322,  321,  320,  318,  315,  314,  313,  312,
+      311,  310,  309,  308,  305,  304,  303,  302,  301,  299,
+      298,  296,  294,  293,  292,  291,  290,  288,  287,  286,
+      285,  284,  282,  280,  279,  278,  277,  276,  275,  273,
+      271,  270,  269,  268,  267,  265,  264,  263,  262,  261,
+
+      259,  252,  251,  250,  249,  248,  247,  246,  245,  244,
+      243,  242,  240,  239,  238,  237,  236,  235,  234,  233,
+      232,  231,  230,  229,  228,  227,  225,  224,  223,  222,
+      221,  220,  219,  218,  217,  216,  215,  214,  213,  212,
+      211,  210,  209,  208,  207,  206,  205,  204,  203,  202,
+      201,  200,  199,  198,  197,  195,  194,  192,  191,  190,
+      189,  188,  186,  185,  184,  182,  181,  180,  179,  178,
+      177,  176,  174,  173,  171,  169,  168,  167,  166,  165,
+      164,  163,  162,  161,  160,  159,  157,  156,  155,  154,
+      146,  145,  144,  143,  142,  141,  140,  139,  138,  134,
+
+      133,  132,  130,  129,  128,  127,  126,  125,  124,  122,
+      121,  120,  116,  115,  114,  113,  112,  111,  109,  108,
+      105,  104,  103,  101,  100,   98,   97,   96,   95,   94,
+       93,   92,   91,   90,   88,   87,   86,   85,   84,   83,
+       81,   80,   78,   77,   76,   74,   72,   71,   70,   69,
+       68,   67,   66,   65,   53,   45,   44,   43,   38,   36,
+       35,   32,   21,   20,   19,   11,    9,    7,    3,  836,
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+      836,  836,  836,  836,  836,  836,  836,  836,  836,  836,
+      836,  836,  836
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -996,7 +1013,7 @@ void   skipline(void);
 #define YY_NO_UNISTD_H
 #endif
 
-#line 1000 "Gmsh.yy.cpp"
+#line 1017 "Gmsh.yy.cpp"
 
 #define INITIAL 0
 
@@ -1181,7 +1198,7 @@ YY_DECL
 #line 49 "Gmsh.l"
 
 
-#line 1185 "Gmsh.yy.cpp"
+#line 1202 "Gmsh.yy.cpp"
 
 	if ( !(yy_init) )
 		{
@@ -1234,13 +1251,13 @@ yy_match:
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 806 )
+				if ( yy_current_state >= 837 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			++yy_cp;
 			}
-		while ( yy_base[yy_current_state] != 934 );
+		while ( yy_base[yy_current_state] != 970 );
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
@@ -1883,250 +1900,265 @@ return tPlugin;
 case 124:
 YY_RULE_SETUP
 #line 190 "Gmsh.l"
-return tQuadTriDbl;
+return tQuadTriAddVerts;
 	YY_BREAK
 case 125:
 YY_RULE_SETUP
 #line 191 "Gmsh.l"
-return tQuadTriSngl;
+return tQuadTriNoNewVerts;
 	YY_BREAK
 case 126:
 YY_RULE_SETUP
 #line 193 "Gmsh.l"
-return tRecombine;
+return tQuadTriDbl;
 	YY_BREAK
 case 127:
 YY_RULE_SETUP
 #line 194 "Gmsh.l"
-return tRecombLaterals;
+return tQuadTriSngl;
 	YY_BREAK
 case 128:
 YY_RULE_SETUP
-#line 195 "Gmsh.l"
-return tRecursive;
+#line 196 "Gmsh.l"
+return tRecombine;
 	YY_BREAK
 case 129:
 YY_RULE_SETUP
-#line 196 "Gmsh.l"
-return tRotate;
+#line 197 "Gmsh.l"
+return tRecombLaterals;
 	YY_BREAK
 case 130:
 YY_RULE_SETUP
-#line 197 "Gmsh.l"
-return tRuled;
+#line 198 "Gmsh.l"
+return tRecursive;
 	YY_BREAK
 case 131:
 YY_RULE_SETUP
-#line 198 "Gmsh.l"
-return tRand;
+#line 199 "Gmsh.l"
+return tRotate;
 	YY_BREAK
 case 132:
 YY_RULE_SETUP
-#line 199 "Gmsh.l"
-return tRefineMesh;
+#line 200 "Gmsh.l"
+return tRuled;
 	YY_BREAK
 case 133:
 YY_RULE_SETUP
-#line 200 "Gmsh.l"
-return tReturn;
+#line 201 "Gmsh.l"
+return tRand;
 	YY_BREAK
 case 134:
 YY_RULE_SETUP
-#line 201 "Gmsh.l"
-return tReverse;
+#line 202 "Gmsh.l"
+return tRefineMesh;
 	YY_BREAK
 case 135:
 YY_RULE_SETUP
 #line 203 "Gmsh.l"
-return tSmoother;
+return tReturn;
 	YY_BREAK
 case 136:
 YY_RULE_SETUP
 #line 204 "Gmsh.l"
-return tSetOrder;
+return tReverse;
 	YY_BREAK
 case 137:
 YY_RULE_SETUP
-#line 205 "Gmsh.l"
-return tSqrt;
+#line 206 "Gmsh.l"
+return tScaleLast;
 	YY_BREAK
 case 138:
 YY_RULE_SETUP
-#line 206 "Gmsh.l"
-return tSin;
+#line 207 "Gmsh.l"
+return tSmoother;
 	YY_BREAK
 case 139:
 YY_RULE_SETUP
-#line 207 "Gmsh.l"
-return tSinh;
+#line 208 "Gmsh.l"
+return tSetOrder;
 	YY_BREAK
 case 140:
 YY_RULE_SETUP
-#line 208 "Gmsh.l"
-return tSphere;
+#line 209 "Gmsh.l"
+return tSqrt;
 	YY_BREAK
 case 141:
 YY_RULE_SETUP
-#line 209 "Gmsh.l"
-return tSpline;
+#line 210 "Gmsh.l"
+return tSin;
 	YY_BREAK
 case 142:
 YY_RULE_SETUP
-#line 210 "Gmsh.l"
-return tSplit;
+#line 211 "Gmsh.l"
+return tSinh;
 	YY_BREAK
 case 143:
 YY_RULE_SETUP
-#line 211 "Gmsh.l"
-return tSurface;
+#line 212 "Gmsh.l"
+return tSphere;
 	YY_BREAK
 case 144:
 YY_RULE_SETUP
-#line 212 "Gmsh.l"
-return tStr;
+#line 213 "Gmsh.l"
+return tSpline;
 	YY_BREAK
 case 145:
 YY_RULE_SETUP
-#line 213 "Gmsh.l"
-return tSprintf;
+#line 214 "Gmsh.l"
+return tSplit;
 	YY_BREAK
 case 146:
 YY_RULE_SETUP
-#line 214 "Gmsh.l"
-return tStrCat;
+#line 215 "Gmsh.l"
+return tSurface;
 	YY_BREAK
 case 147:
 YY_RULE_SETUP
-#line 215 "Gmsh.l"
-return tStrReplace;
+#line 216 "Gmsh.l"
+return tStr;
 	YY_BREAK
 case 148:
 YY_RULE_SETUP
-#line 216 "Gmsh.l"
-return tStrPrefix;
+#line 217 "Gmsh.l"
+return tSprintf;
 	YY_BREAK
 case 149:
 YY_RULE_SETUP
-#line 217 "Gmsh.l"
-return tStrRelative;
+#line 218 "Gmsh.l"
+return tStrCat;
 	YY_BREAK
 case 150:
 YY_RULE_SETUP
-#line 218 "Gmsh.l"
-return tStrFind;
+#line 219 "Gmsh.l"
+return tStrReplace;
 	YY_BREAK
 case 151:
 YY_RULE_SETUP
-#line 219 "Gmsh.l"
-return tStrCmp;
+#line 220 "Gmsh.l"
+return tStrPrefix;
 	YY_BREAK
 case 152:
 YY_RULE_SETUP
-#line 220 "Gmsh.l"
-return tShow;
+#line 221 "Gmsh.l"
+return tStrRelative;
 	YY_BREAK
 case 153:
 YY_RULE_SETUP
-#line 221 "Gmsh.l"
-return tSymmetry;
+#line 222 "Gmsh.l"
+return tStrFind;
 	YY_BREAK
 case 154:
 YY_RULE_SETUP
-#line 222 "Gmsh.l"
-return tSyncModel;
+#line 223 "Gmsh.l"
+return tStrCmp;
 	YY_BREAK
 case 155:
 YY_RULE_SETUP
 #line 224 "Gmsh.l"
-return tText2D;
+return tShow;
 	YY_BREAK
 case 156:
 YY_RULE_SETUP
 #line 225 "Gmsh.l"
-return tText3D;
+return tSymmetry;
 	YY_BREAK
 case 157:
 YY_RULE_SETUP
 #line 226 "Gmsh.l"
-return tTextAttributes;
+return tSyncModel;
 	YY_BREAK
 case 158:
 YY_RULE_SETUP
-#line 227 "Gmsh.l"
-return tTime;
+#line 228 "Gmsh.l"
+return tText2D;
 	YY_BREAK
 case 159:
 YY_RULE_SETUP
-#line 228 "Gmsh.l"
-return tTransfinite;
+#line 229 "Gmsh.l"
+return tText3D;
 	YY_BREAK
 case 160:
 YY_RULE_SETUP
-#line 229 "Gmsh.l"
-return tTransfQuadTri;
+#line 230 "Gmsh.l"
+return tTextAttributes;
 	YY_BREAK
 case 161:
 YY_RULE_SETUP
-#line 230 "Gmsh.l"
-return tTranslate;
+#line 231 "Gmsh.l"
+return tTime;
 	YY_BREAK
 case 162:
 YY_RULE_SETUP
-#line 231 "Gmsh.l"
-return tTanh;
+#line 232 "Gmsh.l"
+return tTransfinite;
 	YY_BREAK
 case 163:
 YY_RULE_SETUP
-#line 232 "Gmsh.l"
-return tTan;
+#line 233 "Gmsh.l"
+return tTransfQuadTri;
 	YY_BREAK
 case 164:
 YY_RULE_SETUP
-#line 233 "Gmsh.l"
-return tToday;
+#line 234 "Gmsh.l"
+return tTranslate;
 	YY_BREAK
 case 165:
 YY_RULE_SETUP
 #line 235 "Gmsh.l"
-return tUndefineConstant;
+return tTanh;
 	YY_BREAK
 case 166:
 YY_RULE_SETUP
 #line 236 "Gmsh.l"
-return tUsing;
+return tTan;
 	YY_BREAK
 case 167:
 YY_RULE_SETUP
-#line 238 "Gmsh.l"
-return tVolume;
+#line 237 "Gmsh.l"
+return tToday;
 	YY_BREAK
 case 168:
-#line 241 "Gmsh.l"
+YY_RULE_SETUP
+#line 239 "Gmsh.l"
+return tUndefineConstant;
+	YY_BREAK
 case 169:
-#line 242 "Gmsh.l"
+YY_RULE_SETUP
+#line 240 "Gmsh.l"
+return tUsing;
+	YY_BREAK
 case 170:
-#line 243 "Gmsh.l"
+YY_RULE_SETUP
+#line 242 "Gmsh.l"
+return tVolume;
+	YY_BREAK
 case 171:
+#line 245 "Gmsh.l"
+case 172:
+#line 246 "Gmsh.l"
+case 173:
+#line 247 "Gmsh.l"
+case 174:
 YY_RULE_SETUP
-#line 243 "Gmsh.l"
+#line 247 "Gmsh.l"
 { gmsh_yylval.d = atof((char *)gmsh_yytext); return tDOUBLE; }
 	YY_BREAK
-case 172:
+case 175:
 YY_RULE_SETUP
-#line 245 "Gmsh.l"
+#line 249 "Gmsh.l"
 { gmsh_yylval.c = strsave((char*)gmsh_yytext); return tSTRING; }
 	YY_BREAK
-case 173:
+case 176:
 YY_RULE_SETUP
-#line 247 "Gmsh.l"
+#line 251 "Gmsh.l"
 return gmsh_yytext[0];
 	YY_BREAK
-case 174:
+case 177:
 YY_RULE_SETUP
-#line 249 "Gmsh.l"
+#line 253 "Gmsh.l"
 ECHO;
 	YY_BREAK
-#line 2130 "Gmsh.yy.cpp"
+#line 2162 "Gmsh.yy.cpp"
 case YY_STATE_EOF(INITIAL):
 	yyterminate();
 
@@ -2418,7 +2450,7 @@ static int yy_get_next_buffer (void)
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 806 )
+			if ( yy_current_state >= 837 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -2446,11 +2478,11 @@ static int yy_get_next_buffer (void)
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 806 )
+		if ( yy_current_state >= 837 )
 			yy_c = yy_meta[(unsigned int) yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 805);
+	yy_is_jam = (yy_current_state == 836);
 
 	return yy_is_jam ? 0 : yy_current_state;
 }
@@ -3123,7 +3155,7 @@ void gmsh_yyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 249 "Gmsh.l"
+#line 253 "Gmsh.l"
 
 
 
diff --git a/benchmarks/extrude_quadtri/3sidedruled.stl.gz b/benchmarks/extrude_quadtri/3sidedruled.stl.gz
new file mode 100644
index 0000000000000000000000000000000000000000..421c8ef4715ded22274283e07a305838245a0178
Binary files /dev/null and b/benchmarks/extrude_quadtri/3sidedruled.stl.gz differ
diff --git a/benchmarks/extrude_quadtri/READMEQUADTRI.txt b/benchmarks/extrude_quadtri/READMEQUADTRI.txt
new file mode 100644
index 0000000000000000000000000000000000000000..6298e81b3f81b99aa09d35474da8c9a80b8e72d7
--- /dev/null
+++ b/benchmarks/extrude_quadtri/READMEQUADTRI.txt
@@ -0,0 +1,253 @@
+INFORMATION FOR QUADTRI PATCH VERSION 2.0 (August 23, 2013) 
+
+All new code is written by Trevor S. Strickler 
+<trevor.strickler@gmail.com>
+
+Trevor S. Strickler hereby transfers copyright of QuadTri files to 
+Christophe Geuzaine and J.-F. Remacle with the understanding that 
+his contribution shall be cited appropriately.
+
+All code reused from Gmsh is Copyright (C) 1997-2013 C. Geuzaine, 
+J.-F. Remacle 
+
+Gmsh is available at: www.geuz.org/gmsh
+
+See licensing information below.
+
+
+CONTENTS:
+
+1. Copyright and Licensing
+
+2. Introduction
+
+3. How QuadTri works.
+   a. For Transfinite Volumes.
+   b. For Structured Extrusions.
+
+4. Invoking QuadTri.
+   a. For Transfinite Volumes.
+   b. For Structured Extrusions.
+
+5. How to modify Gmsh to use QuadTri.
+
+
+COPYRIGHT AND LICENSING
+-----------------------
+
+QuadTri was written by Trevor S. Strickler 
+<trevor.strickler@gmail.com>. It is written as an addition to the
+meshing code Gmsh, which is copyrighted by C. Geuzaine and J.-F. 
+Remacle and distributed under the GNU Public License version 2 with 
+an exception. QuadTri is released under the GNU Public License 
+Version 2 with the SAME exceptions as for the current release of Gmsh 
+as of August 23, 2013.  See LICENSE.txt for more information.
+
+Trevor S. Strickler hereby transfers copyright of QuadTri files to 
+Christophe Geuzaine and J.-F. Remacle with the understanding that 
+his contribution shall be cited appropriately.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License, Version 2,
+as published by the Free Software Foundation, or (at your option) 
+any later version, with or without the exception given in the 
+LICENSE.txt file supplied with this code and with Gmsh.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+
+INTRODUCTION
+----------------------------
+
+The Quadrangle-to-Triangle (QuadToTri) interface allows the user to connect 
+structured regions containing quadrangle-bounded mesh elements (hexahedra, 
+prisms, or pyramids) to regions that contain tetrahedra. The QuadToTri 
+feature may be applied to both structured extrusions and tranfinite regions. 
+
+
+HOW QUADTRI WORKS
+-----------------
+
+The QuadToTri algorithms create a conformal interface between structured 
+regions that contain quadrangle-bounded mesh elements and tetrahedral regions
+by subdividing elements in the quadrangle-containing region. First, on the 
+boundaries that the quad-containing region shares with a tetrahedral region, 
+all 2D quadrangle elements are divided into triangles. Then, the 3D volume 
+elements in the quad-containing region that touch these triangles are 
+subdivided into pyramids, tetrahedra, or prisms as necessary for the mesh to 
+remain conformal.
+
+a. FOR TRANSFINITE VOLUMES:  
+
+The QuadTri algorithm for transfinite volumes is very simple. 
+A transfinite region with any combination of recombined and 
+un-recombined transfinite boundary surfaces is valid when meshed with 
+Transfinite QuadTri. Any mesh elements in a QuadToTri transfinite region 
+that are adjacent to unrecombined, 2D boundary surface elements will 
+be divided with a body-centered internal vertex, conformal to the 
+surface mesh. This method works for both 5- and 6-sided transfinite
+regions. 
+
+
+b. STRUCTURED EXTRUSIONS: 
+
+QuadToTri may also be applied to structured extrusions.
+The QuadToTri algorithms for structured extrusions ( from here on referred to 
+as 'QuadTriExtruded') work for any structured, extruded region. Source surfaces
+may be structured or unstructured; the sources may also be all quadrangles, 
+all triangles, or mixed. Recently, the ability was added to apply QuadToTri to 
+a region extruded in a toroidal loop in which the 'top' surface coincides with
+the source. The user also has the option to keep free lateral boundaries 
+recombined (where possible) and only divide the top surface into triangles.  
+
+There are two variations of QuadToTri for structured extrusions: the
+'Add Vertices' method (method 1), and the 'No New Vertices' method (method 2).
+
+Method 1 (No New Vertices): In 2D, this method subdivides the quadrangles
+on the following boundary surfaces of an extruded, structured region: the top
+surface of the extruded region, the boundaries that the region shares with
+tetrahedral regions, and free lateral boundaries if the user has selected to
+do so. In 3D, the method attempts to subdivide 3D elements in the region that 
+touch the boundary surface triangles WITHOUT adding any additional vertices. 
+This subdivision is accomplished by creating pyramids, prisms, or tetrahedra 
+such that the mesh remains valid. In some cases, due to certain lateral 
+boundary conditions, it may not be possible make a valid element subdivision 
+without adding additional vertices. In this case, an internal vertex is 
+created at the vertex-based centroid of the element. The element is then 
+divided using that vertex. When an internal vertex is created in the 'No New 
+Vertices' method, the user is alerted by a warning message sent for each 
+instance--however, the mesh will still be valid and conformal.
+
+Method 2: (Add Vertices) In 2D, as in method 1, this method subdivides the
+quadrangles on the following boundary surfaces of an extruded, structured 
+region: the top surface of the extruded region, the boundaries the region 
+shares with tetrahedral regions, and free lateral boundaries if the user has 
+selected to do so.  In 3D, body-centered vertices are added at the centroids 
+of any 3D elements in the region that are adjacent to the subdivided 2D 
+boundaries. The elements are then subdivided using the internal vertex into 
+pyramids, prisms, or tetrahedra such that the mesh remains valid.
+
+There are advantages and disadvantages to each of these two methods:
+
+The 'No New Vertices' method creates the least number of mesh elements,
+but the quality of the elements is sometimes slightly worse than for the 
+'Add Vertices' method when hexahedra are being divided.  Also, in rare 
+instances, the 'No New Vertices' method may be unable to divide an element 
+without adding a body-centered vertex; however, this is rare and *should* 
+only be possible when the source surface has 2D elements with all vertices 
+on a boundary AND if there are both recombined and unrecombined lateral 
+surfaces in the extrusion--but even then it is unlikely. Even if a new 
+vertex is created by the 'No New Vertices' method, the mesh will still be 
+conformal--but some users may not want an irregular vertex pattern in their
+structured extrusions.
+
+
+Recommendations: For considerations of element quality, use 'No New Vertices'
+when only prisms are being divided (ie, when the extrusion  source is a 
+surface with all triangles). Use 'Add New Vertices' whenever hexahedra are 
+involved, or when the user does not care if new vertices are added to the 
+mesh.
+
+If the user has a quad-containing, structured mesh to interface to 
+a tetrahedral region but would also like the structured mesh to remain 
+unchanged, interface regions may be built around the primary structured 
+region and those regions may have QuadToTri applied in order to create the
+interface.
+
+
+As a last note on QuadTriExtruded: The algorithms are 'smart' about the
+boundary requirements of neighboring regions and will resolve lateral surface 
+mesh conflicts where ever necessary. The default behavior is to divide 
+free lateral boundaries into triangles when possible. Alternatively, the user
+may choose to have as many laterals as possible remain as quadrangles. 
+However, regardless of user preference, the algorithms will do what they 
+have to do to maintain conformal meshes on the laterals. In other words, do 
+not worry about conformality with lateral neighbors--QuadTriExtruded will not 
+divide a lateral surface that must remain meshed as quadrangles, and it will 
+not recombine a lateral surface that must remain as triangles. However, NOTE:
+the 'top' surface of a structured region is always divided by 
+QuadTriExtruded. Also, laterals between two QuadTriExtruded regions are 
+always recombined as quadrangles.
+
+
+
+INVOKING QUADTRI 
+----------------
+
+a. FOR TRANSFINITE VOLUMES:
+
+The transfinite QuadTri algorithm may be applied by using the following
+command:
+
+TransfQuadTri { expression-list } | "*";
+
+Where 'expression-list' is a list of volume numbers to apply QuadTri to.
+"*" is used to apply TransfQuadTri to all existing volumes.  A transfinite
+volume with any combination of recombined and un-recombined transfinite boundary
+surfaces is valid when meshed with TransfQuadTri. When applied to 
+non-Transfinite volumes, TransfQuadTri has NO effect on those volumes.
+
+
+
+b. FOR STRUCTURED EXTRUSIONS:
+
+QuadTri for structured extrusions (QuadTriExtruded) is invoked by using 
+the appropriate keywords in the 'extrude-list layers' part of an 'Extrude' 
+command for structured meshes. (see Gmsh manual for description of the 
+'Extrude' command for structured meshes). Note that the QuadTriExtruded 
+commands only have an effect for the extrusion of a surface to create a 
+region, AND only if the 'Recombine' option is used (there is no point 
+in applying QuadTriExtruded to a fully subdivided region). 
+
+The keywords (note that only the first letter must be capitalized):
+
+     QuadTriNoNewVerts; (for 'No New Vertices' method)
+     QuadTriAddVerts;  (for 'Add Vertices' method)
+
+Permissible variants (shown here as regular expressions (regexp) ):
+
+     Quad[tT]ri[nN]o[nN]ew[vV]erts;
+     Quad[tT]ri[aA]dd[vV]erts;
+
+Optionally, for each of the two QuadTriExtruded methods, the user may choose
+to keep free lateral surfaces of the region recombined (where possible) by
+using:
+
+     QuadTriNoNewVerts Recomblaterals; 
+     QuadTriAddVerts Recomblaterals;
+
+
+Examples of Usage:
+
+'No New Vertices' method, recombine laterals:
+
+     Extrude {0.0, 0.0, 1.0} {Surface {surf_num}; Layers {10}; Recombine; 
+                              QuadTriNoNewVerts Recomblaterals; };
+
+'Add Vertices' method not using the recombine laterals option:
+
+     Extrude {0.0, 0.0, 1.0} {Surface {surf_num}; Layers {10}; QuadTriAddVerts;
+                              Recombine; };
+ 
+Let it be repeated: If the QuadTriExtruded region shares a lateral with another 
+region, QuadTriExtruded will only divide (or not divide) that surface in a way 
+that does not create conflicts between the regions, regardless of 
+whether Recomblaterals was used or not. In other words, do not worry
+about conformality with lateral neighbors--QuadTriExtruded will not divide 
+a lateral surface that must remain quadrangles, nor will it recombine
+a lateral surface that must remain triangles.
+
+
+HOW TO MODIFY GMSH TO USE QUADTRI
+---------------------------------------
+
+One may simply copy the files distributed with the QuadTri patch 
+directly into the appropriate Gmsh directories (replacing any old copies with 
+the patched versions) and the changes to the source will be complete. The 
+user can then compile the source as for the regular Gmsh version. Be careful
+not to get the /Mesh/CMakeLists.txt file confused with the CMakeLists.txt 
+file in other directories!!!!	
+
diff --git a/benchmarks/extrude_quadtri/TransfiniteQuadTriExample.geo b/benchmarks/extrude_quadtri/TransfiniteQuadTriExample.geo
new file mode 100644
index 0000000000000000000000000000000000000000..74f1dff5d902405ea0cee9db4cd774cb8964c11c
--- /dev/null
+++ b/benchmarks/extrude_quadtri/TransfiniteQuadTriExample.geo
@@ -0,0 +1,162 @@
+//set options
+Geometry.Surfaces=1;
+Mesh.SurfaceFaces=1;
+Mesh.RecombinationAlgorithm = 0;
+Mesh.RemeshAlgorithm = 1;
+Mesh.Algorithm=6; // mesh algorithm
+Mesh.Algorithm3D=4; // mesh algorithm
+Geometry.OldRuledSurface=1;
+
+
+length1 = 1.0;
+outer_length  = 2.0;
+
+interface_width = 0.07;
+
+transf1 = 15;
+transf2 = 2;
+transf_outer = 30;
+
+Point (newp) = {0.0, 0.0, 0.0};
+Point (newp) = {length1, 0.0, 0.0};
+Point (newp) = {length1, length1, 0.0};
+Point (newp) = {0.0, length1, 0.0};
+
+source_pts[] = {newp-4, newp-3, newp-2, newp-1};
+
+Line (newl) = {source_pts[0], source_pts[1]};
+Line (newl) = {source_pts[1], source_pts[2]};
+Line (newl) = {source_pts[2], source_pts[3]};
+Line (newl) = {source_pts[3], source_pts[0]};
+
+source_lines[] = {newl-4, newl-3, newl-2, newl-1};
+Transfinite Line {source_lines[]} = transf1;
+Line Loop (newll) = {source_lines[]};
+source_loop = newll-1;
+
+Ruled Surface (news) = {source_loop};
+source_surf = news-1;
+Transfinite Surface {source_surf};
+Recombine Surface {source_surf};
+
+vol1[] = Extrude { 0.0, 0.0, 1.0 }  { Surface{source_surf}; };
+
+
+lines1[] = Boundary { Surface{ vol1[{0,2,3,4,5}] }; };
+Transfinite Line { lines1[] } = transf1;
+
+Transfinite Surface { vol1[{0,2:5}] };
+Recombine Surface { vol1[{0,2:5}] };
+Transfinite Volume { vol1[1] };
+Recombine Volume { vol1[1] };
+
+// transfinite QuadTri volumes start here
+
+vol2[] = Extrude { 0.0, 0.0, -interface_width }  { Surface{source_surf}; };
+lines2[] = Boundary { Surface{ vol2[{0,2,3,4,5}] }; };
+Transfinite Line { lines2[] } = transf2;
+// have to correct some of the previous tranfinite lines:
+Transfinite Line { lines1[], Boundary{Surface{vol2[0]};} } = transf1;
+
+Transfinite Surface { vol2[{0,2:5}] };
+//Recombine Surface { vol2[{2:5}] };
+Transfinite Volume { vol2[1] };
+Recombine Volume { vol2[1] };
+
+vol3[] = Extrude { 0.0, 0.0, interface_width }  { Surface{vol1[0]}; };
+lines3[] = Boundary { Surface{ vol3[{0,2,3,4,5}] }; };
+Transfinite Line { lines3[] } = transf2;
+// have to correct some of the previous tranfinite lines:
+Transfinite Line { lines1[], Boundary{Surface{vol3[0]};} } = transf1;
+
+Transfinite Surface { vol3[{0,2:5}] };
+//Recombine Surface { vol3[{2:5}] };
+Transfinite Volume { vol3[1] };
+Recombine Volume { vol3[1] };
+
+vol4[] = Extrude { 0.0, -interface_width, 0.0 }  { Surface{vol1[2]}; };
+lines4[] = Boundary { Surface{ vol4[{0,2,3,4,5}] }; };
+Transfinite Line { lines4[] } = transf2;
+// have to correct some of the previous tranfinite lines:
+Transfinite Line { lines1[], Boundary{Surface{vol4[0]};} } = transf1;
+
+Transfinite Surface { vol4[{0,2:5}] };
+//Recombine Surface { vol4[{2:5}] };
+Transfinite Volume { vol4[1] };
+Recombine Volume { vol4[1] };
+
+vol5[] = Extrude { 0.0, interface_width, 0.0 }  { Surface{vol1[4]}; };
+lines5[] = Boundary { Surface{ vol5[{0,2,3,4,5}] }; };
+Transfinite Line { lines5[] } = transf2;
+// have to correct some of the previous tranfinite lines:
+Transfinite Line { lines1[], Boundary{Surface{vol5[0]};} } = transf1;
+
+Transfinite Surface { vol5[{0,2:5}] };
+//Recombine Surface { vol5[{2:5}] };
+Transfinite Volume { vol5[1] };
+Recombine Volume { vol5[1] };
+
+vol6[] = Extrude { interface_width,  0.0, 0.0 }  { Surface{vol1[3]}; };
+lines6[] = Boundary { Surface{ vol6[{0,2,3,4,5}] }; };
+Transfinite Line { lines6[] } = transf2;
+// have to correct some of the previous tranfinite lines:
+Transfinite Line { lines1[], Boundary{Surface{vol6[0]};} } = transf1;
+
+Transfinite Surface { vol6[{0,2:5}] };
+//Recombine Surface { vol6[{2:5}] };
+Transfinite Volume { vol6[1] };
+Recombine Volume { vol6[1] };
+
+vol7[] = Extrude { -interface_width,  0.0, 0.0 }  { Surface{vol1[5]}; };
+lines7[] = Boundary { Surface{ vol7[{0,2,3,4,5}] }; };
+Transfinite Line { lines7[] } = transf2;
+// have to correct some of the previous tranfinite lines:
+Transfinite Line { lines1[], Boundary{Surface{vol7[0]};} } = transf1;
+
+Transfinite Surface { vol7[{0,2:5}] };
+//Recombine Surface { vol7[{2:5}] };
+Transfinite Volume { vol7[1] };
+Recombine Volume { vol7[1] };
+
+//Here is the application of Transfinite QuadTri
+TransfQuadTri { vol2[1], vol3[1], vol4[1], vol5[1], vol6[1], vol7[1]  };
+
+
+// outer volume
+Point (newp) = {-(outer_length-length1)/2.0, -(outer_length-length1)/2.0, -(outer_length-length1)/2.0};
+Point (newp) = {(outer_length+length1)/2.0, -(outer_length-length1)/2.0, -(outer_length-length1)/2.0};
+Point (newp) = {(outer_length+length1)/2.0, (outer_length+length1)/2.0, -(outer_length-length1)/2.0};
+Point (newp) = {-(outer_length-length1)/2.0, (outer_length+length1)/2.0, -(outer_length-length1)/2.0};
+
+outer_pts[] = {newp-4, newp-3, newp-2, newp-1};
+
+Line (newl) = {outer_pts[0], outer_pts[1]};
+Line (newl) = {outer_pts[1], outer_pts[2]};
+Line (newl) = {outer_pts[2], outer_pts[3]};
+Line (newl) = {outer_pts[3], outer_pts[0]};
+
+outer_source_lines[] = {newl-4, newl-3, newl-2, newl-1};
+Transfinite Line {outer_source_lines[]} = transf_outer;
+
+Line Loop (newll) = {outer_source_lines[]};
+
+Ruled Surface (news) = {newll-1};
+outer_source = news-1;
+
+outer_vol[] = Extrude { 0.0, 0.0, outer_length } { Surface { outer_source }; };
+Delete { Volume {outer_vol[1]}; }
+Transfinite Line { Boundary{ Surface{ outer_vol[{0,2:5}] }; } } = transf_outer;
+
+Surface Loop (newsl) = {outer_source, outer_vol[{0,2:5}]};
+outer_surf_loop = newsl-1;
+
+Surface Loop (newsl) = { vol2[{0,2:5}], vol3[{0,2:5}], vol4[{0,2:5}], vol5[{0,2:5}], vol6[{0,2:5}],
+                         vol7[{0,2:5}] };
+inner_surf_loop = newsl-1;
+
+Volume (newv) = { outer_surf_loop, inner_surf_loop };
+
+Characteristic Length { Boundary{ Line{ Boundary{ Surface{outer_vol[{0,2:5}] }; } }; } } = outer_length / transf_outer ;
+Characteristic Length { Boundary{ Line{ Boundary{ Surface{vol1[{0,2:5}], vol2[{0,2:5}], vol3[{0,2:5}], vol4[{0,2:5}],
+                        vol5[{0,2:5}], vol6[{0,2:5}], vol7[{0,2:5}] }; } }; } } = length1 / transf1 ;
+
diff --git a/benchmarks/extrude_quadtri/compound_extrude_annular_example.geo b/benchmarks/extrude_quadtri/compound_extrude_annular_example.geo
new file mode 100644
index 0000000000000000000000000000000000000000..f05c7a39ec9df86807e45284fcabd00a5394449e
--- /dev/null
+++ b/benchmarks/extrude_quadtri/compound_extrude_annular_example.geo
@@ -0,0 +1,74 @@
+// an annulus in 4 parts to test extruding compound surface with a hole
+
+
+//set options
+Geometry.Surfaces=1;
+Mesh.SurfaceFaces=1;
+Mesh.RecombinationAlgorithm = 0;
+Mesh.RemeshAlgorithm = 1;
+Mesh.Algorithm=6; // mesh algorithm
+Mesh.Algorithm3D=4; // mesh algorithm
+Geometry.AutoCoherence = 1;
+Geometry.OldRuledSurface=1;
+  
+  
+// center
+Point (newp) = {0, 0, 0};  
+circle_center = newp-1;
+
+//inner circle
+Point (newp) = {1, 0, -.2};
+inner_point1 = newp-1;
+Point (newp) = {-1, 0, 0};
+Point (newp) = {0, 1, 0 };
+Point (newp) = {0, -1, 0};
+
+
+//outer circle
+Point (newp) = {2, 0, -.2};
+outer_point1 = newp-1;
+Point (newp) = {-2, 0, 0};
+Point (newp) = {0, 2, 0 };
+Point (newp) = {0, -2, 0};
+
+//inner circle lines
+Circle (newl) = {inner_point1, circle_center, inner_point1+2};
+inner_line1 = newl-1;
+Circle (newl) = {inner_point1+2, circle_center, inner_point1+1};
+Circle (newl) = {inner_point1+1, circle_center, inner_point1+3};
+Circle (newl) = {inner_point1+3, circle_center, inner_point1};
+
+//outer circle lines
+Circle (newl) = {outer_point1, circle_center, outer_point1+2};
+outer_line1 = newl-1;
+Circle (newl) = {outer_point1+2, circle_center, outer_point1+1};
+Circle (newl) = {outer_point1+1, circle_center, outer_point1+3};
+Circle (newl) = {outer_point1+3, circle_center, outer_point1};
+
+//cross lines
+Line (newl) = {inner_point1, outer_point1};
+cross_line1 = newl-1;
+Line (newl) = {inner_point1+2, outer_point1+2};
+Line (newl) = {inner_point1+1, outer_point1+1};
+Line (newl) = {inner_point1+3, outer_point1+3};
+
+
+// Transfinite Lines
+Transfinite Line {outer_line1, outer_line1+1, outer_line1+2,outer_line1+3} = 10;
+Transfinite Line {inner_line1, inner_line1+1, inner_line1+2,inner_line1+3} = 6;
+Transfinite Line {cross_line1, cross_line1+1, cross_line1+2, cross_line1+3} = 5;
+
+// line loops and surfaces
+Line Loop (newll) = {cross_line1, outer_line1, -(cross_line1+1), -inner_line1};
+lineloop1=newll-1;
+Line Loop (newll) = {cross_line1+1, outer_line1+1, -(cross_line1+2), -(inner_line1+1)};
+Line Loop (newll) = {cross_line1+2, outer_line1+2, -(cross_line1+3), -(inner_line1+2)};
+Line Loop (newll) = {cross_line1+3, outer_line1+3, -cross_line1, -(inner_line1+3)};
+Ruled Surface (news) = lineloop1;
+Ruled Surface (news) = lineloop1+1;
+Ruled Surface (news) = lineloop1+2;
+Ruled Surface (news) = lineloop1+3;
+ind_surfaces = {news-3, news-4, news-2, news-1};
+Compound Surface (news) = {ind_surfaces[]};
+//Hide {Surface{ind_surfaces[]};}
+Extrude {0, 0 , 1} {Surface{news-1}; Layers{{5},{1}};Recombine; }
diff --git a/benchmarks/extrude_quadtri/compound_extrude_example.geo b/benchmarks/extrude_quadtri/compound_extrude_example.geo
new file mode 100644
index 0000000000000000000000000000000000000000..bf39ba9ac01d210841f3bacde6d4e2860bf806c1
--- /dev/null
+++ b/benchmarks/extrude_quadtri/compound_extrude_example.geo
@@ -0,0 +1,18 @@
+// Example of compoud surface extrusion from .msh file
+
+Geometry.Surfaces=1;
+Mesh.SurfaceFaces=1;
+Geometry.AutoCoherence = 1;
+Geometry.OldRuledSurface=1;
+Mesh.RemeshAlgorithm = 1;
+Mesh.Algorithm=6;
+
+Merge "3sidedruled.stl";
+
+CreateTopology;
+
+Compound Surface (news) = {1};
+
+Hide {Surface{1};}
+
+Extrude { Surface{-(news-1)}; Layers{{1},{0.001}}; Recombine; }
diff --git a/benchmarks/extrude_quadtri/compound_extrude_from_stl_example.geo b/benchmarks/extrude_quadtri/compound_extrude_from_stl_example.geo
new file mode 100644
index 0000000000000000000000000000000000000000..bf39ba9ac01d210841f3bacde6d4e2860bf806c1
--- /dev/null
+++ b/benchmarks/extrude_quadtri/compound_extrude_from_stl_example.geo
@@ -0,0 +1,18 @@
+// Example of compoud surface extrusion from .msh file
+
+Geometry.Surfaces=1;
+Mesh.SurfaceFaces=1;
+Geometry.AutoCoherence = 1;
+Geometry.OldRuledSurface=1;
+Mesh.RemeshAlgorithm = 1;
+Mesh.Algorithm=6;
+
+Merge "3sidedruled.stl";
+
+CreateTopology;
+
+Compound Surface (news) = {1};
+
+Hide {Surface{1};}
+
+Extrude { Surface{-(news-1)}; Layers{{1},{0.001}}; Recombine; }
diff --git a/benchmarks/extrude_quadtri/nico_torus.geo b/benchmarks/extrude_quadtri/nico_torus.geo
new file mode 100644
index 0000000000000000000000000000000000000000..e5fcdd3ecb8fcc4c870473c8682bcac2c5a6548a
--- /dev/null
+++ b/benchmarks/extrude_quadtri/nico_torus.geo
@@ -0,0 +1,79 @@
+// This file was originally written by Nico Schloemer,
+// Citation: http://geuz.org/pipermail/gmsh/2012/007576.html
+
+//set options
+Geometry.Surfaces=1;
+Mesh.SurfaceFaces=1;
+Mesh.RecombinationAlgorithm = 0;
+Mesh.RemeshAlgorithm = 1;
+Mesh.Algorithm=6; // mesh algorithm
+Mesh.Algorithm3D=4; // mesh algorithm
+Geometry.AutoCoherence = 1;
+Geometry.OldRuledSurface=1;
+
+Function Torus
+  // Given a zshift and two radii irad and orad, and a zshift, this
+  // creates a torus parallel to the x-y-plane.
+  // The points:
+  tp1 = newp;
+  Point(tp1) = {0,orad,zshift,lcar};
+  tp2 = newp;
+  Point(tp2) = {0,irad+orad,zshift,lcar};
+  tp3 = newp;
+  Point(tp3) = {0,orad,zshift+irad,lcar};
+  tp4 = newp;
+  Point(tp4) = {0,orad,zshift-irad,lcar};
+  tp5 = newp;
+  Point(tp5) = {0,-irad+orad,zshift,lcar};
+  // One cirle:
+  tc1 = newreg;
+  Circle(tc1) = {tp2,tp1,tp3};
+  tc2 = newreg;
+  Circle(tc2) = {tp3,tp1,tp5};
+  tc3 = newreg;
+  Circle(tc3) = {tp5,tp1,tp4};
+  tc4 = newreg;
+  Circle(tc4) = {tp4,tp1,tp2};
+  // The extrusion to the torus:
+  tll1 = newreg;
+  Line Loop(tll1) = {tc1,tc2,tc3,tc4};
+  ts1 = newreg;
+  Plane Surface(ts1) = {tll1};
+  // Gmsh cannot rotate beyond PI, so split the extrusion up in three parts.
+  ts2[] = Extrude {{0,0,1}, {0,0,0}, 2*Pi/3}{Surface{ts1};};
+  ts3[] = Extrude {{0,0,1}, {0,0,0}, 2*Pi/3}{Surface{ts2[0]};};
+  ts4[] = Extrude {{0,0,1}, {0,0,0}, 2*Pi/3}{Surface{ts3[0]};};
+
+  // Delete the unneeded entities.
+  Delete {
+    Volume{1};
+    Volume{2};
+    Volume{3};
+    Surface{ts1};
+    Surface{ts2[0]};
+    Surface{ts3[0]};
+  }
+
+  // Define outer surface.
+  // We then store the surface loops identification numbers in a list
+  // for later reference (we will need these to define the final
+  // volume).
+  theloops[t] = newreg;
+  Surface Loop(theloops[t]) = {ts2[2], ts2[3], ts2[4], ts2[5],
+                               ts3[2], ts3[3], ts3[4], ts3[5],
+                               ts4[2], ts4[3], ts4[4], ts4[5]};
+//                                   71, ts4[3], ts4[4], ts4[5]};
+
+  thetorus = newreg;
+  Volume(thetorus) = {theloops[t]};
+
+  Physical Volume(Sprintf("coil %g", t)) = thetorus;
+Return
+
+// Actual creation starts here.
+t = 1;
+lcar = 0.05;
+orad = 0.5;
+irad = 0.15;
+zshift = 0.04;
+Call Torus;
\ No newline at end of file
diff --git a/benchmarks/extrude_quadtri/quadtri_extruded_square_torus_interfaced_example.geo b/benchmarks/extrude_quadtri/quadtri_extruded_square_torus_interfaced_example.geo
new file mode 100644
index 0000000000000000000000000000000000000000..2dcec7e60947d3a4c4d1c74fc1e645037a6d12ee
--- /dev/null
+++ b/benchmarks/extrude_quadtri/quadtri_extruded_square_torus_interfaced_example.geo
@@ -0,0 +1,113 @@
+//set options
+Geometry.Surfaces=1;
+Mesh.SurfaceFaces=1;
+Mesh.RecombinationAlgorithm = 0;
+Mesh.RemeshAlgorithm = 1;
+Mesh.Algorithm=6; // mesh algorithm
+Mesh.Algorithm3D=4; // mesh algorithm
+Geometry.AutoCoherence = 1;
+  Geometry.OldRuledSurface=1;
+  
+  
+r = .70;
+a = .4;
+b = 0.1;
+big = 2.5;
+big_transf = 12;
+
+Point (newp) = { r-a/2.0, -a/2, 0.0};
+Point (newp) = { r-a/2.0, a/2, 0.0};
+Point (newp) = { r+a/2.0, -a/2, 0.0};
+Point (newp) = { r+a/2.0, a/2, 0.0};
+Point (newp) = { r-a/2.0-b, -a/2-b, 0.0 };
+Point (newp) = { r-a/2.0-b, a/2+b, 0.0 };
+Point (newp) = { r+a/2.0+b, a/2+b, 0.0 };
+Point (newp) = { r+a/2.0+b, -a/2-b, 0.0 };
+
+list_points[] = {newp-8, newp-7, newp-6, newp-5, newp-4, newp-3, newp-2, newp-1};
+
+Line (newl) = {list_points[0], list_points[1]};
+Line (newl) = {list_points[1], list_points[3]};
+Line (newl) = {list_points[3], list_points[2]};
+Line (newl) = {list_points[2], list_points[0]};
+
+Line (newl) = {list_points[4], list_points[5]};
+Line (newl) = {list_points[5], list_points[6]};
+Line (newl) = {list_points[6], list_points[7]};
+Line (newl) = {list_points[7], list_points[4]};
+
+
+list_lines_sq[] = {newl-8, newl-7, newl-6, newl-5};
+list_lines_outer[] = {newl-4, newl-3, newl-2, newl-1};
+
+
+Transfinite Line { list_lines_sq[], list_lines_outer[]} = 10;
+
+Line Loop (newll) = {list_lines_sq[]};
+Ruled Surface (news) = newll-1;
+Transfinite Surface {news-1} = {1, 2, 4, 3};
+Recombine Surface {news-1};
+surf1 = news-1;
+
+Line Loop (newll) = {list_lines_outer[]};
+Ruled Surface (news) = {newll-1,-(newll-3)};
+//Transfinite Surface {news-1} = {1, 2, 4, 3};
+Recombine Surface {news-1};
+surf2 = news-1;
+
+Mesh.Smoothing = 100;
+
+first[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {surf1}; Layers{20}; Recombine; };
+
+second[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {first[0]};Layers{20}; Recombine;};
+
+third[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {second[0]};Layers{20}; Recombine;};
+
+fourth[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {third[0]}; Layers{20}; Recombine; };
+
+
+outer_first[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {surf2}; Layers{20}; Recombine; QuadTriAddVerts;};
+quadtri_laterals[] += outer_first[{2:5}];
+
+outer_second[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {outer_first[0]};Layers{20}; Recombine;QuadTriAddVerts;};
+quadtri_laterals[] += outer_second[{2:5}];
+
+outer_third[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {outer_second[0]};Layers{20}; Recombine;QuadTriAddVerts;};
+quadtri_laterals[] += outer_third[{2:5}];
+
+outer_fourth[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {outer_third[0]}; Layers{20}; Recombine; QuadTriAddVerts;};
+quadtri_laterals[] += outer_fourth[{2:5}];
+
+
+//outer big unstructured volume 
+Point (newp) = {-big/2, -big/2, -big/2};
+Point (newp) = {big/2, -big/2, -big/2};
+Point (newp) = {big/2, big/2, -big/2};
+Point (newp) = {-big/2, big/2, -big/2};
+unstr_source_pts[] = { newp-4, newp-3, newp-2, newp-1};
+
+Line (newl) = {unstr_source_pts[0], unstr_source_pts[1]};
+Line (newl) = {unstr_source_pts[1], unstr_source_pts[2]};
+Line (newl) = {unstr_source_pts[2], unstr_source_pts[3]};
+Line (newl) = {unstr_source_pts[3], unstr_source_pts[0]};
+unstr_source_lines[] = { newl-4, newl-3, newl-2, newl-1};
+
+Line Loop (newll) = {unstr_source_lines[]};
+
+Ruled Surface (news) = {newll-1};
+unstr_source = news-1;
+
+unstr_extr[] = Extrude {0.0, 0.0, big} { Surface{unstr_source}; };
+
+Transfinite Line {Boundary{Boundary{Volume{unstr_extr[1]};}}} = big_transf;
+Characteristic Length { Boundary{Boundary{Boundary{Volume{unstr_extr[1]};}}}} = .001;
+
+outer_big_bnd_surfs[] = Boundary{Volume{unstr_extr[1]};};
+Delete{ Volume{unstr_extr[1]};}
+
+Surface Loop (newsl) = {outer_big_bnd_surfs[]};
+Surface Loop (newsl) = {quadtri_laterals[]};
+Volume (newv) = { newsl-2, -(newsl-1) };
+unstr_vol = newv-1;
+
+
diff --git a/benchmarks/extrude_quadtri/quadtri_square_torus_compound_interfaced.geo b/benchmarks/extrude_quadtri/quadtri_square_torus_compound_interfaced.geo
new file mode 100644
index 0000000000000000000000000000000000000000..6819b6907497b9c68ba99353fcf6cf3eeb1060a6
--- /dev/null
+++ b/benchmarks/extrude_quadtri/quadtri_square_torus_compound_interfaced.geo
@@ -0,0 +1,96 @@
+//set options
+Geometry.Surfaces=1;
+Mesh.SurfaceFaces=1;
+Mesh.RecombinationAlgorithm = 0;
+Mesh.RemeshAlgorithm = 1;
+Mesh.Algorithm=6; // mesh algorithm
+Mesh.Algorithm3D=4; // mesh algorithm
+Geometry.AutoCoherence = 1;
+  Geometry.OldRuledSurface=1;
+  
+  
+r = .70;
+a = .4;
+b = 0.1;
+
+Point (newp) = { r-a/2.0, -a/2, 0.0};
+Point (newp) = { r-a/2.0, a/2, 0.0};
+Point (newp) = { r+a/2.0, a/2, 0.0};
+Point (newp) = { r+a/2.0, -a/2, 0.0};
+Point (newp) = { r-a/2.0-b, -a/2-b, 0.0 };
+Point (newp) = { r-a/2.0-b, a/2+b, 0.0 };
+Point (newp) = { r+a/2.0+b, a/2+b, 0.0 };
+Point (newp) = { r+a/2.0+b, -a/2-b, 0.0 };
+
+list_points[] = {newp-8, newp-7, newp-6, newp-5, newp-4, newp-3, newp-2, newp-1};
+
+Line (newl) = {list_points[0], list_points[1]};
+Line (newl) = {list_points[1], list_points[2]};
+Line (newl) = {list_points[2], list_points[3]};
+Line (newl) = {list_points[3], list_points[0]};
+
+Line (newl) = {list_points[4], list_points[5]};
+Line (newl) = {list_points[5], list_points[6]};
+Line (newl) = {list_points[6], list_points[7]};
+Line (newl) = {list_points[7], list_points[4]};
+
+
+list_lines_sq[] = {newl-8, newl-7, newl-6, newl-5};
+list_lines_outer[] = {newl-4, newl-3, newl-2, newl-1};
+ 
+Line (newl) = {list_points[0], list_points[4]};
+Line (newl) = {list_points[1], list_points[5]};
+Line (newl) = {list_points[2], list_points[6]};
+Line (newl) = {list_points[3], list_points[7]};
+
+cross_lines[] = {newl-4, newl-3, newl-2, newl-1};
+
+Transfinite Line { list_lines_sq[], list_lines_outer[]} = 10;
+Transfinite Line { cross_lines[] } = 4;
+
+Line Loop (newll) = { list_lines_sq[] };
+Ruled Surface (news) = newll-1;
+surf0 = news-1;
+Transfinite Surface {news-1};
+Recombine Surface {news-1};
+
+Line Loop (newll) = {list_lines_sq[0], cross_lines[1], -list_lines_outer[0], -cross_lines[0]};
+Ruled Surface (news) = newll-1;
+surf1 = news-1;
+
+Line Loop (newll) = {list_lines_sq[1], cross_lines[2], -list_lines_outer[1], -cross_lines[1]};
+Ruled Surface (news) = newll-1;
+surf2 = news-1;
+
+Line Loop (newll) = {list_lines_sq[2], cross_lines[3], -list_lines_outer[2], -cross_lines[2]};
+Ruled Surface (news) = newll-1;
+surf3 = news-1;
+
+Line Loop (newll) = {list_lines_sq[3], cross_lines[0], -list_lines_outer[3], -cross_lines[3]};
+Ruled Surface (news) = newll-1;
+surf4 = news-1;
+
+
+Compound Surface (news) = {surf1, surf2, surf3, surf4} Boundary {{list_lines_outer[]},{list_lines_sq[]}};
+//Recombine Surface {news-1};
+surfc = news-1;
+Hide {Surface {surf1, surf2, surf3, surf4};}
+Mesh.Smoothing = 100;
+
+
+first[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {surf0}; Layers{20}; Recombine;};
+
+second[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {first[0]};Layers{20}; Recombine;};
+
+third[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {second[0]};Layers{20}; Recombine;};
+
+fourth[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {third[0]}; Layers{20}; Recombine;};
+
+
+outer_first[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {surfc}; Layers{20}; Recombine; QuadTriNoNewVerts;};
+
+outer_second[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {outer_first[0]};Layers{20}; Recombine; QuadTriNoNewVerts RecombLaterals;};
+
+outer_third[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {outer_second[0]};Layers{20}; Recombine; QuadTriAddVerts; };
+
+outer_fourth[] = Extrude { {0, 1, 0}, {0, 0, 0}, Pi/2 }{ Surface {outer_third[0]}; Layers{20}; Recombine; QuadTriAddVerts RecombLaterals;};
diff --git a/benchmarks/extrude_quadtri/scaledBoundaryLayerTest.geo b/benchmarks/extrude_quadtri/scaledBoundaryLayerTest.geo
new file mode 100644
index 0000000000000000000000000000000000000000..a1181e8c523a92feee86138f30632d42925f0869
--- /dev/null
+++ b/benchmarks/extrude_quadtri/scaledBoundaryLayerTest.geo
@@ -0,0 +1,61 @@
+//set options
+Geometry.Surfaces=1;
+Mesh.SurfaceFaces=1;
+Mesh.RecombinationAlgorithm = 0;
+Mesh.RemeshAlgorithm = 1;
+Mesh.Algorithm=6; // mesh algorithm
+Mesh.Algorithm3D=4; // mesh algorithm
+Geometry.AutoCoherence = 1;
+Geometry.OldRuledSurface=1;
+  
+  
+curve_radius = .50;
+
+Point(newp) = { 0.0, 0.0, 0.0};
+Point(newp) = { 1.0, 0.0, 0.20};
+Point(newp) = { 2.0, 0.0, 0.0};
+Point(newp) = { 1.0, 1.0, 0.20};
+Point(newp) = { 2.0, 1.0, 0.0};
+Point(newp) = { 0.0, 1.0, 0.0};
+
+Point(newp) = { 1.0, 0.5, -curve_radius};
+
+Line (newl) = { 1, 2 };
+Line (newl) = { 2, 3 };
+Circle (newl) = { 2, 7, 4 };
+Line (newl) = { 4, 6 };
+Line (newl) = { 5, 4 };
+Line (newl) = { 3, 5 };
+Line (newl) = { 6, 1 };
+
+Transfinite Line { 3 } = 20;
+Transfinite Line { 1 } = 10 Using Progression 0.8;
+Transfinite Line { 2 } = 10 Using Progression 1/.8;
+Transfinite Line { 4, 5, 6, 7 } = 10;
+
+Line Loop (newll) = {1, 3,4,7};
+Line Loop (newll) = {2, 6, 5,-3};
+
+Ruled Surface (news) = { 8 };
+Ruled Surface (news) = { 9 };
+Recombine Surface {news-2, news-1};
+
+Extrude { Surface { 10}; Layers{{1,1},{0.05,1.2}}; Recombine; Using Index[0]; ScaleLastLayer; QuadTriAddVerts;}
+Extrude { Surface { 11}; Layers{{1,1},{0.05,1.2}}; Recombine;  Using Index[0]; ScaleLastLayer; QuadTriAddVerts;}
+
+
+// A third surface to show that when not connected to the previous two surfaces, a surface in the same boundary layer
+// can be meshed normally without ScaleLastLayer and still be valid.
+Point (newp) = { -1, 0, 0 };
+Point (newp) = { -1, 1 ,0};
+Point (newp) = { -2, 1, 0};
+Point (newp) = { -2, 0, 0};
+Line (newl) = { newp-4, newp-3};
+Line (newl) = { newp-3, newp-2};
+Line (newl) = { newp-2, newp-1};
+Line (newl) = { newp-1, newp-4};
+
+Line Loop (newll) = {newl-4, newl-3, newl-2, newl-1};
+Ruled Surface (news) = newll-1;
+
+Extrude { Surface { news-1}; Layers{{1},{.5}}; Recombine; Using Index[0];QuadTriNoNewVerts RecombLaterals;}
diff --git a/benchmarks/extrude_quadtri/tunnel_test.geo b/benchmarks/extrude_quadtri/tunnel_test.geo
new file mode 100644
index 0000000000000000000000000000000000000000..7287c31a734abc17ac0ae64e397be7bc176376f6
--- /dev/null
+++ b/benchmarks/extrude_quadtri/tunnel_test.geo
@@ -0,0 +1,169 @@
+
+/***********************************************
+ *                                             *
+ *  tunnel_test.geo                            *
+ *  by Trevor Strickler                        *
+ *  <trevor.strickler.gmail.com>               *
+ *                                             *
+ ***********************************************/
+
+//set options
+Geometry.Surfaces=1;
+Mesh.SurfaceFaces=1;
+Mesh.Algorithm=5; // mesh algorithm
+Mesh.Algorithm3D=4; // mesh algorithm
+General.InitialModule=2; 	//start in Mesh mode.
+pi=Pi;
+
+
+// geometric parameters
+width = 1.0;
+height = 1.0;
+length = 3.0;
+patch_width = 0.3;
+patch_length = 0.3;
+patch_height = height - 0.3;
+
+num_trans_face_1 = 10;
+num_trans_length = 20;
+num_trans_patch = 5;
+
+Point (newp) = { -width / 2.0, -height / 2.0, 0.0 };
+Point (newp) = {  width / 2.0, -height / 2.0, 0.0 };
+Point (newp) = {  width / 2.0,  height / 2.0, 0.0 };
+Point (newp) = { -width / 2.0,  height / 2.0, 0.0 };
+
+face_1_corners[] = {newp-4, newp-3, newp-2, newp-1};
+
+Line (newl) = {face_1_corners[0], face_1_corners[1]};
+Line (newl) = {face_1_corners[1], face_1_corners[2]};
+Line (newl) = {face_1_corners[2], face_1_corners[3]};
+Line (newl) = {face_1_corners[3], face_1_corners[0]};
+
+face_1_lines[] = {newl-4, newl-3, newl-2, newl-1};
+Transfinite Line {face_1_lines[]} = num_trans_face_1;
+
+Line Loop (newll) = {face_1_lines[]};
+face_1_line_loop = newll-1;
+
+Plane Surface (news) = face_1_line_loop;
+face_1_surface = news-1;
+Transfinite Surface (face_1_surface) Left;
+
+Recombine Surface (face_1_surface);
+
+extrude_1[] = Extrude { 0.0, 0.0, -0.3 } { Surface{ face_1_surface }; Layers{3}; QuadTriAddVerts RecombLaterals; Recombine; };
+
+top_lines_extr_1[] = Boundary{ Surface{ extrude_1[0] }; };
+
+top_points_extr_1[] += Boundary{ Line{ top_lines_extr_1[0] }; };
+top_points_extr_1[] += Boundary{ Line{ top_lines_extr_1[1] }; };
+top_points_extr_1[] += Boundary{ Line{ top_lines_extr_1[2] }; };
+top_points_extr_1[] += Boundary{ Line{ top_lines_extr_1[3] }; };
+
+Characteristic Length {top_points_extr_1[]} = length / (6 + num_trans_length);
+
+Point (newp) = { -width / 2, -height / 2, -length };
+Point (newp) = {  width / 2, -height / 2, -length };
+Point (newp) = {  width / 2,  height / 2, -length };
+Point (newp) = { -width / 2,  height / 2, -length };
+
+face_2_corners[] = {newp-4, newp-3, newp-2, newp-1};
+
+Line (newl) = {face_2_corners[0], face_2_corners[1]};
+Line (newl) = {face_2_corners[1], face_2_corners[2]};
+Line (newl) = {face_2_corners[2], face_2_corners[3]};
+Line (newl) = {face_2_corners[3], face_2_corners[0]};
+
+face_2_lines[] = {newl-4, newl-3, newl-2, newl-1};
+
+Transfinite Line {face_2_lines[]} = num_trans_face_1;
+
+Line Loop (newll) = {face_2_lines[]};
+face_2_line_loop = newll-1;
+
+Plane Surface (news) = face_2_line_loop;
+face_2_surface = news-1;
+Transfinite Surface (face_2_surface) Left;
+
+Recombine Surface (face_2_surface);
+
+extrude_2[] = Extrude { 0.0, 0.0, 0.3 } { Surface{ face_2_surface }; Layers{3}; QuadTriAddVerts RecombLaterals; Recombine;};
+
+top_lines_extr_2[] = Boundary{ Surface{ extrude_2[0] }; };
+
+top_points_extr_2[] += Boundary{ Line{ top_lines_extr_2[0] }; };
+top_points_extr_2[] += Boundary{ Line{ top_lines_extr_2[1] }; };
+top_points_extr_2[] += Boundary{ Line{ top_lines_extr_2[2] }; };
+top_points_extr_2[] += Boundary{ Line{ top_lines_extr_2[3] }; };
+
+Characteristic Length {top_points_extr_2[]} = length / (6 + num_trans_length);
+
+Line (newl) = {top_points_extr_1[0], top_points_extr_2[0]};
+Line (newl) = {top_points_extr_1[1], top_points_extr_2[1]};
+Line (newl) = {top_points_extr_1[3], top_points_extr_2[3]};
+Line (newl) = {14, 28};
+
+length_lines[] = {newl-4, newl-3, newl-2, newl-1};
+Transfinite Line { length_lines[] } = num_trans_length;
+
+// create the little square patch at bottom lateral surface
+Point (newp) = {-patch_width / 2.0, -height / 2.0, -length / 2.0 + patch_length / 2.0 };
+Point (newp) = { patch_width / 2.0, -height / 2.0, -length / 2.0 + patch_length / 2.0 };
+Point (newp) = { patch_width / 2.0, -height / 2.0, -length / 2.0 - patch_length / 2.0 };
+Point (newp) = {-patch_width / 2.0, -height / 2.0, -length / 2.0 - patch_length / 2.0 };
+
+patch_points[] = {newp-4, newp-3, newp-2, newp-1};
+
+Line (newl) = {patch_points[0], patch_points[1]};
+Line (newl) = {patch_points[1], patch_points[2]};
+Line (newl) = {patch_points[2], patch_points[3]};
+Line (newl) = {patch_points[3], patch_points[0]};
+
+patch_lines[] = {newl-4, newl-3, newl-2, newl-1};
+
+Transfinite Line {patch_lines[]} = num_trans_patch;
+
+Line Loop (newll) = {patch_lines[]};
+patch_loop = newll-1;
+Plane Surface (news) = patch_loop;
+patch_surface = news-1;
+Transfinite Surface (patch_surface);
+Recombine Surface patch_surface;  
+
+extrude_patch[] = Extrude { 0.0, patch_height, 0.0 } { Surface { patch_surface }; 
+                            Layers{ {1,2,2,2,1}, {0.125, 0.375, 0.625, 0.875, 1.0}}; 
+                            QuadTriAddVerts; Recombine; }; 
+
+//now mesh surfaces along length
+
+Line Loop (newll) = {length_lines[0], top_lines_extr_2[0], -length_lines[1], -top_lines_extr_1[0]};
+Line Loop (newll) = {length_lines[1], top_lines_extr_2[1], -length_lines[2], -top_lines_extr_1[1]};
+Line Loop (newll) = {length_lines[2], top_lines_extr_2[2], -length_lines[3], -top_lines_extr_1[2]};
+Line Loop (newll) = {length_lines[3], top_lines_extr_2[3], -length_lines[0], -top_lines_extr_1[3]};
+
+length_loops[] = {newll-4, newll-3, newll-2, newll-1};
+
+Plane Surface (news) = {length_loops[0], patch_loop};
+Plane Surface (news) = length_loops[1]; 
+Plane Surface (news) = length_loops[2];
+Plane Surface (news) = length_loops[3];
+
+lateral_surfaces[] = { news-4, news-3, news-2, news-1 };
+Transfinite Surface { news-3, news-2, news-1};
+
+// Create volume ( a little messy )
+
+Surface Loop (newsl) = { -lateral_surfaces[], extrude_1[0], extrude_2[0], extrude_patch[{0,2:5}] }; 
+
+//Volume (newv) = newsl-1;
+//volume = newv-1;
+
+// create physicals
+Physical Surface ("inlet") = {face_1_surface};
+Physical Surface ("outlet") = {face_2_surface};
+Physical Surface ("laterals") = { lateral_surfaces[], extrude_1[{2:5}], extrude_2[{2:5}], patch_surface };
+Physical Volume ("volume") = {extrude_1[1], extrude_2[1], extrude_patch[1]};
+
+Mesh.CharacteristicLengthMax = length / (8+num_trans_length);
+