diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp
index 28c1853d478c9449aed0e6fe9b9b54df07487ba3..edc43e008e5c58bbeb761a2c9451ff790a0de2a1 100644
--- a/Common/GmshMessage.cpp
+++ b/Common/GmshMessage.cpp
@@ -331,10 +331,13 @@ void Msg::Info(const char *fmt, ...)
   if(_client) _client->Info(str);
 
 #if defined(HAVE_FLTK)
-  if(FlGui::available()){
-    FlGui::instance()->check();
-    std::string tmp = std::string("Info    : ") + str;
-    FlGui::instance()->addMessage(tmp.c_str());
+  #pragma omp critical
+  {
+    if(FlGui::available()){
+      FlGui::instance()->check();
+      std::string tmp = std::string("Info    : ") + str;
+      FlGui::instance()->addMessage(tmp.c_str());
+    }
   }
 #endif
 
@@ -371,18 +374,21 @@ void Msg::Direct(int level, const char *fmt, ...)
   if(_client) _client->Info(str);
 
 #if defined(HAVE_FLTK)
-  if(FlGui::available()){
-    FlGui::instance()->check();
-    std::string tmp;
-    if(level < 2)
-      tmp = std::string("@C1@.") + str;
-    else if(level < 3)
-      tmp = std::string("@C5@.") + str;
-    else
-      tmp = std::string("@C4@.") + str;
-    FlGui::instance()->addMessage(tmp.c_str());
-    if(level == 1)
-      FlGui::instance()->showMessages();
+#pragma omp master
+  {
+    if(FlGui::available()){
+      FlGui::instance()->check();
+      std::string tmp;
+      if(level < 2)
+	tmp = std::string("@C1@.") + str;
+      else if(level < 3)
+	tmp = std::string("@C5@.") + str;
+      else
+	tmp = std::string("@C4@.") + str;
+      FlGui::instance()->addMessage(tmp.c_str());
+      if(level == 1)
+	FlGui::instance()->showMessages();
+    }
   }
 #endif
 
@@ -410,13 +416,16 @@ void Msg::StatusBar(bool log, const char *fmt, ...)
   if(_client && log) _client->Info(str);
 
 #if defined(HAVE_FLTK)
-  if(FlGui::available()){
-    if(log) FlGui::instance()->check();
-    if(!log || _verbosity > 4)
-      FlGui::instance()->setStatus(str);
-    if(log){
-      std::string tmp = std::string("Info    : ") + str;
-      FlGui::instance()->addMessage(tmp.c_str());
+#pragma omp master 
+  {
+    if(FlGui::available()){
+      if(log) FlGui::instance()->check();
+      if(!log || _verbosity > 4)
+	FlGui::instance()->setStatus(str);
+      if(log){
+	std::string tmp = std::string("Info    : ") + str;
+	FlGui::instance()->addMessage(tmp.c_str());
+      }
     }
   }
 #endif
diff --git a/Geo/GEntity.cpp b/Geo/GEntity.cpp
index 5cd844e1da49f484f1eb705b3d8cebb0da34f8e2..853fb1fe101672c5b8e01b1fe66dcb1ae066a3d9 100644
--- a/Geo/GEntity.cpp
+++ b/Geo/GEntity.cpp
@@ -69,3 +69,55 @@ GEdge *GEntity::cast2Edge() { return dynamic_cast<GEdge*>(this); }
 GFace *GEntity::cast2Face() { return dynamic_cast<GFace*>(this); }
 GRegion *GEntity::cast2Region() { return dynamic_cast<GRegion*>(this); }
 
+// sets the entity m from which the mesh will be copied
+void GEntity::setMeshMaster(int m_signed){
+
+  printf("setting mesh master %d to mesh entity %d\n",m_signed,tag());
+
+  GEntity *gMaster = 0;
+  int m = abs(m_signed);
+  switch(dim()){
+  case 0 : gMaster = model()->getVertexByTag(m); break;
+  case 1 : gMaster = model()->getEdgeByTag(m); break;
+  case 2 : gMaster = model()->getFaceByTag(m); break;
+  case 3 : gMaster = model()->getRegionByTag(m); break;
+  } 
+  if (!gMaster){
+    Msg::Fatal("Model entity %d of dimension %d cannot be the mesh master of model entity %d",m,dim(), tag());
+  }
+  int masterOfMaster = gMaster->meshMaster();
+  
+  if (masterOfMaster == gMaster->tag()){
+    _meshMaster = m_signed;
+  }
+  else {
+    printf("mesh entity %d has already a master %d\n",m,masterOfMaster);
+    setMeshMaster ( masterOfMaster * ((m_signed > 0) ? 1 : -1));
+  }
+}
+
+// gets the entity from which the mesh will be copied
+int GEntity::meshMaster() const{
+  
+  if (_meshMaster == tag()) return tag();
+
+  GEntity *gMaster = 0;
+  switch(dim()){
+  case 0 : gMaster = model()->getVertexByTag(abs(_meshMaster)); break;
+  case 1 : gMaster = model()->getEdgeByTag(abs(_meshMaster)); break;
+  case 2 : gMaster = model()->getFaceByTag(abs(_meshMaster)); break;
+  case 3 : gMaster = model()->getRegionByTag(abs(_meshMaster)); break;
+  } 
+  if (!gMaster){
+    Msg::Fatal("meshMaster : Model entity %d of dimension %d cannot be the mesh master of model entity %d",_meshMaster,dim(),tag());
+  }
+  int masterOfMaster = gMaster->meshMaster();
+  
+  if (masterOfMaster == gMaster->tag()){
+    return _meshMaster ;
+  }
+  else {
+    return gMaster->meshMaster() * ((_meshMaster > 0) ? 1 : -1);
+  }
+}
+
diff --git a/Geo/GEntity.h b/Geo/GEntity.h
index 95862bba1126e38a550c15d84c252c17dbaea1af..aa0b0a186dc13470b9356c19bf9a53dbd98915f2 100644
--- a/Geo/GEntity.h
+++ b/Geo/GEntity.h
@@ -32,7 +32,7 @@ class GEntity {
   // the tag (the number) of this entity
   int _tag;
 
-  // gives the number of the master entity in periodic mesh, gives 0
+  // gives the number of the master entity in periodic mesh, gives _tag
   // if non-periodic
   int _meshMaster;
 
@@ -258,8 +258,8 @@ class GEntity {
   }
 
   // returns the tag of the entity that its master entity (for mesh) 
-  int meshMaster() const { return _meshMaster; }
-  void setMeshMaster(int m) { _meshMaster = m; }
+  int meshMaster() const;
+  void setMeshMaster(int m);
 
   // get the bounding box
   virtual SBoundingBox3d bounds() const { return SBoundingBox3d(); }
@@ -323,6 +323,11 @@ class GEntity {
   GEdge   *cast2Edge();
   GFace   *cast2Face();
   GRegion *cast2Region();
+
+  // periodic data
+  double periodicTransformation[4][4];
+  std::map<MVertex*,MVertex*> correspondingVertices;
+
 };
 
 class GEntityLessThan {
diff --git a/Geo/GModelIO_GEO.cpp b/Geo/GModelIO_GEO.cpp
index 6ffa531e8252d1df9f49e144d1fd217e4ba1dcb3..ce473afa70a85dca54d87c08af1f619de3fd1f6f 100644
--- a/Geo/GModelIO_GEO.cpp
+++ b/Geo/GModelIO_GEO.cpp
@@ -289,6 +289,31 @@ int GModel::importGEOInternals()
     }
   }
 
+  // create periodic mesh relationships
+
+  for (std::map<int,int>::iterator it = _geo_internals->periodicEdges.begin();
+       it != _geo_internals->periodicEdges.end(); ++it){
+    GEdge *ge = getEdgeByTag(abs(it->first));
+    if (ge){
+      int MASTER = it->second * (it->first > 0 ? 1 : -1);
+      ge->setMeshMaster(MASTER);
+    }
+  }
+  for (std::map<int,int>::iterator it = _geo_internals->periodicFaces.begin();
+       it != _geo_internals->periodicFaces.end(); ++it){
+    GFace *gf = getFaceByTag(abs(it->first));
+    if (gf)gf->setMeshMaster(it->second * (it->first > 0 ? 1 : -1));
+  }  
+
+  for (eiter it = firstEdge() ; it != lastEdge() ; ++it){
+    int meshMaster = (*it)->meshMaster();
+    if (meshMaster != (*it)->tag()){
+      GEdge *ge_master = getEdgeByTag(abs(meshMaster));
+      if(ge_master)(*it)->getBeginVertex()->setMeshMaster ( (meshMaster > 0)  ? ge_master->getBeginVertex()->tag() : ge_master->getEndVertex()->tag());  
+      if(ge_master)(*it)->getEndVertex()->setMeshMaster ( (meshMaster < 0)  ? ge_master->getBeginVertex()->tag() : ge_master->getEndVertex()->tag());  
+    }
+  }
+
   Msg::Debug("Gmsh model (GModel) imported:");
   Msg::Debug("%d Vertices", vertices.size());
   Msg::Debug("%d Edges", edges.size());
diff --git a/Geo/GModelIO_MSH.cpp b/Geo/GModelIO_MSH.cpp
index f3cbf318ffff30da469f5b6ac34260e6752e21fd..0f735cf2d08dd15cbde243518ba2383f4acf617f 100644
--- a/Geo/GModelIO_MSH.cpp
+++ b/Geo/GModelIO_MSH.cpp
@@ -16,6 +16,65 @@
 #include "MPyramid.h"
 #include "StringUtils.h"
 
+void writeMSHPeriodicNodes (FILE *fp, std::vector<GEntity*> &entities)
+{
+  int count = 0;
+  for (unsigned int i = 0 ; i < entities.size() ; i++) if (entities[i]->meshMaster() != entities[i]->tag())count++;
+  if (!count)return;
+  fprintf(fp, "$Periodic\n");
+  fprintf(fp, "%d\n",count);
+  for(unsigned int i = 0; i < entities.size(); i++){
+    GEntity *g_slave = entities[i];
+    int meshMaster = g_slave->meshMaster();
+    if (g_slave->tag() != meshMaster){      
+      GEntity *g_master = 0;
+      switch(g_slave->dim()){
+      case 0 : g_master = g_slave->model()->getVertexByTag(abs(meshMaster));break;
+      case 1 : g_master = g_slave->model()->getEdgeByTag(abs(meshMaster));break;
+      case 2 : g_master = g_slave->model()->getFaceByTag(abs(meshMaster));break;
+      case 3 : g_master = g_slave->model()->getRegionByTag(abs(meshMaster));break;
+      }
+      fprintf(fp,"%d %d %d\n",g_slave->dim(),g_slave->tag(),g_master->tag());
+      fprintf(fp,"%d \n",(int)g_slave->correspondingVertices.size());
+      for (std::map<MVertex*,MVertex*>::iterator it = g_slave->correspondingVertices.begin() ; it != g_slave->correspondingVertices.end() ; it++){
+	MVertex *v1 = it->first;
+	MVertex *v2 = it->second;
+	fprintf(fp,"%d %d\n",v1->getNum(),v2->getNum());
+      }
+    }
+  }
+  fprintf(fp, "$EndPeriodic\n");
+}
+
+void readMSHPeriodicNodes (FILE *fp, GModel *gm)
+{
+  int count;
+  fscanf(fp, "%d",&count);
+  for(int i = 0; i < count; i++){
+    int dim,slave,master;
+    fscanf(fp,"%d %d %d",&dim,&slave,&master);
+    GEntity *s=0,*m=0;
+    switch(dim){
+    case 0 : s = gm->getVertexByTag(slave); m = gm->getVertexByTag(master); break; 
+    case 1 : s = gm->getEdgeByTag(slave); m = gm->getEdgeByTag(master); break; 
+    case 2 : s = gm->getFaceByTag(slave); m = gm->getFaceByTag(master); break; 
+    }
+    if (s && m){
+      s->setMeshMaster(m->tag());
+      int numv;
+      fscanf(fp,"%d",&numv);
+      for(int j = 0; j < numv; j++){
+	int v1,v2;
+	fscanf(fp,"%d %d",&v1,&v2);
+	MVertex *mv1 = gm->getMeshVertexByTag(v1);
+	MVertex *mv2 = gm->getMeshVertexByTag(v2);
+	s->correspondingVertices[mv1] = mv2;
+      }
+    }
+  }
+}
+
+
 int GModel::readMSH(const std::string &name)
 {
   FILE *fp = fopen(name.c_str(), "rb");
@@ -28,7 +87,7 @@ int GModel::readMSH(const std::string &name)
 
   // detect prehistoric MSH files
   fgets(str, sizeof(str), fp);
-  if(!strncmp(&str[1], "NOD", 3)){
+  if(!strncmp(&str[1], "NOD", 3) || !strncmp(&str[1], "NOE", 3)){
     fclose(fp);
     return _readMSH2(name);
   }
@@ -295,6 +354,10 @@ int GModel::readMSH(const std::string &name)
       postpro = true;
       break;
     }
+    else if(!strncmp(&str[1], "Periodical", 10)) {
+      readMSHPeriodicNodes (fp, this);
+    }
+
 
     do {
       if(!fgets(str, sizeof(str), fp) || feof(fp))
@@ -500,7 +563,14 @@ int GModel::writeMSH(const std::string &name, double version, bool binary,
   if(binary) fprintf(fp, "\n");
 
   fprintf(fp, "$EndElements\n");
+
+  //save periodic nodes
+  writeMSHPeriodicNodes (fp,entities);
+
+
   fclose(fp);
 
   return 1;
 }
+
+
diff --git a/Geo/GModelIO_MSH2.cpp b/Geo/GModelIO_MSH2.cpp
index 85bdc629fce34cac35b3aac0213e4049bb8c6129..086deb26453f8427ef9771840216e6f44720da0e 100644
--- a/Geo/GModelIO_MSH2.cpp
+++ b/Geo/GModelIO_MSH2.cpp
@@ -28,6 +28,8 @@
 
 #define FAST_ELEMENTS 1
 
+extern void writeMSHPeriodicNodes (FILE *fp, std::vector<GEntity*> &entities);
+
 static bool getVertices(int num, int *indices, std::map<int, MVertex*> &map,
                         std::vector<MVertex*> &vertices)
 {
@@ -1018,6 +1020,8 @@ int GModel::_writeMSH2(const std::string &name, double version, bool binary,
     fprintf(fp, "$ENDELM\n");
   }
 
+  writeMSHPeriodicNodes (fp,entities);
+
   fclose(fp);
 
   return 1;
diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp
index c21faf2cfbdc5b6d0977de2f516802431f4fbc0e..ab0c97c2aca8ca8fda1e717695cf044648f25afe 100644
--- a/Geo/Geo.cpp
+++ b/Geo/Geo.cpp
@@ -469,7 +469,6 @@ Curve *Create_Curve(int Num, int Typ, int Order, List_T *Liste,
   pC->Extrude = NULL;
   pC->Typ = Typ;
   pC->Num = Num;
-  pC->meshMaster = Num;
   GModel::current()->getGEOInternals()->MaxLineNum =
     std::max(GModel::current()->getGEOInternals()->MaxLineNum, Num);
   pC->Method = MESH_UNSTRUCTURED;
@@ -584,7 +583,6 @@ Surface *Create_Surface(int Num, int Typ)
   pS->Num = Num;
   pS->geometry = 0;
   pS->InSphereCenter = 0;
-  pS->meshMaster = Num;
 
   GModel::current()->getGEOInternals()->MaxSurfaceNum =
     std::max(GModel::current()->getGEOInternals()->MaxSurfaceNum, Num);
@@ -2643,7 +2641,7 @@ int Extrude_ProtudeSurface(int type, int is,
   Tree_Suppress(GModel::current()->getGEOInternals()->Surfaces, &chapeau);
 
   chapeau->Num = NEWSURFACE();
-  chapeau->meshMaster = chapeau->Num;
+  //  GModel::current()->getGEOInternals()->periodicFaces[chapeau->Num] = chapeau->meshMaster;
   GModel::current()->getGEOInternals()->MaxSurfaceNum = chapeau->Num;
   Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &chapeau);
 
diff --git a/Geo/Geo.h b/Geo/Geo.h
index b2249ea2fa70d69ccb496fcee84f365ac12c0fa6..2fb9b59f3995dedfd8e29f2e6c91f77c3d5d5d1c 100644
--- a/Geo/Geo.h
+++ b/Geo/Geo.h
@@ -165,7 +165,6 @@ class Surface{
   // disappear from the class Surface.
   gmshSurface *geometry;
   // the mesh master surface
-  int meshMaster;
   std::map<int,int> edgeCounterparts;
   std::vector<int> compound, compoundBoundary[4];
 };
@@ -219,6 +218,8 @@ class GEO_Internals{
   ~GEO_Internals(){ free_all(); }
   void destroy(){ free_all(); alloc_all(); }
   void reset_physicals();
+  std::map<int,int> periodicFaces;
+  std::map<int,int> periodicEdges;
 };
 
 class Shape{
diff --git a/Geo/OCCEdge.cpp b/Geo/OCCEdge.cpp
index 59417f39cfb7176ed914b6aff7bb572bd4895678..e6c6f9e6fd0454ea2c75f61a6e95eef09bcbf73e 100644
--- a/Geo/OCCEdge.cpp
+++ b/Geo/OCCEdge.cpp
@@ -126,17 +126,14 @@ GPoint OCCEdge::closestPoint(const SPoint3 &qp, double &param) const
 // True if the edge is a seam for the given face
 bool OCCEdge::isSeam(const GFace *face) const
 {
-
   if (face->geomType() == GEntity::CompoundSurface) return false;
   if (face->getNativeType() != GEntity::OpenCascadeModel) return false;
 
+  bool ret;
   const TopoDS_Face *s = (TopoDS_Face*) face->getNativePtr();
   BRepAdaptor_Surface surface(*s);
-  //  printf("asking if edge %d is a seam of face %d\n",tag(),face->tag());
-  //  printf("periodic %d %d\n",surface.IsUPeriodic(),surface.IsVPeriodic());
-  //  if(surface.IsUPeriodic() || surface.IsVPeriodic()){
-  return BRep_Tool::IsClosed(c, *s);
-
+  ret =  BRep_Tool::IsClosed(c, *s);
+  return ret;
 }
 
 GPoint OCCEdge::point(double par) const
diff --git a/Geo/SPoint2.h b/Geo/SPoint2.h
index ccaa9078cabd8205ea01514c269ba3964d7449fe..18af3d2b55edce709ee3831abee5dae97e068a8d 100644
--- a/Geo/SPoint2.h
+++ b/Geo/SPoint2.h
@@ -24,6 +24,7 @@ class SPoint2 {
   inline double y(void) const;
   double &operator[](int);
   double operator[](int) const;
+  double distance(const SPoint2 &p)const;
   SPoint2 &operator=(const SPoint2 &p);
   void operator+=(const SPoint2 &p);
   void operator-=(const SPoint2 &p);
@@ -81,4 +82,10 @@ inline void SPoint2::operator*=(double mult)
 inline SPoint2 SPoint2::operator*(double mult)
 { return SPoint2(P[0]*mult, P[1]*mult); }
 
+inline double SPoint2::distance(const SPoint2 &p)const
+{
+  double x = P[0] - p.P[0], y = P[1] - p.P[1];
+  return sqrt(x * x + y * y);
+}
+
 #endif
diff --git a/Geo/gmshEdge.cpp b/Geo/gmshEdge.cpp
index ba6f8a2e153d34ea9ac036a6536806505a09c3d0..52e14541da639684d743fa1cc631c1133193268d 100644
--- a/Geo/gmshEdge.cpp
+++ b/Geo/gmshEdge.cpp
@@ -26,7 +26,6 @@ void gmshEdge::resetMeshAttributes()
   meshAttributes.typeTransfinite = c->typeTransfinite;
   meshAttributes.coeffTransfinite = c->coeffTransfinite;
   meshAttributes.extrude = c->Extrude;
-  setMeshMaster(c->meshMaster);
 }
 
 Range<double> gmshEdge::parBounds(int i) const
diff --git a/Geo/gmshFace.cpp b/Geo/gmshFace.cpp
index 6ddecf55929f39577209bb42ea9ff3c32deb1c58..db4c8a3977d3e2c482ce41aef007fb11f227dfd9 100644
--- a/Geo/gmshFace.cpp
+++ b/Geo/gmshFace.cpp
@@ -21,7 +21,6 @@ gmshFace::gmshFace(GModel *m, Surface *face)
 {
   resetMeshAttributes();
 
-  setMeshMaster(s->meshMaster);
   edgeCounterparts = s->edgeCounterparts;
 
   std::list<GEdge*> l_wire;
diff --git a/Mesh/BDS.cpp b/Mesh/BDS.cpp
index c1cff092f057b932a6052091c99ecd9973dbe74a..183a7f1fc56ae283d6f52b0ffda44c4e9a71e263 100644
--- a/Mesh/BDS.cpp
+++ b/Mesh/BDS.cpp
@@ -3,6 +3,7 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include <stack>
 #include <math.h>
 #include <stdio.h>
 #include "GmshMessage.h"
@@ -514,17 +515,27 @@ BDS_GeomEntity *BDS_Mesh::get_geom(int p1, int p2)
 
 void recur_tag(BDS_Face *t, BDS_GeomEntity *g)
 {
-  if(!t->g) {
-    t->g = g;
-    // g->t.push_back(t);
-    if(!t->e1->g && t->e1->numfaces() == 2) {
-      recur_tag(t->e1->otherFace(t), g);
-    }
-    if(!t->e2->g && t->e2->numfaces() == 2) {
-      recur_tag(t->e2->otherFace(t), g);
-    }
-    if(!t->e3->g && t->e3->numfaces() == 2) {
-      recur_tag(t->e3->otherFace(t), g);
+  std::stack<BDS_Face*> _stack;
+  _stack.push(t);
+
+  while(!_stack.empty()){
+    t = _stack.top();
+    _stack.pop();
+    if(!t->g) {
+      t->g = g;
+      // g->t.push_back(t);
+      if(!t->e1->g && t->e1->numfaces() == 2) {
+	_stack.push(t->e1->otherFace(t));
+	//	recur_tag(t->e1->otherFace(t), g);
+      }
+      if(!t->e2->g && t->e2->numfaces() == 2) {
+	_stack.push(t->e2->otherFace(t));
+	//	recur_tag(t->e2->otherFace(t), g);
+      }
+      if(!t->e3->g && t->e3->numfaces() == 2) {
+	_stack.push(t->e3->otherFace(t));	
+	//	recur_tag(t->e3->otherFace(t), g);
+      }
     }
   }
 }
diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp
index b4d2c14e000f9beb56847a138ec603ec47030187..ab3af32f089b0b816e7375cb52bcdb436e29b471 100644
--- a/Mesh/Generator.cpp
+++ b/Mesh/Generator.cpp
@@ -347,12 +347,22 @@ static bool CancelDelaunayHybrid(GModel *m)
 static void Mesh0D(GModel *m)
 {
   for(GModel::viter it = m->firstVertex(); it != m->lastVertex(); ++it){
-    GVertex *gv = *it;
+    GVertex *gv = *it;        
     if(gv->mesh_vertices.empty())
       gv->mesh_vertices.push_back(new MVertex(gv->x(), gv->y(), gv->z(), gv));
     if(gv->points.empty())
       gv->points.push_back(new MPoint(gv->mesh_vertices.back()));
   }
+  for(GModel::viter it = m->firstVertex(); it != m->lastVertex(); ++it){
+    GVertex *gv = *it;        
+    if (gv->meshMaster() != gv->tag()){
+      if (gv->correspondingVertices.empty()){
+	GVertex *master = m->getVertexByTag(abs(gv->meshMaster()));
+	if(master)gv->correspondingVertices[gv->mesh_vertices[0]] = (master->mesh_vertices[0]);
+      }
+    }
+  }
+
 }
 
 static void Mesh1D(GModel *m)
@@ -442,7 +452,7 @@ static void Mesh2D(GModel *m)
 {
   if(TooManyElements(m, 2)) return;
   Msg::StatusBar(true, "Meshing 2D...");
-  double t1 = Cpu();
+  double t1 = GetTimeInSeconds();
 
   for(GModel::fiter it = m->firstFace(); it != m->lastFace(); ++it)
     (*it)->meshStatistics.status = GFace::PENDING;
@@ -466,14 +476,23 @@ static void Mesh2D(GModel *m)
     int nIter = 0, nTot = m->getNumFaces();
     while(1){
       int nPending = 0;
-      for(std::set<GFace*>::iterator it = f.begin(); it != f.end(); ++it){
-        if ((*it)->meshStatistics.status == GFace::PENDING){
+      
+      std::vector<GFace*> _temp; _temp.insert(_temp.begin(),f.begin(),f.end());
+      
+#pragma omp parallel for schedule (dynamic) 
+      for(size_t K = 0 ; K < _temp.size() ; K++){
+	if (_temp[K]->meshStatistics.status == GFace::PENDING){
 	  meshGFace mesher (true, CTX::instance()->mesh.multiplePasses);
-          mesher(*it);
-          nPending++;
-        }
-        if(!nIter) Msg::ProgressMeter(nPending, nTot, false, "Meshing 2D...");
+	  mesher(_temp[K]);
+#pragma omp critical
+	  {
+	    nPending++;
+	  }
+	}
       }
+#pragma omp master      
+      if(!nIter) Msg::ProgressMeter(nPending, nTot, false, "Meshing 2D...");
+      
       for(std::set<GFace*>::iterator it = cf.begin(); it != cf.end(); ++it){
         if ((*it)->meshStatistics.status == GFace::PENDING){
 	  meshGFace mesher (true, CTX::instance()->mesh.multiplePasses);
@@ -518,7 +537,7 @@ static void Mesh2D(GModel *m)
 
   // collapseSmallEdges(*m);
 
-  double t2 = Cpu();
+  double t2 = GetTimeInSeconds();
   CTX::instance()->meshTimer[1] = t2 - t1;
   Msg::StatusBar(true, "Done meshing 2D (%g s)", CTX::instance()->meshTimer[1]);
 
diff --git a/Mesh/meshGEdge.cpp b/Mesh/meshGEdge.cpp
index eae12ec8de278a8bf67ad660e3f731e9ae0002a1..67d643116f1a9d575f47aa4d1b9f630a1d89b7b0 100644
--- a/Mesh/meshGEdge.cpp
+++ b/Mesh/meshGEdge.cpp
@@ -256,7 +256,9 @@ static void copyMesh(GEdge *from, GEdge *to, int direction)
     double u; v->getParameter(0, u);
     double newu = (direction > 0) ? u : (u_max - u + u_min);
     GPoint gp = to->point(newu);
-    to->mesh_vertices.push_back(new MEdgeVertex(gp.x(), gp.y(), gp.z(), to, newu));
+    MEdgeVertex *vv = new MEdgeVertex(gp.x(), gp.y(), gp.z(), to, newu);
+    to->mesh_vertices.push_back(vv);
+    to->correspondingVertices[vv] = v;
   }
   for(unsigned int i = 0; i < to->mesh_vertices.size() + 1; i++){
     MVertex *v0 = (i == 0) ?
@@ -272,6 +274,7 @@ void deMeshGEdge::operator() (GEdge *ge)
   if(ge->geomType() == GEntity::DiscreteCurve) return;
   ge->deleteMesh();
   ge->meshStatistics.status = GEdge::PENDING;
+  ge->correspondingVertices.clear();
 }
 
 /*
diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp
index 650185e877f31d59929ce41022a86c953c7c18d4..c4c5e05944f8cfaf4738d6e78e875cf4cdf16b3b 100644
--- a/Mesh/meshGFace.cpp
+++ b/Mesh/meshGFace.cpp
@@ -73,20 +73,30 @@ static void copyMesh(GFace *source, GFace *target)
       if (source_e * sign > 0){
 	vs2vt[se->getBeginVertex()->mesh_vertices[0]] = te->getBeginVertex()->mesh_vertices[0];
 	vs2vt[se->getEndVertex()->mesh_vertices[0]] = te->getEndVertex()->mesh_vertices[0];
-	for (unsigned i = 0; i < se->mesh_vertices.size(); i++){
-	  MVertex *vs = se->mesh_vertices[i];
-	  MVertex *vt = te->mesh_vertices[i];
-	  vs2vt[vs] = vt;
-	}
       }
       else {
 	vs2vt[se->getBeginVertex()->mesh_vertices[0]] = te->getEndVertex()->mesh_vertices[0];
 	vs2vt[se->getEndVertex()->mesh_vertices[0]] = te->getBeginVertex()->mesh_vertices[0];
-	for (unsigned i = 0; i < se->mesh_vertices.size(); i++){
-	  MVertex *vs = se->mesh_vertices[i];
-	  MVertex *vt = te->mesh_vertices[se->mesh_vertices.size() - i - 1];
-	  vs2vt[vs] = vt;
+      }
+      // iterate on source vertices
+      for (unsigned i = 0; i < te->mesh_vertices.size(); i++){
+	MVertex *vt = te->mesh_vertices[i];
+	MVertex *vs = 0;
+	MVertex *vt_on_master;
+	if (te->meshMaster() == te->tag())vt_on_master =vt;
+	else vt_on_master = te->correspondingVertices[vt];
+	
+	if (se->meshMaster() == se->tag()){
+	  vs = vt_on_master;
+	}
+	else {
+	  for (unsigned j = 0; j < se->mesh_vertices.size(); j++){
+	    vs = se->mesh_vertices[j];
+	    MVertex *vs_on_master = se->correspondingVertices[vs];
+	    if (vs_on_master == vt_on_master)break;
+	  }
 	}
+	vs2vt[vs] = vt;
       }
     }
   }
@@ -127,12 +137,15 @@ static void copyMesh(GFace *source, GFace *target)
     const double U =   c * (u - s1u) + s * (v - s1v) + t1u;
     const double V =  -s * (u - s1u) + c * (v - s1v) + t1v;
     SPoint3 tp (vs->x() + DX.x(),vs->y() + DX.y(),vs->z() + DX.z());
-    const double initialGuess[2] = {U,V};
-    SPoint2 XXX = target->parFromPoint(tp,initialGuess);
+    //    const double initialGuess[2] = {U,V};    
+    // FIXME !!!
+    // assume a translation for now !!!
+    SPoint2 XXX = target->parFromPoint(tp);
     GPoint gp = target->point(XXX);
     
     MVertex *vt = new MFaceVertex(gp.x(), gp.y(), gp.z(), target, U, V);
     target->mesh_vertices.push_back(vt);
+    target->correspondingVertices[vt] = vs;
     vs2vt[vs] = vt;
   }
   for (unsigned i = 0; i < source->triangles.size(); i++){
@@ -140,24 +153,6 @@ static void copyMesh(GFace *source, GFace *target)
     for (int j = 0; j < 3; j++){
       MVertex *vs = source->triangles[i]->getVertex(j);
       vt[j] = vs2vt[vs];
-      if (!vt[j]){
-	SPoint2 p;
-	reparamMeshVertexOnFace(vs, source, p);
-	const double U =   c * (p.x()-s1u) + s * (p.y()-s1v) + t1u;
-	const double V =  -s * (p.x()-s1u) + c * (p.y()-s1v) + t1v;
-	for (std::list<GEdge*>::iterator it = edges.begin(); it != edges.end(); ++it){
-	  GEdge *te = *it;
-	  for (unsigned k = 0; k < te->lines.size(); k++){
-	    MVertex *gotcha = te->lines[k]->getVertex(0);
-	    reparamMeshVertexOnFace(gotcha, target, p);
-	    const double D = sqrt((U - p.x()) * (U - p.x()) + (V - p.y()) * (V - p.y()));
-	    if (D < 1.e-9){
-	      vt[j] = gotcha;
-	      break;
-	    }
-	  }
-	}
-      }
     }
     if (!vt[0] || !vt[1] ||!vt[2]){
       Msg::Fatal("yet another error in the copymesh procedure %p %p %p %d %d %d",
@@ -173,6 +168,14 @@ static void copyMesh(GFace *source, GFace *target)
     MVertex *v2 = vs2vt[source->quadrangles[i]->getVertex(1)];
     MVertex *v3 = vs2vt[source->quadrangles[i]->getVertex(2)];
     MVertex *v4 = vs2vt[source->quadrangles[i]->getVertex(3)];
+    if (!v1 || !v2 || !v3 || !v4){
+      Msg::Fatal("yet another error in the copymesh procedure %p %p %p %p %d %d %d %d",
+		 v1, v2, v3, v4, 
+		 source->quadrangles[i]->getVertex(0)->onWhat()->dim(),
+		 source->quadrangles[i]->getVertex(1)->onWhat()->dim(),
+		 source->quadrangles[i]->getVertex(2)->onWhat()->dim(),
+		 source->quadrangles[i]->getVertex(3)->onWhat()->dim());
+    }
     target->quadrangles.push_back(new MQuadrangle(v1, v2, v3, v4));
   }
 }
@@ -1842,6 +1845,7 @@ void deMeshGFace::operator() (GFace *gf)
   gf->deleteMesh();
   gf->meshStatistics.status = GFace::PENDING;
   gf->meshStatistics.nbTriangle = gf->meshStatistics.nbEdge = 0;
+  gf->correspondingVertices.clear();
 }
 
 // for debugging, change value from -1 to -100;
diff --git a/Mesh/meshGFaceDelaunayInsertion.cpp b/Mesh/meshGFaceDelaunayInsertion.cpp
index b77032fbbda0be1773945456dbfe68d7d6a317fe..480b6080c1865cc791cf91df751f9e7436232c39 100644
--- a/Mesh/meshGFaceDelaunayInsertion.cpp
+++ b/Mesh/meshGFaceDelaunayInsertion.cpp
@@ -43,8 +43,7 @@ static bool isBoundary(MTri3 *t, double limit_, int &active)
 }
 */
 template <class ITERATOR>
-void _printTris(char *name, ITERATOR it,  ITERATOR end,
-                std::vector<double> &Us, std::vector<double> &Vs, bool param=true)
+void _printTris(char *name, ITERATOR it,  ITERATOR end, bidimMeshData & data, bool param=true)
 {
   FILE *ff = fopen (name,"w");
   fprintf(ff,"View\"test\"{\n");
@@ -53,14 +52,14 @@ void _printTris(char *name, ITERATOR it,  ITERATOR end,
     if (!worst->isDeleted()){
       if (param)
         fprintf(ff,"ST(%g,%g,%g,%g,%g,%g,%g,%g,%g) {%g,%g,%g};\n",
-                Us[(worst)->tri()->getVertex(0)->getIndex()],
-                Vs[(worst)->tri()->getVertex(0)->getIndex()],
+                data.Us[data.getIndex((worst)->tri()->getVertex(0))],
+                data.Vs[data.getIndex((worst)->tri()->getVertex(0))],
                 0.0,
-                Us[(worst)->tri()->getVertex(1)->getIndex()],
-                Vs[(worst)->tri()->getVertex(1)->getIndex()],
+                data.Us[data.getIndex((worst)->tri()->getVertex(1))],
+                data.Vs[data.getIndex((worst)->tri()->getVertex(1))],
                 0.0,
-                Us[(worst)->tri()->getVertex(2)->getIndex()],
-                Vs[(worst)->tri()->getVertex(2)->getIndex()],
+                data.Us[data.getIndex((worst)->tri()->getVertex(2))],
+                data.Vs[data.getIndex((worst)->tri()->getVertex(2))],
                 0.0,
                 (worst)->getRadius(),
                 (worst)->getRadius(),
@@ -131,13 +130,11 @@ static void updateActiveEdges(MTri3 *t, double limit_, std::set<MEdge,Less_Edge>
   }
 }
 
-bool circumCenterMetricInTriangle(MTriangle *base, const double *metric,
-                                  const std::vector<double> &Us,
-                                  const std::vector<double> &Vs)
+bool circumCenterMetricInTriangle(MTriangle *base, const double *metric, bidimMeshData & data )
 {
   double R, x[2], uv[2];
-  circumCenterMetric(base, metric, Us, Vs, x, R);
-  return invMapUV(base, x, Us, Vs, uv, 1.e-8);
+  circumCenterMetric(base, metric, data, x, R);
+  return invMapUV(base, x, data, uv, 1.e-8);
 }
 
 void circumCenterMetric(double *pa, double *pb, double *pc,
@@ -210,18 +207,16 @@ void circumCenterMetricXYZ(double *p1, double *p2, double *p3, SMetric3 & metric
   res[2] = p1[2] + resP[0] * vx[2] + resP[1] * vy[2];
 }
 
-void circumCenterMetric(MTriangle *base, const double *metric,
-                        const std::vector<double> &Us,
-                        const std::vector<double> &Vs,
+void circumCenterMetric(MTriangle *base, const double *metric, bidimMeshData & data,
                         double *x, double &Radius2)
 {
   // d = (u2-u1) M (u2-u1) = u2 M u2 + u1 M u1 - 2 u2 M u1
-  double pa[2] = {Us[base->getVertex(0)->getIndex()],
-                  Vs[base->getVertex(0)->getIndex()]};
-  double pb[2] = {Us[base->getVertex(1)->getIndex()],
-                  Vs[base->getVertex(1)->getIndex()]};
-  double pc[2] = {Us[base->getVertex(2)->getIndex()],
-                  Vs[base->getVertex(2)->getIndex()]};
+  int index0 = data.getIndex (base->getVertex(0)); 
+  int index1 = data.getIndex (base->getVertex(1)); 
+  int index2 = data.getIndex (base->getVertex(2)); 
+  double pa[2] = {data.Us[index0], data.Vs[index0] };
+  double pb[2] = {data.Us[index1], data.Vs[index1] };
+  double pc[2] = {data.Us[index2], data.Vs[index2] };
   circumCenterMetric(pa, pb, pc, metric, x, Radius2);
 }
 
@@ -238,7 +233,7 @@ void buildMetric(GFace *gf, double *uv, double *metric)
 // d 3x2
 // M = d^T m d
 
-void buildMetric(GFace *gf, double *uv, SMetric3 & m, double *metric)
+void buildMetric(GFace *gf, double *uv, const SMetric3 & m, double *metric)
 {
 
   Pair<SVector3, SVector3> der = gf->firstDer(SPoint2(uv[0], uv[1]));
@@ -282,19 +277,18 @@ int inCircumCircleAniso(GFace *gf, double *p1, double *p2, double *p3,
 }
 
 int inCircumCircleAniso(GFace *gf, MTriangle *base,
-                        const double *uv, const double *metricb,
-                        const std::vector<double> &Us,
-                        const std::vector<double> &Vs)
+                        const double *uv, const double *metric,
+			bidimMeshData & data)
 {
-  double x[2], Radius2, metric[3];
-  double pa[2] = {(Us[base->getVertex(0)->getIndex()] +
-                   Us[base->getVertex(1)->getIndex()] +
-                   Us[base->getVertex(2)->getIndex()]) / 3.,
-                  (Vs[base->getVertex(0)->getIndex()] +
-                   Vs[base->getVertex(1)->getIndex()] +
-                   Vs[base->getVertex(2)->getIndex()]) / 3.};
-  buildMetric(gf, pa, metric);
-  circumCenterMetric(base, metric, Us, Vs, x, Radius2);
+  //  int index0 = data.getIndex (base->getVertex(0)); 
+  //  int index1 = data.getIndex (base->getVertex(1)); 
+  //  int index2 = data.getIndex (base->getVertex(2)); 
+  //  double x[2], Radius2, metric[3];
+  double x[2], Radius2;
+  //  double pa[2] = {(data.Us[index0] +data.Us[index1] + data.Us[index2]) / 3.,
+  //		  (data.Vs[index0] +data.Vs[index1] + data.Vs[index2]) / 3.};
+  //  buildMetric(gf, pa, metric);
+  circumCenterMetric(base, metric, data, x, Radius2);
 
   const double a = metric[0];
   const double b = metric[1];
@@ -306,9 +300,7 @@ int inCircumCircleAniso(GFace *gf, MTriangle *base,
   return d3 < Radius2;
 }
 
-MTri3::MTri3(MTriangle *t, double lc, SMetric3 *metric,
-             const std::vector<double> *Us,
-             const std::vector<double> *Vs, GFace *gf)
+MTri3::MTri3(MTriangle *t, double lc, SMetric3 *metric, bidimMeshData * data, GFace *gf)
   : deleted(false), base(t)
 {
   neigh[0] = neigh[1] = neigh[2] = 0;
@@ -330,12 +322,13 @@ MTri3::MTri3(MTriangle *t, double lc, SMetric3 *metric,
       circum_radius /= lc;
     }
     else {
-      double p1[2] = {(*Us)[base->getVertex(0)->getIndex()],
-		      (*Vs)[base->getVertex(0)->getIndex()]};
-      double p2[2] = {(*Us)[base->getVertex(1)->getIndex()],
-		      (*Vs)[base->getVertex(1)->getIndex()]};
-      double p3[2] = {(*Us)[base->getVertex(2)->getIndex()],
-		      (*Vs)[base->getVertex(2)->getIndex()]};
+
+      int index0 = data->getIndex (base->getVertex(0)); 
+      int index1 = data->getIndex (base->getVertex(1)); 
+      int index2 = data->getIndex (base->getVertex(2)); 
+      double p1[2] = {data->Us[index0], data->Vs[index0] };
+      double p2[2] = {data->Us[index1], data->Vs[index1] };
+      double p3[2] = {data->Us[index2], data->Vs[index2] };
 
       double midpoint[2] = {(p1[0]+p2[0]+p3[0])/3.0,(p1[1]+p2[1]+p3[1])/3.0};
 
@@ -384,15 +377,14 @@ int MTri3::inCircumCircle(const double *p) const
 }
 
 int inCircumCircle(MTriangle *base,
-                   const double *p, const double *param ,
-                   std::vector<double> &Us, std::vector<double> &Vs)
+                   const double *p, const double *param , bidimMeshData & data)
 {
-  double pa[2] = {Us[base->getVertex(0)->getIndex()],
-                  Vs[base->getVertex(0)->getIndex()]};
-  double pb[2] = {Us[base->getVertex(1)->getIndex()],
-                  Vs[base->getVertex(1)->getIndex()]};
-  double pc[2] = {Us[base->getVertex(2)->getIndex()],
-                  Vs[base->getVertex(2)->getIndex()]};
+  int index0 = data.getIndex (base->getVertex(0)); 
+  int index1 = data.getIndex (base->getVertex(1)); 
+  int index2 = data.getIndex (base->getVertex(2)); 
+  double pa[2] = {data.Us[index0], data.Vs[index0] };
+  double pb[2] = {data.Us[index1], data.Vs[index1] };
+  double pc[2] = {data.Us[index2], data.Vs[index2] };
 
   double result = robustPredicates::incircle(pa, pb, pc, (double*)param) *
     robustPredicates::orient2d(pa, pb, pc);
@@ -462,8 +454,7 @@ void connectTriangles(std::set<MTri3*, compareTri3Ptr> &l)
 }
 
 void recurFindCavity(std::list<edgeXface> &shell, std::list<MTri3*> &cavity,
-                     double *v, double *param, MTri3 *t,
-                     std::vector<double> &Us, std::vector<double> &Vs)
+                     double *v, double *param, MTri3 *t,  bidimMeshData & data)
 {
   t->setDeleted(true);
   // the cavity that has to be removed because it violates delaunay
@@ -475,9 +466,9 @@ void recurFindCavity(std::list<edgeXface> &shell, std::list<MTri3*> &cavity,
     if (!neigh)
       shell.push_back(edgeXface(t, i));
     else if (!neigh->isDeleted()){
-      int circ =  inCircumCircle(neigh->tri(), v , param, Us, Vs);
+      int circ =  inCircumCircle(neigh->tri(), v , param, data);
       if (circ)
-        recurFindCavity(shell, cavity, v, param, neigh, Us, Vs);
+        recurFindCavity(shell, cavity, v, param, neigh, data);
       else
         shell.push_back(edgeXface(t, i));
     }
@@ -486,8 +477,7 @@ void recurFindCavity(std::list<edgeXface> &shell, std::list<MTri3*> &cavity,
 
 void recurFindCavityAniso(GFace *gf,
                           std::list<edgeXface> &shell, std::list<MTri3*> &cavity,
-                          double *metric, double *param,  MTri3 *t,
-                          std::vector<double> &Us, std::vector<double> &Vs)
+                          double *metric, double *param,  MTri3 *t, bidimMeshData & data)
 {
   t->setDeleted(true);
   // the cavity that has to be removed because it violates delaunay
@@ -499,44 +489,44 @@ void recurFindCavityAniso(GFace *gf,
     if (!neigh)
       shell.push_back(edgeXface(t, i));
     else  if (!neigh->isDeleted()){
-      int circ =  inCircumCircleAniso(gf, neigh->tri(), param, metric, Us, Vs);
+      //      int circ =  inCircumCircleAniso(gf, neigh->tri(), param, metric, data);
+      int circ =  inCircumCircleAniso(gf, neigh->tri(), param, metric, data);
       if (circ)
-        recurFindCavityAniso(gf, shell, cavity,metric, param, neigh, Us, Vs);
+        recurFindCavityAniso(gf, shell, cavity,metric, param, neigh, data);
       else
         shell.push_back(edgeXface(t, i));
     }
   }
 }
 
-bool circUV(MTriangle *t, std::vector<double> & Us, std::vector<double> &Vs,
-            double *res, GFace *gf)
+bool circUV(MTriangle *t, bidimMeshData & data, double *res, GFace *gf)
 {
-  double u1[3] = {Us[t->getVertex(0)->getIndex()], Vs[t->getVertex(0)->getIndex()], 0};
-  double u2[3] = {Us[t->getVertex(1)->getIndex()], Vs[t->getVertex(1)->getIndex()], 0};
-  double u3[3] = {Us[t->getVertex(2)->getIndex()], Vs[t->getVertex(2)->getIndex()], 0};
+  int index0 = data.getIndex (t->getVertex(0)); 
+  int index1 = data.getIndex (t->getVertex(1)); 
+  int index2 = data.getIndex (t->getVertex(2)); 
+  double u1[3] = {data.Us[index0], data.Vs[index0], 0 };
+  double u2[3] = {data.Us[index1], data.Vs[index1], 0 };
+  double u3[3] = {data.Us[index2], data.Vs[index2], 0 };
   circumCenterXY(u1, u2, u3, res);
   return true;
-  double p1[3] = {t->getVertex(0)->x(), t->getVertex(0)->y(), t->getVertex(0)->z()};
-  double p2[3] = {t->getVertex(1)->x(), t->getVertex(1)->y(), t->getVertex(1)->z()};
-  double p3[3] = {t->getVertex(2)->x(), t->getVertex(2)->y(), t->getVertex(2)->z()};
-  double resxy[3], uv[2];
-  circumCenterXYZ(p1, p2, p3, resxy,uv);
-  return true;
 }
 
-bool invMapUV(MTriangle *t, double *p,
-              const std::vector<double> &Us, const std::vector<double> &Vs,
+bool invMapUV(MTriangle *t, double *p, bidimMeshData & data,
               double *uv, double tol)
 {
   double mat[2][2];
   double b[2];
 
-  double u0 = Us[t->getVertex(0)->getIndex()];
-  double v0 = Vs[t->getVertex(0)->getIndex()];
-  double u1 = Us[t->getVertex(1)->getIndex()];
-  double v1 = Vs[t->getVertex(1)->getIndex()];
-  double u2 = Us[t->getVertex(2)->getIndex()];
-  double v2 = Vs[t->getVertex(2)->getIndex()];
+  int index0 = data.getIndex (t->getVertex(0)); 
+  int index1 = data.getIndex (t->getVertex(1)); 
+  int index2 = data.getIndex (t->getVertex(2)); 
+
+  double u0 = data.Us[index0];
+  double v0 = data.Vs[index0];
+  double u1 = data.Us[index1];
+  double v1 = data.Vs[index1];
+  double u2 = data.Us[index2];
+  double v2 = data.Vs[index2];
 
   mat[0][0] = u1 - u0;
   mat[0][1] = u2 - u0;
@@ -557,31 +547,31 @@ bool invMapUV(MTriangle *t, double *p,
   return false;
 }
 
-inline double getSurfUV(MTriangle *t, std::vector<double> &Us, std::vector<double> &Vs)
+inline double getSurfUV(MTriangle *t, bidimMeshData & data)
 {
-  double u1 = Us[t->getVertex(0)->getIndex()];
-  double v1 = Vs[t->getVertex(0)->getIndex()];
-  double u2 = Us[t->getVertex(1)->getIndex()];
-  double v2 = Vs[t->getVertex(1)->getIndex()];
-  double u3 = Us[t->getVertex(2)->getIndex()];
-  double v3 = Vs[t->getVertex(2)->getIndex()];
+  int index0 = data.getIndex (t->getVertex(0)); 
+  int index1 = data.getIndex (t->getVertex(1)); 
+  int index2 = data.getIndex (t->getVertex(2)); 
+
+  double u1 = data.Us[index0];
+  double v1 = data.Vs[index0];
+  double u2 = data.Us[index1];
+  double v2 = data.Vs[index1];
+  double u3 = data.Us[index2];
+  double v3 = data.Vs[index2];
+
   const double vv1[2] = {u2 - u1, v2 - v1};
   const double vv2[2] = {u3 - u1, v3 - v1};
   double s = vv1[0] * vv2[1] - vv1[1] * vv2[0];
   return s * 0.5;
 }
 
-double __DT2;
 bool insertVertexB (std::list<edgeXface> &shell,
 		    std::list<MTri3*> &cavity,
 		    bool force, GFace *gf, MVertex *v, double *param , MTri3 *t,
 		    std::set<MTri3*, compareTri3Ptr> &allTets,
 		    std::set<MTri3*, compareTri3Ptr> *activeTets,
-		    std::vector<double> &vSizes,
-		    std::vector<double> &vSizesBGM,
-		    std::vector<SMetric3> &vMetricsBGM,
-		    std::vector<double> &Us,
-		    std::vector<double> &Vs,
+		    bidimMeshData & data,
 		    double *metric,
 		    MTri3 **oneNewTriangle)
 {
@@ -596,7 +586,7 @@ bool insertVertexB (std::list<edgeXface> &shell,
   std::list<MTri3*>::iterator ittet = cavity.begin();
   std::list<MTri3*>::iterator ittete = cavity.end();
   while(ittet != ittete){
-    oldVolume += fabs(getSurfUV((*ittet)->tri(),Us,Vs));
+    oldVolume += fabs(getSurfUV((*ittet)->tri(),data));
     ++ittet;
   }
 
@@ -607,17 +597,16 @@ bool insertVertexB (std::list<edgeXface> &shell,
   bool onePointIsTooClose = false;
   while (it != shell.end()){
     MTriangle *t = new MTriangle(it->v[0], it->v[1], v);
+    int index0 = data.getIndex (t->getVertex(0)); 
+    int index1 = data.getIndex (t->getVertex(1)); 
+    int index2 = data.getIndex (t->getVertex(2)); 
     const double ONE_THIRD = 1./3.;
-    double lc = ONE_THIRD * (vSizes[t->getVertex(0)->getIndex()] +
-                             vSizes[t->getVertex(1)->getIndex()] +
-                             vSizes[t->getVertex(2)->getIndex()]);
-    double lcBGM = ONE_THIRD * (vSizesBGM[t->getVertex(0)->getIndex()] +
-                                vSizesBGM[t->getVertex(1)->getIndex()] +
-                                vSizesBGM[t->getVertex(2)->getIndex()]);
+    double lc = ONE_THIRD * (data.vSizes[index0] +data.vSizes[index1] +data.vSizes[index2]);
+    double lcBGM = ONE_THIRD * (data.vSizesBGM[index0] +data.vSizesBGM[index1] +data.vSizesBGM[index2]);
     double LL = Extend1dMeshIn2dSurfaces() ? std::min(lc, lcBGM) : lcBGM;
 
     MTri3 *t4;
-    t4 = new MTri3(t, LL,0,&Us,&Vs,gf);
+    t4 = new MTri3(t, LL,0,&data,gf);
     if (oneNewTriangle) {force = true; *oneNewTriangle = t4;}
     //    double din = t->getInnerRadius();
 
@@ -628,8 +617,9 @@ bool insertVertexB (std::list<edgeXface> &shell,
     // avoid angles that are too obtuse
     double cosv = ((d1*d1+d2*d2-d3*d3)/(2.*d1*d2));
 
-    if ((d1 < LL * .5 || d2 < LL * .5 || cosv < -.9) && !force) {
+    if ((d1 < LL * .25 || d2 < LL * .25 || cosv < -.9999) && !force) {
       onePointIsTooClose = true;
+      //      printf("%12.5E %12.5E %12.5E %12.5E \n",d1,d2,LL,cosv);
     }
 
     newTris[k++] = t4;
@@ -640,7 +630,7 @@ bool insertVertexB (std::list<edgeXface> &shell,
     MTri3 *otherSide = it->t1->getNeigh(it->i1);
     if (otherSide)
       new_cavity.push_back(otherSide);
-    double ss = fabs(getSurfUV(t4->tri(), Us, Vs));
+    double ss = fabs(getSurfUV(t4->tri(), data));
     if (ss < 1.e-25) ss = 1.e22;
     newVolume += ss;
     ++it;
@@ -650,11 +640,11 @@ bool insertVertexB (std::list<edgeXface> &shell,
   if (fabs(oldVolume - newVolume) < 1.e-12 * oldVolume && !onePointIsTooClose){
     connectTris_vector(new_cavity.begin(), new_cavity.end());
     //    printf("%d %d\n",shell.size(),cavity.size());
-    double t1 = Cpu();
+    //    clock_t t1 = clock();
     // 30 % of the time is spent here !!!
     allTets.insert(newTris, newTris + shell.size());
-    //    double t2 = Cpu();
-    __DT2 += Cpu()-t1;
+    //    clock_t t2 = clock();
+    //    __DT2 += (double)(clock()-t1)/CLOCKS_PER_SEC;
     if (activeTets){
       for (std::list<MTri3*>::iterator i = new_cavity.begin(); i != new_cavity.end(); ++i){
         int active_edge;
@@ -671,7 +661,7 @@ bool insertVertexB (std::list<edgeXface> &shell,
   // The cavity is NOT star shaped
   else{
 
-    //    printf("(%g %g) %22.15E %22.15E %d %d %d %d %d\n",v->x(),v->y(),oldVolume,  newVolume, newVolume,shell.size(), onePointIsTooClose, cavity.size(), new_cavity.size(),allTets.size());
+    //    printf("(%g %g) %22.15E %22.15E %d %d %d %d %d\n",v->x(),v->y(),oldVolume,  newVolume, shell.size(), onePointIsTooClose, cavity.size(), new_cavity.size(),allTets.size());
     //    printf("12.5E 12.5E 12.5E 12.5E 12.5E\n",d1,d2,LL,cosv);
 
     ittet = cavity.begin();
@@ -696,11 +686,7 @@ bool insertVertexB (std::list<edgeXface> &shell,
 bool insertVertex(bool force, GFace *gf, MVertex *v, double *param , MTri3 *t,
                   std::set<MTri3*, compareTri3Ptr> &allTets,
                   std::set<MTri3*, compareTri3Ptr> *activeTets,
-                  std::vector<double> &vSizes,
-                  std::vector<double> &vSizesBGM,
-                  std::vector<SMetric3> &vMetricsBGM,
-                  std::vector<double> &Us,
-                  std::vector<double> &Vs,
+		  bidimMeshData & data,
                   double *metric,
 		  MTri3 **oneNewTriangle)
 {
@@ -709,31 +695,28 @@ bool insertVertex(bool force, GFace *gf, MVertex *v, double *param , MTri3 *t,
 
   if (!metric){
     double p[3] = {v->x(), v->y(), v->z()};
-    recurFindCavity(shell, cavity, p, param, t, Us, Vs);
+    recurFindCavity(shell, cavity, p, param, t, data);
   }
   else{
-    recurFindCavityAniso(gf, shell, cavity, metric, param, t, Us, Vs);
+    recurFindCavityAniso(gf, shell, cavity, metric, param, t, data);
   }
 
   return insertVertexB(shell, cavity, force, gf, v, param , t,
 		       allTets,
 		       activeTets,
-		       vSizes,
-		       vSizesBGM,
-		       vMetricsBGM,
-		       Us,
-		       Vs,
+		       data,
 		       metric,
 		       oneNewTriangle);
 }
 
 
-static MTri3* search4Triangle (MTri3 *t, double pt[2],
-			       std::vector<double> &Us, std::vector<double> &Vs,
+static MTri3* search4Triangle (MTri3 *t, double pt[2], bidimMeshData & data,
 			       std::set<MTri3*,compareTri3Ptr> &AllTris, double uv[2], bool force = false) {
 
   //  bool inside = t->inCircumCircle(pt);
-  bool inside =  invMapUV(t->tri(), pt, Us, Vs, uv, 1.e-8);
+  bool inside =  invMapUV(t->tri(), pt, data, uv, 1.e-8);
+
+
 
   //  printf("inside = %d (%g %g)\n",inside,pt[0],pt[1]);
   if (inside) return t;
@@ -741,26 +724,25 @@ static MTri3* search4Triangle (MTri3 *t, double pt[2],
   int ITER = 0;
   while (1){
     N_SEARCH ++ ;
-    SPoint3 q2((Us[t->tri()->getVertex(0)->getIndex()] +
-                Us[t->tri()->getVertex(1)->getIndex()] +
-                Us[t->tri()->getVertex(2)->getIndex()]) / 3.0,
-	       (Vs[t->tri()->getVertex(0)->getIndex()] +
-                Vs[t->tri()->getVertex(1)->getIndex()] +
-                Vs[t->tri()->getVertex(2)->getIndex()]) / 3.0,
+    int index0 = data.getIndex (t->tri()->getVertex(0)); 
+    int index1 = data.getIndex (t->tri()->getVertex(1)); 
+    int index2 = data.getIndex (t->tri()->getVertex(2)); 
+    SPoint3 q2((data.Us[index0] +data.Us[index1] +data.Us[index2])/ 3.0,
+	       (data.Vs[index0] +data.Vs[index1] +data.Vs[index2])/ 3.0,
 	       0);
     int i;
     for (i = 0; i < 3; i++){
-      SPoint3 p1 (Us[t->tri()->getVertex(i == 0 ? 2 : i-1)->getIndex()],
-                  Vs[t->tri()->getVertex(i == 0 ? 2 : i-1)->getIndex()], 0);
-      SPoint3 p2 (Us[t->tri()->getVertex(i)->getIndex()],
-                  Vs[t->tri()->getVertex(i)->getIndex()], 0);
+      int i1 = data.getIndex (t->tri()->getVertex(i == 0 ? 2 : i-1) );
+      int i2 = data.getIndex (t->tri()->getVertex(i) );
+      SPoint3 p1 (data.Us[i1],data.Vs[i1],0);
+      SPoint3 p2 (data.Us[i2],data.Vs[i2],0);
       double xcc[2];
       if (intersection_segments(p1, p2, q1, q2, xcc)) break;
     }
     if (i >= 3) break;
     t = t->getNeigh(i);
     if (!t) break;
-    bool inside = invMapUV(t->tri(), pt, Us, Vs, uv, 1.e-8);
+    bool inside = invMapUV(t->tri(), pt, data, uv, 1.e-8);
     //    printf("ITER %d %d\n",ITER,inside);
     if (inside) return t;
     if (ITER++ > (int)AllTris.size()) break;
@@ -772,7 +754,7 @@ static MTri3* search4Triangle (MTri3 *t, double pt[2],
   for(std::set<MTri3*,compareTri3Ptr>::iterator itx = AllTris.begin();
       itx != AllTris.end();++itx){
     if (!(*itx)->isDeleted()){
-      inside = invMapUV((*itx)->tri(), pt, Us, Vs, uv, 1.e-8);
+      inside = invMapUV((*itx)->tri(), pt, data, uv, 1.e-8);
       if (inside){
 	return *itx;
       }
@@ -784,11 +766,7 @@ static MTri3* search4Triangle (MTri3 *t, double pt[2],
 //double __DT1;
 
 static bool insertAPoint(GFace *gf, std::set<MTri3*,compareTri3Ptr>::iterator it,
-                         double center[2], double metric[3],
-                         std::vector<double> &Us, std::vector<double> &Vs,
-                         std::vector<double> &vSizes,
-                         std::vector<double> &vSizesBGM,
-                         std::vector<SMetric3> &vMetricsBGM,
+                         double center[2], double metric[3], bidimMeshData & data,
                          std::set<MTri3*,compareTri3Ptr> &AllTris,
                          std::set<MTri3*,compareTri3Ptr> *ActiveTris = 0,
                          MTri3 *worst = 0,  MTri3 **oneNewTriangle = 0)
@@ -810,12 +788,12 @@ static bool insertAPoint(GFace *gf, std::set<MTri3*,compareTri3Ptr>::iterator it
 
   // if the point is able to break the bad triangle "worst"
   if (1){
-    if (inCircumCircleAniso(gf, worst->tri(), center, metric, Us, Vs)){
+    if (inCircumCircleAniso(gf, worst->tri(), center, metric, data)){
       //      double t1 = Cpu();
-      recurFindCavityAniso(gf, shell, cavity, metric, center, worst, Us, Vs);
+      recurFindCavityAniso(gf, shell, cavity, metric, center, worst, data);
       //      __DT1 += Cpu() - t1 ;
       for (std::list<MTri3*>::iterator itc = cavity.begin(); itc != cavity.end(); ++itc){
-	if (invMapUV((*itc)->tri(), center, Us, Vs, uv, 1.e-8)) {
+	if (invMapUV((*itc)->tri(), center, data, uv, 1.e-8)) {
 	  ptin = *itc;
 	  break;
 	}
@@ -824,9 +802,9 @@ static bool insertAPoint(GFace *gf, std::set<MTri3*,compareTri3Ptr>::iterator it
     // else look for it
     else {
       //      printf("cocuou\n");
-      ptin = search4Triangle (worst, center, Us, Vs, AllTris,uv, oneNewTriangle ? true : false);
+      ptin = search4Triangle (worst, center, data, AllTris,uv, oneNewTriangle ? true : false);
       if (ptin) {
-	recurFindCavityAniso(gf, shell, cavity, metric, center, ptin, Us, Vs);
+	recurFindCavityAniso(gf, shell, cavity, metric, center, ptin, data);    
       }
     }
   }
@@ -838,28 +816,25 @@ static bool insertAPoint(GFace *gf, std::set<MTri3*,compareTri3Ptr>::iterator it
     // x,y and z will be computed hereafter
     // Msg::Info("Point is inside");
     GPoint p = gf->point(center[0], center[1]);
-    // printf("the new point is %g %g\n",p.x(),p.y());
+
+    // should not have an omp critical here
     MVertex *v = new MFaceVertex(p.x(), p.y(), p.z(), gf, center[0], center[1]);
-    v->setIndex(Us.size());
+
     double lc1,lc;
-    lc1 = ((1. - uv[0] - uv[1]) * vSizes[ptin->tri()->getVertex(0)->getIndex()] +
-	   uv[0] * vSizes[ptin->tri()->getVertex(1)->getIndex()] +
-	   uv[1] * vSizes[ptin->tri()->getVertex(2)->getIndex()]);
+    int index0 = data.getIndex(ptin->tri()->getVertex(0));
+    int index1 = data.getIndex(ptin->tri()->getVertex(1));
+    int index2 = data.getIndex(ptin->tri()->getVertex(2));
+    lc1 = (1. - uv[0] - uv[1]) * data.vSizes[index0] + uv[0] * data.vSizes[index1] + uv[1] * data.vSizes[index2];
     lc = BGM_MeshSize(gf, center[0], center[1], p.x(), p.y(), p.z());
-
+    
     //SMetric3 metr = BGM_MeshMetric(gf, center[0], center[1], p.x(), p.y(), p.z());
     //                               vMetricsBGM.push_back(metr);
-    vSizesBGM.push_back(lc);
-    vSizes.push_back(lc1);
-    Us.push_back(center[0]);
-    Vs.push_back(center[1]);
-
-
+    data.addVertex ( v ,  center[0], center[1], lc1, lc ); 
+    
     //    double t1 = Cpu();
 
     if(!p.succeeded() || !insertVertexB
-       (shell, cavity,false, gf, v, center, ptin, AllTris,ActiveTris, vSizes, vSizesBGM,vMetricsBGM,
-        Us, Vs, metric, oneNewTriangle) ) {
+       (shell, cavity,false, gf, v, center, ptin, AllTris,ActiveTris, data , metric, oneNewTriangle) ) {
       Msg::Debug("Point %g %g cannot be inserted because %d",
 		 center[0], center[1], p.succeeded() );
       //      printf("Point %g %g cannot be inserted because %d",
@@ -880,16 +855,8 @@ static bool insertAPoint(GFace *gf, std::set<MTri3*,compareTri3Ptr>::iterator it
     }
   }
   else {
-    MTriangle *base = worst->tri();
+    //    MTriangle *base = worst->tri();
     for (std::list<MTri3*>::iterator itc = cavity.begin(); itc != cavity.end(); ++itc)(*itc)->setDeleted(false);
-    Msg::Debug("Point %g %g is outside (%g %g , %g %g , %g %g)",
-               center[0], center[1],
-               Us[base->getVertex(0)->getIndex()],
-               Vs[base->getVertex(0)->getIndex()],
-               Us[base->getVertex(1)->getIndex()],
-               Vs[base->getVertex(1)->getIndex()],
-               Us[base->getVertex(2)->getIndex()],
-               Vs[base->getVertex(2)->getIndex()]);
     AllTris.erase(it);
     worst->forceRadius(0);
     AllTris.insert(worst);
@@ -900,14 +867,12 @@ static bool insertAPoint(GFace *gf, std::set<MTri3*,compareTri3Ptr>::iterator it
 void bowyerWatson(GFace *gf, int MAXPNT)
 {
   std::set<MTri3*,compareTri3Ptr> AllTris;
-  std::vector<double> vSizes, vSizesBGM, Us, Vs;
-  std::vector<SMetric3> vMetricsBGM;
+  bidimMeshData DATA;
 
-  buildMeshGenerationDataStructures
-    (gf, AllTris, vSizes, vSizesBGM, vMetricsBGM, Us, Vs);
+  buildMeshGenerationDataStructures(gf, AllTris, DATA);
 
   // _printTris ("before.pos", AllTris, Us,Vs);
-  int nbSwaps = edgeSwapPass(gf, AllTris, SWCR_DEL, Us, Vs, vSizes, vSizesBGM);
+  int nbSwaps = edgeSwapPass(gf, AllTris, SWCR_DEL, DATA);
   // _printTris ("after2.pos", AllTris, Us,Vs);
   Msg::Debug("Delaunization of the initial mesh done (%d swaps)", nbSwaps);
 
@@ -938,31 +903,28 @@ void bowyerWatson(GFace *gf, int MAXPNT)
       //      double t2 = Cpu();
       if(ITER++ % 5000 == 0){
         Msg::Debug("%7d points created -- Worst tri radius is %8.3f",
-                   vSizes.size(), worst->getRadius());
-	//printf("%d %d %d\n",vSizes.size(), AllTris.size(),NBDELETED);
+                   DATA.vSizes.size(), worst->getRadius());
+	//	printf("%d %d %d\n",vSizes.size(), AllTris.size(),NBDELETED);
       }
       double center[2],metric[3],r2;
-      if (worst->getRadius() < /*1.333333/(sqrt(3.0))*/0.5 * sqrt(2.0) ||
-          (int)vSizes.size() > MAXPNT) break;
-      circUV(worst->tri(), Us, Vs, center, gf);
+      if (worst->getRadius() < 0.5 * sqrt(2.0) || (int) DATA.vSizes.size() > MAXPNT) break;
+      circUV(worst->tri(), DATA, center, gf);
       MTriangle *base = worst->tri();
-      double pa[2] = {(Us[base->getVertex(0)->getIndex()] +
-                       Us[base->getVertex(1)->getIndex()] +
-                       Us[base->getVertex(2)->getIndex()]) / 3.,
-                      (Vs[base->getVertex(0)->getIndex()] +
-                       Vs[base->getVertex(1)->getIndex()] +
-                       Vs[base->getVertex(2)->getIndex()]) / 3.};
+      int index0 = DATA.getIndex( base->getVertex(0) );
+      int index1 = DATA.getIndex( base->getVertex(1) );
+      int index2 = DATA.getIndex( base->getVertex(2) );
+      double pa[2] = {(DATA.Us[index0] + DATA.Us[index1] + DATA.Us[index2])/ 3.,
+                      (DATA.Vs[index0] + DATA.Vs[index1] + DATA.Vs[index2])/ 3.};
       buildMetric(gf, pa,  metric);
-      circumCenterMetric(worst->tri(), metric, Us, Vs, center, r2);
+      circumCenterMetric(worst->tri(), metric, DATA, center, r2);
       //      DT2 += (Cpu() - t2) ;
       //      double t3 = Cpu() ;
-      insertAPoint(gf, AllTris.begin(), center, metric, Us, Vs, vSizes,
-                   vSizesBGM, vMetricsBGM, AllTris);
+      insertAPoint(gf, AllTris.begin(), center, metric, DATA, AllTris);
       //      DT3 += (Cpu() - t3) ;
     }
   }
   //  printf("%12.5E %12.5E %12.5E %12.5E %12.5E\n",DT1,DT2,DT3,__DT1,__DT2);
-  //printf("%12.5E \n",__DT2);
+  //  printf("%12.5E \n",__DT2);
 #if defined(HAVE_ANN)
   {
     FieldManager *fields = gf->model()->getFields();
@@ -974,7 +936,7 @@ void bowyerWatson(GFace *gf, int MAXPNT)
     }
   }
 #endif
-  transferDataStructure(gf, AllTris, Us, Vs);
+  transferDataStructure(gf, AllTris, DATA);
 }
 
 /*
@@ -996,16 +958,14 @@ double lengthInfniteNorm(const double p[2], const double q[2],
   return std::max(xmax-xmin,ymax-ymin);
 }
 
-void circumCenterInfinite (MTriangle *base, double quadAngle,
-			   const std::vector<double> &Us,
-			   const std::vector<double> &Vs, double *x)
+void circumCenterInfinite (MTriangle *base, double quadAngle,bidimMeshData & data, double *x)
 {
-  double pa[2] = {Us[base->getVertex(0)->getIndex()],
-                  Vs[base->getVertex(0)->getIndex()]};
-  double pb[2] = {Us[base->getVertex(1)->getIndex()],
-                  Vs[base->getVertex(1)->getIndex()]};
-  double pc[2] = {Us[base->getVertex(2)->getIndex()],
-                  Vs[base->getVertex(2)->getIndex()]};
+  int index0 = data.getIndex(base->getVertex(0));
+  int index1 = data.getIndex(base->getVertex(1));
+  int index2 = data.getIndex(base->getVertex(2));
+  double pa[2] = {data.Us[index0],data.Vs[index0]};
+  double pb[2] = {data.Us[index1],data.Vs[index1]};
+  double pc[2] = {data.Us[index2],data.Vs[index2]};
   double xa =  pa[0] * cos(quadAngle) - pa[1] * sin(quadAngle);
   double ya =  pa[0] * sin(quadAngle) + pa[1] * cos(quadAngle);
   double xb =  pb[0] * cos(quadAngle) - pb[1] * sin(quadAngle);
@@ -1053,34 +1013,30 @@ static double lengthMetric(const double p[2], const double q[2],
 */
 
 double optimalPointFrontal (GFace *gf,
-			  MTri3* worst,
-			  int active_edge,
-			  std::vector<double> &Us,
-			  std::vector<double> &Vs,
-			  std::vector<double> &vSizes,
-			  std::vector<double> &vSizesBGM,
-			  double newPoint[2],
-			  double metric[3])
+			    MTri3* worst,
+			    int active_edge,
+			    bidimMeshData & data,
+			    double newPoint[2],
+			    double metric[3])
 {
   double center[2],r2;
   MTriangle *base = worst->tri();
-  circUV(base, Us, Vs, center, gf);
-  double pa[2] = {(Us[base->getVertex(0)->getIndex()] +
-		   Us[base->getVertex(1)->getIndex()] +
-		   Us[base->getVertex(2)->getIndex()]) / 3.,
-		  (Vs[base->getVertex(0)->getIndex()] +
-		   Vs[base->getVertex(1)->getIndex()] +
-		   Vs[base->getVertex(2)->getIndex()]) / 3.};
+  circUV(base, data, center, gf);
+  int index0 = data.getIndex(base->getVertex(0));
+  int index1 = data.getIndex(base->getVertex(1));
+  int index2 = data.getIndex(base->getVertex(2));
+  double pa[2] = {(data.Us[index0] + data.Us[index1] + data.Us[index2])/ 3.,
+		  (data.Vs[index0] + data.Vs[index1] + data.Vs[index2])/ 3.};
   buildMetric(gf, pa, metric);
-  circumCenterMetric(worst->tri(), metric, Us, Vs, center, r2);
+  circumCenterMetric(worst->tri(), metric, data, center, r2);
   // compute the middle point of the edge
   int ip1 = active_edge - 1 < 0 ? 2 : active_edge - 1;
   int ip2 = active_edge;
 
-  double P[2] =  {Us[base->getVertex(ip1)->getIndex()],
-		  Vs[base->getVertex(ip1)->getIndex()]};
-  double Q[2] =  {Us[base->getVertex(ip2)->getIndex()],
-		  Vs[base->getVertex(ip2)->getIndex()]};
+  index0 = data.getIndex(base->getVertex(ip1));
+  index1 = data.getIndex(base->getVertex(ip2));
+  double P[2] =  {data.Us[index0],data.Vs[index0]};
+  double Q[2] =  {data.Us[index1],data.Vs[index1]};
   double midpoint[2] = {0.5 * (P[0] + Q[0]), 0.5 * (P[1] + Q[1])};
 
   // now we have the edge center and the center of the circumcircle,
@@ -1095,12 +1051,8 @@ double optimalPointFrontal (GFace *gf,
 			    2 * dir[1] * dir[0] * metric[1] +
 			    dir[1] * dir[1] * metric[2]);
 
-  const double rhoM1 = 0.5*
-    (vSizes[base->getVertex(ip1)->getIndex()] +
-     vSizes[base->getVertex(ip2)->getIndex()] ) ;// * RATIO;
-  const double rhoM2 = 0.5*
-    (vSizesBGM[base->getVertex(ip1)->getIndex()] +
-     vSizesBGM[base->getVertex(ip2)->getIndex()] ) ;// * RATIO;
+  const double rhoM1 = 0.5* (data.vSizes[index0] +data.vSizes[index1] ) ;// * RATIO;
+  const double rhoM2 = 0.5* (data.vSizesBGM[index0] +data.vSizesBGM[index1] ) ;// * RATIO;
   const double rhoM  = Extend1dMeshIn2dSurfaces() ? std::min(rhoM1,rhoM2) : rhoM2;
   const double rhoM_hat = rhoM;
 
@@ -1143,16 +1095,12 @@ double optimalPointFrontal (GFace *gf,
 void optimalPointFrontalB (GFace *gf,
 			   MTri3* worst,
 			   int active_edge,
-			   std::vector<double> &Us,
-			   std::vector<double> &Vs,
-			   std::vector<double> &vSizes,
-			   std::vector<double> &vSizesBGM,
+			   bidimMeshData & data,
 			   double newPoint[2],
 			   double metric[3])
 {
   // as a starting point, let us use the "fast algo"
-  double d = optimalPointFrontal (gf,worst,active_edge,Us,Vs,vSizes,
-                                  vSizesBGM,newPoint,metric);
+  double d = optimalPointFrontal (gf,worst,active_edge,data,newPoint,metric);
   int ip1 = active_edge - 1 < 0 ? 2 : active_edge - 1;
   int ip2 = active_edge;
   MVertex *v1 = worst->tri()->getVertex(ip1);
@@ -1204,14 +1152,12 @@ void bowyerWatsonFrontal(GFace *gf)
 {
   std::set<MTri3*,compareTri3Ptr> AllTris;
   std::set<MTri3*,compareTri3Ptr> ActiveTris;
-  std::vector<double> vSizes, vSizesBGM, Us, Vs;
-  std::vector<SMetric3> vMetricsBGM;
+  bidimMeshData DATA;
 
-  buildMeshGenerationDataStructures
-    (gf, AllTris, vSizes, vSizesBGM, vMetricsBGM,Us, Vs);
+  buildMeshGenerationDataStructures(gf, AllTris, DATA);
 
   // delaunise the initial mesh
-  int nbSwaps = edgeSwapPass(gf, AllTris, SWCR_DEL, Us, Vs, vSizes, vSizesBGM);
+  int nbSwaps = edgeSwapPass(gf, AllTris, SWCR_DEL, DATA);
   Msg::Debug("Delaunization of the initial mesh done (%d swaps)", nbSwaps);
 
   int ITER = 0, active_edge;
@@ -1230,9 +1176,9 @@ void bowyerWatsonFrontal(GFace *gf)
     if(ITERATION % 10== 0 && CTX::instance()->mesh.saveAll){
       char name[245];
       sprintf(name,"delFrontal_GFace_%d_Layer_%d.pos",gf->tag(),ITERATION);
-      _printTris (name, AllTris.begin(), AllTris.end(), Us,Vs,true);
+      _printTris (name, AllTris.begin(), AllTris.end(), DATA,true);
       sprintf(name,"delFrontal_GFace_%d_Layer_%d_Active.pos",gf->tag(),ITERATION);
-      _printTris (name, ActiveTris.begin(), ActiveTris.end(), Us,Vs,true);
+      _printTris (name, ActiveTris.begin(), ActiveTris.end(), DATA,true);
     }
     /* if(ITER % 100== 0){
           char name[245];
@@ -1254,9 +1200,8 @@ void bowyerWatsonFrontal(GFace *gf)
                    gf->mesh_vertices.size(), worst->getRadius());
       double newPoint[2], metric[3];
       //optimalPointFrontal (gf,worst,active_edge,Us,Vs,vSizes,vSizesBGM,newPoint,metric);
-      optimalPointFrontalB (gf,worst,active_edge,Us,Vs,vSizes,vSizesBGM,newPoint,metric);
-      insertAPoint(gf, AllTris.end(), newPoint, metric, Us, Vs, vSizes,
-                   vSizesBGM, vMetricsBGM, AllTris, &ActiveTris, worst);
+      optimalPointFrontalB (gf,worst,active_edge,DATA,newPoint,metric);
+      insertAPoint(gf, AllTris.end(), newPoint, metric, DATA, AllTris, &ActiveTris, worst);
     }
 
     /*   if(ITER % 1== 0){
@@ -1272,7 +1217,7 @@ void bowyerWatsonFrontal(GFace *gf)
   // _printTris (name, AllTris, Us, Vs,false);
   // sprintf(name,"frontal%d-param.pos", gf->tag());
   // _printTris (name, AllTris, Us, Vs,true);
-  transferDataStructure(gf, AllTris, Us, Vs);
+  transferDataStructure(gf, AllTris, DATA);
   // in case of boundary layer meshing
 #if defined(HAVE_ANN)
   {
@@ -1290,10 +1235,7 @@ void bowyerWatsonFrontal(GFace *gf)
 void optimalPointFrontalQuad (GFace *gf,
 			      MTri3* worst,
 			      int active_edge,
-			      std::vector<double> &Us,
-			      std::vector<double> &Vs,
-			      std::vector<double> &vSizes,
-			      std::vector<double> &vSizesBGM,
+			      bidimMeshData &data,
 			      double newPoint[2],
 			      double metric[3])
 {
@@ -1302,18 +1244,19 @@ void optimalPointFrontalQuad (GFace *gf,
   int ip2 = active_edge;
   int ip3 = (active_edge+1)%3;
 
-  double P[2] =  {Us[base->getVertex(ip1)->getIndex()],
-		  Vs[base->getVertex(ip1)->getIndex()]};
-  double Q[2] =  {Us[base->getVertex(ip2)->getIndex()],
-		  Vs[base->getVertex(ip2)->getIndex()]};
-  double O[2] =  {Us[base->getVertex(ip3)->getIndex()],
-		  Vs[base->getVertex(ip3)->getIndex()]};
+  int index1 = data.getIndex(base->getVertex(ip1));
+  int index2 = data.getIndex(base->getVertex(ip2));
+  int index3 = data.getIndex(base->getVertex(ip3));
+
+  double P[2] =  {data.Us[index1],data.Vs[index1]};
+  double Q[2] =  {data.Us[index2],data.Vs[index2]};
+  double O[2] =  {data.Us[index3],data.Vs[index3]};
   double midpoint[2] = {0.5 * (P[0] + Q[0]), 0.5 * (P[1] + Q[1])};
 
   // compute background mesh data
   double quadAngle  = backgroundMesh::current()->getAngle (midpoint[0],midpoint[1],0);
   double center[2];
-  circumCenterInfinite (base, quadAngle,Us,Vs,center);
+  circumCenterInfinite (base, quadAngle,data,center);
 
   // rotate the points with respect to the angle
   double XP1 = 0.5*(Q[0] - P[0]);
@@ -1334,12 +1277,9 @@ void optimalPointFrontalQuad (GFace *gf,
 
   const double p = 0.5 * lengthInfniteNorm(P, Q, quadAngle);
   const double q = lengthInfniteNorm(center, midpoint, quadAngle);
-  const double rhoM1 = 0.5 * RATIO *
-    (vSizes[base->getVertex(ip1)->getIndex()] +
-     vSizes[base->getVertex(ip2)->getIndex()] ) / sqrt(3.);// * RATIO;
-  const double rhoM2 = 0.5 * RATIO *
-    (vSizesBGM[base->getVertex(ip1)->getIndex()] +
-     vSizesBGM[base->getVertex(ip2)->getIndex()] ) / sqrt(3.);// * RATIO;
+
+  const double rhoM1 = 0.5*RATIO* (data.vSizes[index1] +data.vSizes[index2] ) / sqrt(3.);
+  const double rhoM2 = 0.5*RATIO* (data.vSizesBGM[index1] +data.vSizesBGM[index2] ) / sqrt(3.);
   const double rhoM  = Extend1dMeshIn2dSurfaces() ? std::min(rhoM1, rhoM2) : rhoM2;
 
   const double rhoM_hat = std::min(std::max(rhoM, p), (p * p + q * q) / (2 * q));
@@ -1373,133 +1313,12 @@ void optimalPointFrontalQuad (GFace *gf,
 void optimalPointFrontalQuadB (GFace *gf,
 			       MTri3* worst,
 			       int active_edge,
-			       std::vector<double> &Us,
-			       std::vector<double> &Vs,
-			       std::vector<double> &vSizes,
-			       std::vector<double> &vSizesBGM,
+			       bidimMeshData &data,
 			       double newPoint[2],
 			       double metric[3])
 {
-  optimalPointFrontalQuad (gf,worst,active_edge,Us,Vs,vSizes,vSizesBGM,newPoint,metric);
+  optimalPointFrontalQuad (gf,worst,active_edge,data,newPoint,metric);
   return;
-  MTriangle *base = worst->tri();
-
-  int ip1 = active_edge - 1 < 0 ? 2 : active_edge - 1;
-  int ip2 = active_edge;
-  int ip3 = (active_edge+1)%3;
-
-  double P[2] =  {Us[base->getVertex(ip1)->getIndex()],
-		  Vs[base->getVertex(ip1)->getIndex()]};
-  double Q[2] =  {Us[base->getVertex(ip2)->getIndex()],
-		  Vs[base->getVertex(ip2)->getIndex()]};
-  double midpoint[2] = {0.5 * (P[0] + Q[0]), 0.5 * (P[1] + Q[1])};
-
-  // compute background mesh data
-    double quadAngle  = backgroundMesh::current()->getAngle (midpoint[0],midpoint[1],0);
-    // double quadAngle  = 0;
-  double center[2];
-  circumCenterInfinite (base, quadAngle,Us,Vs,center);
-
-  // rotate the points with respect to the angle
-  double XP1 = 0.5*(Q[0] - P[0]);
-  double YP1 = 0.5*(Q[1] - P[1]);
-  double xp =  XP1 * cos(quadAngle) + YP1 * sin(quadAngle);
-  double yp = -XP1 * sin(quadAngle) + YP1 * cos(quadAngle);
-
-  double t = 0.0;
-  double factor;
-
-  /*
-    consider a straight edge going from -x,-y to point x,y
-    the distance in infinity norm between the two points is 2x
-    if |x| > |y|
-
-    the point Q (-x,2x-y) is in infinity norm at equal distance
-    2x from the 2 points
-
-    The orthogonal projection of Q onto the line can be found as
-    P = t (x,y) , t \in R
-    (Q - P) . (x,y)  = 0 --> (-x-tx,2x-y-ty) . (x,y) = 0 --> -x^2 -tx^2 + 2xy - y^2 -t y^2 = 0
-    --> t (x^2 + y^2) = -x^2 + 2xy - y^2 --> t = - (x-y)^2 / (x^2 + y^2) = -1 + 2 xy /(x^2+y^2)
-
-    The L2 distance between Q and the line is
-
-     h^2 = (-x - tx)^2 + (2x-y-ty)^2 =  x^2 (1+t)^2 +
-
-
-   */
-
-  if (fabs(xp)>=fabs(yp)){
-    t = -1. + 2*fabs(xp*yp)/(xp*xp + yp*yp);
-    factor = fabs(xp) / sqrt(xp*xp+yp*yp);
-  }
-  else {
-    t =  1. - 2*fabs(xp*yp)/(xp*xp + yp*yp);
-    factor = fabs(yp) / sqrt(xp*xp+yp*yp);
-  }
-
-  SVector3 P3(base->getVertex(ip1)->x(),base->getVertex(ip1)->y(),base->getVertex(ip1)->z());
-  SVector3 Q3(base->getVertex(ip2)->x(),base->getVertex(ip2)->y(),base->getVertex(ip2)->z());
-  SVector3 O3(base->getVertex(ip3)->x(),base->getVertex(ip3)->y(),base->getVertex(ip3)->z());
-  SVector3 PMID = P3*(1.-t)*.5 + Q3*(t+1.)*.5;
-  SVector3 N = crossprod (O3-P3,Q3-P3);
-  SVector3 T = Q3-P3;
-  double sizeEdge = T.norm();
-  N.normalize();
-  T.normalize();
-  SVector3 N2 = crossprod (T,N);
-  N2.normalize();
-  if (dot (N2,O3-PMID) < 0) N2 = N2*(-1.0);
-
-  const double rhoM1 = 0.5 *
-    (vSizes[base->getVertex(ip1)->getIndex()] +
-     vSizes[base->getVertex(ip2)->getIndex()] ) ;// * RATIO;
-  const double rhoM2 = 0.5 *
-    (vSizesBGM[base->getVertex(ip1)->getIndex()] +
-     vSizesBGM[base->getVertex(ip2)->getIndex()] ) ;// * RATIO;
-  const double a  = Extend1dMeshIn2dSurfaces() ? std::min(rhoM1, rhoM2) : rhoM2;
-
-  double d = (a+sizeEdge*factor)*factor*.5;
-  if (gf->geomType() == GEntity::CompoundSurface){
-    GFaceCompound *gfc = dynamic_cast<GFaceCompound*> (gf);
-    if (gfc){
-      GPoint gp = gfc->intersectionWithCircle(N2,N,PMID,d,newPoint);
-      if (gp.succeeded()){
-	newPoint[0] = gp.u();
-	newPoint[1] = gp.v();
-	buildMetric(gf, newPoint, metric);
-	return ;
-      }
-       else {
-       	gp = gfc->intersectionWithCircle(N2*(-1.0),N,PMID,d,newPoint);
-       	if (gp.succeeded()){
-       	  Msg::Warning("--- HEY HEY -----------");
-       	  newPoint[0] = gp.u();
-       	  newPoint[1] = gp.v();
-       	  buildMetric(gf, newPoint, metric);
-       	  return ;
-       	}
-      else {
-	Msg::Warning("--- NEVER GO THERE -----------");
-      }
-            }
-    }
-  }
-  double uvt[3] = {newPoint[0],newPoint[1],0.0};
-  curveFunctorCircle cc (N2,N,PMID,d);
-  surfaceFunctorGFace ss (gf);
-
-  if (intersectCurveSurface (cc,ss,uvt,d*1.e-8)){
-    //    printf("%g %g vs %g %g\n", newPoint[0], newPoint[1],uvt[0],uvt[1]);
-    newPoint[0] = uvt[0];
-    newPoint[1] = uvt[1];
-  }
-  else {
-    newPoint[0] = -10000;
-    newPoint[1] = 100000;
-    Msg::Warning("--- Non optimal point found -----------");
-  }
-  //  buildMetric(gf, newPoint, metric);
 }
 
 void buildBackGroundMesh (GFace *gf)
@@ -1554,8 +1373,7 @@ void bowyerWatsonFrontalLayers(GFace *gf, bool quad)
 
   std::set<MTri3*,compareTri3Ptr> AllTris;
   std::set<MTri3*,compareTri3Ptr> ActiveTris;
-  std::vector<double> vSizes, vSizesBGM, Us, Vs;
-  std::vector<SMetric3> vMetricsBGM;
+  bidimMeshData DATA;
 
   if (quad){
     LIMIT_ = sqrt(2.) * .99;
@@ -1563,11 +1381,10 @@ void bowyerWatsonFrontalLayers(GFace *gf, bool quad)
     MTri3::radiusNorm =-1;
   }
 
-  buildMeshGenerationDataStructures
-    (gf, AllTris, vSizes, vSizesBGM, vMetricsBGM,Us, Vs);
+  buildMeshGenerationDataStructures (gf, AllTris, DATA);
 
   // delaunise the initial mesh
-  int nbSwaps = edgeSwapPass(gf, AllTris, SWCR_DEL, Us, Vs, vSizes, vSizesBGM);
+  int nbSwaps = edgeSwapPass(gf, AllTris, SWCR_DEL, DATA);
   Msg::Debug("Delaunization of the initial mesh done (%d swaps)", nbSwaps);
 
   int ITER = 0, active_edge;
@@ -1590,9 +1407,9 @@ void bowyerWatsonFrontalLayers(GFace *gf, bool quad)
     if(ITERATION % 1== 0 && CTX::instance()->mesh.saveAll){
       char name[245];
       sprintf(name,"delInfinite_GFace_%d_Layer_%d.pos",gf->tag(),ITERATION);
-      _printTris (name, AllTris.begin(), AllTris.end(), Us,Vs,true);
+      _printTris (name, AllTris.begin(), AllTris.end(), DATA,true);
       sprintf(name,"delInfinite_GFace_%d_Layer_%d_Active.pos",gf->tag(),ITERATION);
-      _printTris (name, ActiveTris.begin(),  ActiveTris.end(),Us,Vs,true);
+      _printTris (name, ActiveTris.begin(),  ActiveTris.end(),DATA,true);
     }
 
     std::set<MTri3*,compareTri3Ptr> ActiveTrisNotInFront;
@@ -1624,18 +1441,15 @@ void bowyerWatsonFrontalLayers(GFace *gf, bool quad)
         //           "front size %6d", vSizes.size(), worst->getRadius(),_front.size());
 	if(ITER++ % 5000 == 0)
 	  Msg::Debug("%7d points created -- Worst tri infinite radius is %8.3f -- "
-                     "front size %6d", vSizes.size(), worst->getRadius(),_front.size());
+                     "front size %6d", DATA.vSizes.size(), worst->getRadius(),_front.size());
 
 	// compute the middle point of the edge
 	double newPoint[2],metric[3]={1,0,1};
-	if (quad) optimalPointFrontalQuadB (gf,worst,active_edge,Us,Vs,vSizes,
-                                            vSizesBGM,newPoint,metric);
-	else optimalPointFrontalB (gf,worst,active_edge,Us,Vs,vSizes,
-                                   vSizesBGM,newPoint,metric);
+	if (quad) optimalPointFrontalQuadB (gf,worst,active_edge,DATA,newPoint,metric);
+	else optimalPointFrontalB (gf,worst,active_edge,DATA,newPoint,metric);
 
 	//	printf("start INSERT A POINT %g %g \n",newPoint[0],newPoint[1]);
-	insertAPoint(gf, AllTris.end(), newPoint, 0, Us, Vs, vSizes,
-		     vSizesBGM, vMetricsBGM, AllTris, &ActiveTris, worst);
+	insertAPoint(gf, AllTris.end(), newPoint, 0, DATA, AllTris, &ActiveTris, worst);
 	//  else if (!worst->isDeleted() && worst->getRadius() > LIMIT_){
 	//    ActiveTrisNotInFront.insert(worst);
 	//  }
@@ -1673,7 +1487,7 @@ void bowyerWatsonFrontalLayers(GFace *gf, bool quad)
   // _printTris (name, AllTris, Us, Vs,false);
   // sprintf(name,"frontal%d-param.pos", gf->tag());
   // _printTris (name, AllTris, Us, Vs,true);
-  transferDataStructure(gf, AllTris, Us, Vs);
+  transferDataStructure(gf, AllTris, DATA);
   MTri3::radiusNorm = 2;
   LIMIT_ = 0.5 * sqrt(2.0) * 1;
   backgroundMesh::unset();
@@ -1682,8 +1496,7 @@ void bowyerWatsonFrontalLayers(GFace *gf, bool quad)
 void bowyerWatsonParallelograms(GFace *gf)
 {
   std::set<MTri3*,compareTri3Ptr> AllTris;
-  std::vector<double> vSizes, vSizesBGM, Us, Vs;
-  std::vector<SMetric3> vMetricsBGM;
+  bidimMeshData DATA;
   std::vector<MVertex*> packed;
   std::vector<SMetric3> metrics;
 
@@ -1691,18 +1504,15 @@ void bowyerWatsonParallelograms(GFace *gf)
   packingOfParallelograms(gf, packed, metrics);
   //  printf("points created\n");
 
-  buildMeshGenerationDataStructures
-    (gf, AllTris, vSizes, vSizesBGM, vMetricsBGM,Us, Vs);
+  buildMeshGenerationDataStructures (gf, AllTris, DATA);
 
   // delaunise the initial mesh
-  int nbSwaps = edgeSwapPass(gf, AllTris, SWCR_DEL, Us, Vs, vSizes, vSizesBGM);
+  int nbSwaps = edgeSwapPass(gf, AllTris, SWCR_DEL, DATA);
   Msg::Debug("Delaunization of the initial mesh done (%d swaps)", nbSwaps);
 
-  //  printf("CARNAVAL !!!\n");
-
   std::sort(packed.begin(), packed.end(), MVertexLessThanLexicographic());
 
-  printf("staring to insert points\n");
+  //  printf("staring to insert points\n");
   N_GLOBAL_SEARCH = 0;
   N_SEARCH = 0;
   DT_INSERT_VERTEX = 0;
@@ -1721,17 +1531,16 @@ void bowyerWatsonParallelograms(GFace *gf)
       packed[i]->getParameter(1,newPoint[1]);
       delete packed[i];
       double metric[3];
-      buildMetric(gf, newPoint, metric);
-      SMetric3 ANIZO_MESH = metrics[i];
+      buildMetric(gf, newPoint, metrics[i], metric);
+	    //buildMetric(gf, newPoint, metric);
 
-      bool success = insertAPoint( gf, AllTris.begin(), newPoint, metric, Us, Vs, vSizes,
-				  vSizesBGM, vMetricsBGM, AllTris, 0, oneNewTriangle, &oneNewTriangle);
+      bool success = insertAPoint( gf, AllTris.begin(), newPoint, metric, DATA , AllTris, 0, oneNewTriangle, &oneNewTriangle);
       if (!success) oneNewTriangle = 0;
 	//      if (!success)printf("success %d %d\n",success,AllTris.size());
       i++;
     }
 
-    if(1.0* AllTris.size() > 2.5 * vSizes.size()){
+    if(1.0* AllTris.size() > 2.5 * DATA.vSizes.size()){
       //      int n1 = AllTris.size();
       std::set<MTri3*,compareTri3Ptr>::iterator itd = AllTris.begin();
       while(itd != AllTris.end()){
@@ -1747,10 +1556,10 @@ void bowyerWatsonParallelograms(GFace *gf)
 
 
   }
-  printf("%d vertices \n", (int)packed.size());
-  // double t2 = Cpu();
-  //double DT = (t2-t1);
+  //  printf("%d vertices \n",(int)packed.size());
+  //clock_t t2 = clock();
+  //double DT = (double)(t2-t1)/CLOCKS_PER_SEC;
   //if (packed.size())printf("points inserted DT %12.5E points per minut : %12.5E %d global searchs %d seachs per insertion\n",DT,60.*packed.size()/DT,N_GLOBAL_SEARCH,N_SEARCH / packed.size());
-  transferDataStructure(gf, AllTris, Us, Vs);
+  transferDataStructure(gf, AllTris, DATA);
   backgroundMesh::unset();
 }
diff --git a/Mesh/meshGFaceDelaunayInsertion.h b/Mesh/meshGFaceDelaunayInsertion.h
index 19ddefc7fd7267ffa31799d3e412915de74850db..5c8a4663e7260abf50bbd78ddb46fee96e2c6ed9 100644
--- a/Mesh/meshGFaceDelaunayInsertion.h
+++ b/Mesh/meshGFaceDelaunayInsertion.h
@@ -9,6 +9,7 @@
 #include "MTriangle.h"
 #include "MQuadrangle.h"
 #include "STensor3.h"
+#include "GEntity.h"
 #include <list>
 #include <set>
 #include <map>
@@ -18,23 +19,38 @@ class GFace;
 class BDS_Mesh;
 class BDS_Point;
 
+struct bidimMeshData 
+{
+  std::map<MVertex*,int> indices;
+  std::vector<double> Us, Vs, vSizes, vSizesBGM;
+  std::vector<SMetric3> vMetricsBGM;
+  inline void addVertex (MVertex* mv, double u, double v, double size, double sizeBGM){
+    int index = Us.size();
+    if (mv->onWhat()->dim() == 2)mv->setIndex(index);
+    else indices[mv] = index;
+    Us.push_back(u);
+    Vs.push_back(v);
+    vSizes.push_back(size);
+    vSizesBGM.push_back(sizeBGM);
+  }
+  inline int getIndex (MVertex *mv) {
+    if (mv->onWhat()->dim() == 2)return mv->getIndex();
+    return indices[mv];
+  }
+};
+
+
 void buildMetric(GFace *gf, double *uv, double *metric);
 int inCircumCircleAniso(GFace *gf, double *p1, double *p2, double *p3, 
                         double *p4, double *metric);
 int inCircumCircleAniso(GFace *gf, MTriangle *base, const double *uv, 
-                        const double *metric, const std::vector<double> &Us,
-                        const std::vector<double> &Vs);
+                        const double *metric, bidimMeshData & data);
 void circumCenterMetric(double *pa, double *pb, double *pc, const double *metric,
                         double *x, double &Radius2);
-void circumCenterMetric(MTriangle *base, const double *metric,
-                        const std::vector<double> &Us, 
-                        const std::vector<double> &Vs,
+void circumCenterMetric(MTriangle *base, const double *metric, bidimMeshData & data,
                         double *x, double &Radius2);
-bool circumCenterMetricInTriangle(MTriangle *base, const double *metric,
-                                  const std::vector<double> &Us,
-                                  const std::vector<double> &Vs);
-bool invMapUV(MTriangle *t, double *p,
-              const std::vector<double> &Us, const std::vector<double> &Vs,
+bool circumCenterMetricInTriangle(MTriangle *base, const double *metric, bidimMeshData &data);
+bool invMapUV(MTriangle *t, double *p, bidimMeshData &data,
               double *uv, double tol);
 
 class MTri3
@@ -51,7 +67,7 @@ class MTri3
   void forceRadius(double r) { circum_radius = r; }
   inline double getRadius() const { return circum_radius; }
 
-  MTri3(MTriangle *t, double lc, SMetric3 *m = 0, const std::vector<double> *Us = 0, const std::vector<double> *Vs = 0, GFace *gf = 0);
+  MTri3(MTriangle *t, double lc, SMetric3 *m = 0, bidimMeshData * data = 0, GFace *gf = 0);
   inline MTriangle *tri() const { return base; }
   inline void  setNeigh(int iN , MTri3 *n) { neigh[iN] = n; }
   inline MTri3 *getNeigh(int iN ) const { return neigh[iN]; }
diff --git a/Mesh/meshGFaceOptimize.cpp b/Mesh/meshGFaceOptimize.cpp
index 521860834c81e4b50b94d195c97c8afc246f0518..b3b0e9008b98fcc7fdb20bd44d03da09b99f181e 100644
--- a/Mesh/meshGFaceOptimize.cpp
+++ b/Mesh/meshGFaceOptimize.cpp
@@ -138,11 +138,7 @@ static void setLcs(MTriangle *t, std::map<MVertex*, double> &vSizes)
 
 void buildMeshGenerationDataStructures(GFace *gf,
                                        std::set<MTri3*, compareTri3Ptr> &AllTris,
-                                       std::vector<double> &vSizes,
-                                       std::vector<double> &vSizesBGM,
-                                       std::vector<SMetric3> &vMetricsBGM,
-                                       std::vector<double> &Us,
-                                       std::vector<double> &Vs)
+				       bidimMeshData & data)
 {
   std::map<MVertex*, double> vSizesMap;
   std::list<GEdge*> edges = gf->edges();
@@ -164,33 +160,34 @@ void buildMeshGenerationDataStructures(GFace *gf,
     }
   }
 
-  int NUM = 0;
+  //  int NUM = 0;
   for(std::map<MVertex*, double>::iterator it = vSizesMap.begin();
        it != vSizesMap.end(); ++it){
     // FIXME: this vertex-stored indexing makes the optimization
     // routines not thread-safe (we cannot concurrently optimize two
-    // surfaces that share an edge)
-    it->first->setIndex(NUM++);
-    vSizes.push_back(it->second);
-    vSizesBGM.push_back(it->second);
-    vMetricsBGM.push_back(SMetric3(it->second));
+    // surfaces that share an edge)    
+    //    it->first->setIndex(NUM++);
+    // OK, I can fix that 
+    //    vSizes.push_back(it->second);
+    //    vSizesBGM.push_back(it->second);
+    //    vMetricsBGM.push_back(SMetric3(it->second));
     SPoint2 param;
     reparamMeshVertexOnFace(it->first, gf, param);
-    Us.push_back(param[0]);
-    Vs.push_back(param[1]);
+    //    Us.push_back(param[0]);
+    //    Vs.push_back(param[1]);
+    data.addVertex (it->first, param[0], param[1], it->second, it->second); 
   }
   for(unsigned int i = 0; i < gf->triangles.size(); i++){
-    double lc = 0.3333333333 * (vSizes[gf->triangles[i]->getVertex(0)->getIndex()] +
-                                vSizes[gf->triangles[i]->getVertex(1)->getIndex()] +
-                                vSizes[gf->triangles[i]->getVertex(2)->getIndex()]);
-    AllTris.insert(new MTri3(gf->triangles[i], lc, 0, &Us, &Vs, gf));
+    double lc = 0.3333333333 * (data.vSizes[data.getIndex(gf->triangles[i]->getVertex(0))] +
+                                data.vSizes[data.getIndex(gf->triangles[i]->getVertex(1))] +
+                                data.vSizes[data.getIndex(gf->triangles[i]->getVertex(2))]);
+    AllTris.insert(new MTri3(gf->triangles[i], lc, 0, &data, gf));
   }
   gf->triangles.clear();
   connectTriangles(AllTris);
 }
 
-void transferDataStructure(GFace *gf, std::set<MTri3*, compareTri3Ptr> &AllTris,
-                           std::vector<double> &Us, std::vector<double> &Vs)
+void transferDataStructure(GFace *gf, std::set<MTri3*, compareTri3Ptr> &AllTris,bidimMeshData & data)
 {
   while (1) {
     if(AllTris.begin() == AllTris.end()) break;
@@ -211,15 +208,21 @@ void transferDataStructure(GFace *gf, std::set<MTri3*, compareTri3Ptr> &AllTris,
     double n1[3], n2[3];
     MTriangle *t = gf->triangles[0];
     MVertex *v0 = t->getVertex(0), *v1 = t->getVertex(1), *v2 = t->getVertex(2);
-    normal3points(Us[v0->getIndex()], Vs[v0->getIndex()], 0.,
-                  Us[v1->getIndex()], Vs[v1->getIndex()], 0.,
-                  Us[v2->getIndex()], Vs[v2->getIndex()], 0., n1);
+    int index0 = data.getIndex (v0);
+    int index1 = data.getIndex (v1);
+    int index2 = data.getIndex (v2);
+    normal3points(data.Us[index0], data.Vs[index0], 0.,
+                  data.Us[index1], data.Vs[index1], 0.,
+                  data.Us[index2], data.Vs[index2], 0., n1);
     for(unsigned int j = 1; j < gf->triangles.size(); j++){
       t = gf->triangles[j];
       v0 = t->getVertex(0); v1 = t->getVertex(1); v2 = t->getVertex(2);
-      normal3points(Us[v0->getIndex()], Vs[v0->getIndex()], 0.,
-                    Us[v1->getIndex()], Vs[v1->getIndex()], 0.,
-                    Us[v2->getIndex()], Vs[v2->getIndex()], 0., n2);
+      index0 = data.getIndex (v0);
+      index1 = data.getIndex (v1);
+      index2 = data.getIndex (v2);
+      normal3points(data.Us[index0], data.Vs[index0], 0.,
+		    data.Us[index1], data.Vs[index1], 0.,
+		    data.Us[index2], data.Vs[index2], 0., n2);
       double pp; prosca(n1, n2, &pp);
       if(pp < 0) t->revert();
     }
@@ -318,14 +321,15 @@ double surfaceFaceUV(MElement *t,GFace *gf, bool *concave = 0)
   }
 }
 
-double surfaceTriangleUV(MVertex *v1, MVertex *v2, MVertex *v3,
-                         const std::vector<double> &Us,
-                         const std::vector<double> &Vs)
+double surfaceTriangleUV(MVertex *v1, MVertex *v2, MVertex *v3,bidimMeshData & data)
 {
-  const double v12[2] = {Us[v2->getIndex()] - Us[v1->getIndex()],
-                         Vs[v2->getIndex()] - Vs[v1->getIndex()]};
-  const double v13[2] = {Us[v3->getIndex()] - Us[v1->getIndex()],
-                         Vs[v3->getIndex()] - Vs[v1->getIndex()]};
+  int index1 = data.getIndex(v1);
+  int index2 = data.getIndex(v2);
+  int index3 = data.getIndex(v3);
+  const double v12[2] = {data.Us[index2] - data.Us[index1],
+                         data.Vs[index2] - data.Vs[index1]};
+  const double v13[2] = {data.Us[index3] - data.Us[index1],
+                         data.Vs[index3] - data.Vs[index1]};
   return 0.5 * fabs (v12[0] * v13[1] - v12[1] * v13[0]);
 }
 
@@ -1793,6 +1797,7 @@ struct p1p2p3 {
 #if defined(HAVE_BFGS)
 // Callback function for BFGS
 
+/*
 static void sort_edges (std::vector<MEdge> &eds){
 
   std::list<MEdge> eds_sorted;
@@ -1823,8 +1828,8 @@ static void sort_edges (std::vector<MEdge> &eds){
   }
   eds.insert(eds.begin(),eds_sorted.begin(),eds_sorted.end());
 }
-
-static int OPTI_NUMBER = 1;
+*/
+//static int OPTI_NUMBER = 1;
 struct opti_data_vertex_relocation {
   int nv;
   const std::vector<MElement*> & e;
@@ -2539,9 +2544,7 @@ int postProcessExtraEdges (GFace *gf, std::vector<std::pair<MElement*,MElement*>
 }
 
 bool edgeSwap(std::set<swapquad> &configs, MTri3 *t1, GFace *gf, int iLocalEdge,
-              std::vector<MTri3*> &newTris, const swapCriterion &cr,
-              const std::vector<double> &Us, const std::vector<double> &Vs,
-              const std::vector<double> &vSizes, const std::vector<double> &vSizesBGM)
+              std::vector<MTri3*> &newTris, const swapCriterion &cr, bidimMeshData & data)
 {
   MTri3 *t2 = t1->getNeigh(iLocalEdge);
   if(!t2) return false;
@@ -2558,13 +2561,13 @@ bool edgeSwap(std::set<swapquad> &configs, MTri3 *t1, GFace *gf, int iLocalEdge,
   if(configs.find(sq) != configs.end()) return false;
   configs.insert(sq);
 
-  const double volumeRef = surfaceTriangleUV(v1, v2, v3, Us, Vs) +
-    surfaceTriangleUV(v1, v2, v4, Us, Vs);
+  const double volumeRef = surfaceTriangleUV(v1, v2, v3, data) +
+    surfaceTriangleUV(v1, v2, v4, data);
 
   MTriangle *t1b = new MTriangle(v2, v3, v4);
   MTriangle *t2b = new MTriangle(v4, v3, v1);
-  const double v1b = surfaceTriangleUV(v2, v3, v4, Us, Vs);
-  const double v2b = surfaceTriangleUV(v4, v3, v1, Us, Vs);
+  const double v1b = surfaceTriangleUV(v2, v3, v4, data);
+  const double v2b = surfaceTriangleUV(v4, v3, v1, data);
   const double volume = v1b + v2b;
   if(fabs(volume - volumeRef) > 1.e-10 * (volume + volumeRef) ||
       v1b < 1.e-8 * (volume + volumeRef) ||
@@ -2590,36 +2593,16 @@ bool edgeSwap(std::set<swapquad> &configs, MTri3 *t1, GFace *gf, int iLocalEdge,
     }
   case SWCR_DEL:
     {
-      double edgeCenter[2] ={(Us[v1->getIndex()] + Us[v2->getIndex()] + Us[v3->getIndex()] +
-                              Us[v4->getIndex()]) * .25,
-                             (Vs[v1->getIndex()] + Vs[v2->getIndex()] + Vs[v3->getIndex()] +
-                              Vs[v4->getIndex()]) * .25};
-      double uv4[2] ={Us[v4->getIndex()], Vs[v4->getIndex()]};
+      int index1 = data.getIndex(v1);
+      int index2 = data.getIndex(v2);
+      int index3 = data.getIndex(v3);
+      int index4 = data.getIndex(v4);
+      double edgeCenter[2] ={(data.Us[index1] + data.Us[index2] + data.Us[index3] + data.Us[index4]) * .25,
+                             (data.Vs[index1] + data.Vs[index2] + data.Vs[index3] + data.Vs[index4]) * .25};
+      double uv4[2] ={data.Us[index4], data.Vs[index4]};
       double metric[3];
       buildMetric(gf, edgeCenter, metric);
-      if(!inCircumCircleAniso(gf, t1->tri(), uv4, metric, Us, Vs)){
-        delete t1b;
-        delete t2b;
-        return false;
-      }
-    }
-    break;
-  case SWCR_CLOSE:
-    {
-      double avg1[3] = {(v1->x() + v2->x()) *.5,(v1->y() + v2->y()) *.5,
-                        (v1->z() + v2->z()) *.5};
-      double avg2[3] = {(v3->x() + v4->x()) *.5,(v3->y() + v4->y()) *.5,
-                        (v3->z() + v4->z()) *.5};
-
-      GPoint gp1 = gf->point(SPoint2((Us[v1->getIndex()] + Us[v2->getIndex()]) * .5,
-                                     (Vs[v1->getIndex()] + Vs[v2->getIndex()]) * .5));
-      GPoint gp2 = gf->point(SPoint2((Us[v3->getIndex()] + Us[v4->getIndex()]) * .5,
-                                     (Vs[v3->getIndex()] + Vs[v4->getIndex()]) * .5));
-      double d1 = (avg1[0] - gp1.x()) * (avg1[0] - gp1.x()) + (avg1[1] - gp1.y()) *
-        (avg1[1]-gp1.y()) + (avg1[2] - gp1.z()) * (avg1[2] - gp1.z());
-      double d2 = (avg2[0] - gp2.x()) * (avg2[0] - gp2.x()) + (avg2[1] - gp2.y()) *
-        (avg2[1] - gp2.y()) + (avg2[2] - gp2.z()) * (avg2[2] - gp2.z());
-      if(d1 < d2){
+      if(!inCircumCircleAniso(gf, t1->tri(), uv4, metric, data)){
         delete t1b;
         delete t2b;
         return false;
@@ -2650,22 +2633,25 @@ bool edgeSwap(std::set<swapquad> &configs, MTri3 *t1, GFace *gf, int iLocalEdge,
       if(!found)cavity.push_back(t2->getNeigh(i));
     }
   }
-  double lc1 = 0.3333333333 * (vSizes[t1b->getVertex(0)->getIndex()] +
-                               vSizes[t1b->getVertex(1)->getIndex()] +
-                               vSizes[t1b->getVertex(2)->getIndex()]);
-  double lcBGM1 = 0.3333333333 * (vSizesBGM[t1b->getVertex(0)->getIndex()] +
-                                  vSizesBGM[t1b->getVertex(1)->getIndex()] +
-                                  vSizesBGM[t1b->getVertex(2)->getIndex()]);
-  double lc2 = 0.3333333333 * (vSizes[t2b->getVertex(0)->getIndex()] +
-                               vSizes[t2b->getVertex(1)->getIndex()] +
-                               vSizes[t2b->getVertex(2)->getIndex()]);
-  double lcBGM2 = 0.3333333333 * (vSizesBGM[t2b->getVertex(0)->getIndex()] +
-                                  vSizesBGM[t2b->getVertex(1)->getIndex()] +
-                                  vSizesBGM[t2b->getVertex(2)->getIndex()]);
+
+  int i10 = data.getIndex(t1b->getVertex(0));
+  int i11 = data.getIndex(t1b->getVertex(1));
+  int i12 = data.getIndex(t1b->getVertex(2));
+
+  int i20 = data.getIndex(t2b->getVertex(0));
+  int i21 = data.getIndex(t2b->getVertex(1));
+  int i22 = data.getIndex(t2b->getVertex(2));
+  
+  double lc1 = 0.3333333333 * (data.vSizes[i10] + data.vSizes[i11] + data.vSizes[i12]);
+  double lcBGM1 = 0.3333333333 * (data.vSizesBGM[i10] + data.vSizesBGM[i11] + data.vSizesBGM[i12]);
+
+  double lc2 = 0.3333333333 * (data.vSizes[i20] + data.vSizes[i21] + data.vSizes[i22]);
+  double lcBGM2 = 0.3333333333 * (data.vSizesBGM[i20] + data.vSizesBGM[i21] + data.vSizesBGM[i22]);
+
   MTri3 *t1b3 = new MTri3(t1b, Extend1dMeshIn2dSurfaces() ?
-                          std::min(lc1, lcBGM1) : lcBGM1, 0, &Us, &Vs, gf);
+                          std::min(lc1, lcBGM1) : lcBGM1, 0, &data, gf);
   MTri3 *t2b3 = new MTri3(t2b, Extend1dMeshIn2dSurfaces() ?
-                          std::min(lc2, lcBGM2) : lcBGM2, 0, &Us, &Vs, gf);
+                          std::min(lc2, lcBGM2) : lcBGM2, 0, &data, gf);
 
   cavity.push_back(t1b3);
   cavity.push_back(t2b3);
@@ -2679,9 +2665,7 @@ bool edgeSwap(std::set<swapquad> &configs, MTri3 *t1, GFace *gf, int iLocalEdge,
 }
 
 int edgeSwapPass(GFace *gf, std::set<MTri3*, compareTri3Ptr> &allTris,
-                 const swapCriterion &cr,
-                 const std::vector<double> &Us, const std::vector<double> &Vs,
-                 const std::vector<double> &vSizes, const std::vector<double> &vSizesBGM)
+                 const swapCriterion &cr,bidimMeshData & data)
 {
   typedef std::set<MTri3*, compareTri3Ptr> CONTAINER;
 
@@ -2693,7 +2677,7 @@ int edgeSwapPass(GFace *gf, std::set<MTri3*, compareTri3Ptr> &allTris,
     for(CONTAINER::iterator it = allTris.begin(); it != allTris.end(); ++it){
       if(!(*it)->isDeleted()){
         for(int i = 0; i < 3; i++){
-          if(edgeSwap(configs, *it, gf, i, newTris, cr, Us, Vs, vSizes, vSizesBGM)){
+          if(edgeSwap(configs, *it, gf, i, newTris, cr, data)){
             nbSwap++;
             break;
           }
@@ -2714,30 +2698,6 @@ int edgeSwapPass(GFace *gf, std::set<MTri3*, compareTri3Ptr> &allTris,
   return nbSwapTot;
 }
 
-inline double computeEdgeAdimLength(MVertex *v1, MVertex *v2, GFace *f,
-                                    const std::vector<double> &Us,
-                                    const std::vector<double> &Vs,
-                                    const std::vector<double> &vSizes ,
-                                    const std::vector<double> &vSizesBGM)
-{
-  const double edgeCenter[2] ={(Us[v1->getIndex()] + Us[v2->getIndex()]) * .5,
-                               (Vs[v1->getIndex()] + Vs[v2->getIndex()]) * .5};
-  GPoint GP = f->point (edgeCenter[0], edgeCenter[1]);
-
-  const double dx1 = v1->x() - GP.x();
-  const double dy1 = v1->y() - GP.y();
-  const double dz1 = v1->z() - GP.z();
-  const double l1 = sqrt(dx1 * dx1 + dy1 * dy1 + dz1 * dz1);
-  const double dx2 = v2->x() - GP.x();
-  const double dy2 = v2->y() - GP.y();
-  const double dz2 = v2->z() - GP.z();
-  const double l2 = sqrt(dx2 * dx2 + dy2 * dy2 + dz2 * dz2);
-  if(Extend1dMeshIn2dSurfaces())
-    return 2 * (l1 + l2) / (std::min(vSizes[v1->getIndex()], vSizesBGM[v1->getIndex()]) +
-                            std::min(vSizes[v2->getIndex()], vSizesBGM[v2->getIndex()]));
-  return 2 * (l1 + l2) / (vSizesBGM[v1->getIndex()] + vSizesBGM[v2->getIndex()]);
-}
-
 
 void computeNeighboringTrisOfACavity(const std::vector<MTri3*> &cavity,
                                      std::vector<MTri3*> &outside)
diff --git a/Mesh/meshGFaceOptimize.h b/Mesh/meshGFaceOptimize.h
index b2ee28f00e0d1dd6bbe88b71b813e0580e9ef8f3..f5151ed17eedc189ec47ef1e9b4f3ef19442a831 100644
--- a/Mesh/meshGFaceOptimize.h
+++ b/Mesh/meshGFaceOptimize.h
@@ -13,10 +13,13 @@
 #include "meshGFaceDelaunayInsertion.h"
 #include "STensor3.h"
 
+
+
 class GFace;
 class GVertex;
 class MVertex;
 
+
 class edge_angle {
  public :
   MVertex *v1, *v2;
@@ -70,34 +73,12 @@ enum splitCriterion {SPCR_CLOSE, SPCR_QUAL, SPCR_ALLWAYS};
 
 int edgeSwapPass(GFace *gf, 
                  std::set<MTri3*, compareTri3Ptr> &allTris, 
-                 const swapCriterion &cr,
-                 const std::vector<double> &Us, 
-                 const std::vector<double> &Vs,
-                 const std::vector<double> &vSizes, 
-                 const std::vector<double> &vSizesBGM);
-/*int edgeSplitPass(double maxLC, GFace *gf, 
-                  std::set<MTri3*, compareTri3Ptr> &allTris,
-                  const splitCriterion &cr,   
-                  std::vector<double> &Us,
-                  std::vector<double> &Vs,
-                  std::vector<double> &vSizes ,
-                  std::vector<double> &vSizesBGM);
-int edgeCollapsePass(double minLC, GFace *gf, 
-                     std::set<MTri3*, compareTri3Ptr> &allTris,
-                     std::vector<double> &Us,
-                     std::vector<double> &Vs,
-                     std::vector<double> &vSizes ,
-                     std::vector<double> &vSizesBGM);*/
+                 const swapCriterion &cr, bidimMeshData &DATA);
 void removeFourTrianglesNodes(GFace *gf, bool replace_by_quads);
 void buildMeshGenerationDataStructures(GFace *gf, 
                                        std::set<MTri3*, compareTri3Ptr> &AllTris,
-                                       std::vector<double> &vSizes,
-                                       std::vector<double> &vSizesBGM,
-                                       std::vector<SMetric3> &vMetricsBGM,
-                                       std::vector<double> &Us,
-                                       std::vector<double> &Vs);
-void transferDataStructure(GFace *gf, std::set<MTri3*, compareTri3Ptr> &AllTris,
-                           std::vector<double> &Us, std::vector<double> &Vs);
+				       bidimMeshData & data);
+void transferDataStructure(GFace *gf, std::set<MTri3*, compareTri3Ptr> &AllTris,bidimMeshData &DATA);
 void recombineIntoQuads(GFace *gf, 
                         bool topologicalOpti   = true, 
                         bool nodeRepositioning = true);
diff --git a/Mesh/surfaceFiller.cpp b/Mesh/surfaceFiller.cpp
index 097588743a4e03129ee3cd92913c1658aa06d904..371ebc628c20ac4b97be44c2e8ada54da9c33b16 100644
--- a/Mesh/surfaceFiller.cpp
+++ b/Mesh/surfaceFiller.cpp
@@ -360,7 +360,10 @@ void packingOfParallelograms(GFace* gf,  std::vector<MVertex*> &packed, std::vec
       metrics.push_back(vertices[i]->_meshMetric);
       SPoint2 midpoint;
       reparamMeshVertexOnFace(vertices[i]->_v, gf, midpoint);
-      fprintf(f,"SP(%22.15E,%22.15E,%g){1};\n",vertices[i]->_v->x(),vertices[i]->_v->y(),vertices[i]->_v->z());
+      fprintf(f,"TP(%22.15E,%22.15E,%g){%22.15E,%22.15E,%22.15E,%22.15E,%22.15E,%22.15E,%22.15E,%22.15E,%22.15E};\n",vertices[i]->_v->x(),vertices[i]->_v->y(),vertices[i]->_v->z(),
+	      vertices[i]->_meshMetric(0,0),vertices[i]->_meshMetric(0,1),vertices[i]->_meshMetric(0,2),
+	      vertices[i]->_meshMetric(1,0),vertices[i]->_meshMetric(1,1),vertices[i]->_meshMetric(1,2),
+	      vertices[i]->_meshMetric(2,0),vertices[i]->_meshMetric(2,1),vertices[i]->_meshMetric(2,2));
 	    //fprintf(f,"SP(%22.15E,%22.15E,%g){1};\n",midpoint.x(),midpoint.y(),0.0);
     }
     delete  vertices[i];
diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp
index 1a14ae47b29444df38bb37645195011d3e4a73a8..781cc74d2632b46ae0a65114f15ecb1da388bbac 100644
--- a/Parser/Gmsh.tab.cpp
+++ b/Parser/Gmsh.tab.cpp
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
+/* A Bison parser, made by GNU Bison 2.6.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* Bison implementation for Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -45,7 +44,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.3"
+#define YYBISON_VERSION "2.6"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -59,8 +58,6 @@
 /* Pull parsers.  */
 #define YYPULL 1
 
-/* Using locations.  */
-#define YYLSP_NEEDED 0
 
 /* Substitute the variable and function names.  */
 #define yyparse         gmsh_yyparse
@@ -71,10 +68,9 @@
 #define yydebug         gmsh_yydebug
 #define yynerrs         gmsh_yynerrs
 
-
 /* Copy the first part of user declarations.  */
 
-/* Line 189 of yacc.c  */
+/* Line 336 of yacc.c  */
 #line 1 "Gmsh.y"
 
 // Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle
@@ -167,13 +163,16 @@ struct doubleXstring{
 
 
 
-/* Line 189 of yacc.c  */
-#line 172 "Gmsh.tab.cpp"
+/* Line 336 of yacc.c  */
+#line 168 "Gmsh.tab.cpp"
 
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
+# ifndef YY_NULL
+#  if defined __cplusplus && 201103L <= __cplusplus
+#   define YY_NULL nullptr
+#  else
+#   define YY_NULL 0
+#  endif
+# endif
 
 /* Enabling verbose error messages.  */
 #ifdef YYERROR_VERBOSE
@@ -183,11 +182,17 @@ struct doubleXstring{
 # define YYERROR_VERBOSE 0
 #endif
 
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
+/* In a future release of Bison, this section will be replaced
+   by #include "Gmsh.tab.hpp".  */
+#ifndef GMSH_YY_GMSH_TAB_HPP
+# define GMSH_YY_GMSH_TAB_HPP
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int gmsh_yydebug;
 #endif
-
 
 /* Tokens.  */
 #ifndef YYTOKENTYPE
@@ -338,12 +343,11 @@ struct doubleXstring{
 #endif
 
 
-
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
 {
 
-/* Line 214 of yacc.c  */
+/* Line 350 of yacc.c  */
 #line 92 "Gmsh.y"
 
   char *c;
@@ -356,20 +360,37 @@ typedef union YYSTYPE
 
 
 
-/* Line 214 of yacc.c  */
-#line 361 "Gmsh.tab.cpp"
+/* Line 350 of yacc.c  */
+#line 365 "Gmsh.tab.cpp"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
 #endif
 
+extern YYSTYPE gmsh_yylval;
+
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int gmsh_yyparse (void *YYPARSE_PARAM);
+#else
+int gmsh_yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int gmsh_yyparse (void);
+#else
+int gmsh_yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+#endif /* !GMSH_YY_GMSH_TAB_HPP  */
 
 /* Copy the second part of user declarations.  */
 
 
-/* Line 264 of yacc.c  */
-#line 373 "Gmsh.tab.cpp"
+/* Line 353 of yacc.c  */
+#line 394 "Gmsh.tab.cpp"
 
 #ifdef short
 # undef short
@@ -472,11 +493,12 @@ YYID (yyi)
 #    define alloca _alloca
 #   else
 #    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef _STDLIB_H
-#      define _STDLIB_H 1
+      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
+#     ifndef EXIT_SUCCESS
+#      define EXIT_SUCCESS 0
 #     endif
 #    endif
 #   endif
@@ -499,24 +521,24 @@ YYID (yyi)
 #  ifndef YYSTACK_ALLOC_MAXIMUM
 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 #  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
        && ! ((defined YYMALLOC || defined malloc) \
 	     && (defined YYFREE || defined free)))
 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#    define _STDLIB_H 1
+#   ifndef EXIT_SUCCESS
+#    define EXIT_SUCCESS 0
 #   endif
 #  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
-#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
@@ -545,23 +567,7 @@ union yyalloc
      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
       + YYSTACK_GAP_MAXIMUM)
 
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  YYSIZE_T yyi;				\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (YYID (0))
-#  endif
-# endif
+# define YYCOPY_NEEDED 1
 
 /* Relocate STACK from its old location to the new one.  The
    local variables YYSIZE and YYSTACKSIZE give the old and new number of
@@ -581,6 +587,26 @@ union yyalloc
 
 #endif
 
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(Dst, Src, Count) \
+      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+#  else
+#   define YYCOPY(Dst, Src, Count)              \
+      do                                        \
+        {                                       \
+          YYSIZE_T yyi;                         \
+          for (yyi = 0; yyi < (Count); yyi++)   \
+            (Dst)[yyi] = (Src)[yyi];            \
+        }                                       \
+      while (YYID (0))
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  5
 /* YYLAST -- Last index in YYTABLE.  */
@@ -986,27 +1012,27 @@ static const yytype_uint16 yyrline[] =
     3209,  3222,  3221,  3237,  3240,  3246,  3255,  3275,  3298,  3302,
     3306,  3310,  3314,  3318,  3337,  3350,  3353,  3369,  3372,  3385,
     3388,  3394,  3397,  3404,  3460,  3530,  3535,  3602,  3638,  3647,
-    3690,  3715,  3742,  3786,  3809,  3832,  3835,  3844,  3848,  3858,
-    3893,  3894,  3898,  3903,  3914,  3931,  3959,  3960,  3961,  3962,
-    3963,  3964,  3965,  3966,  3967,  3974,  3975,  3976,  3977,  3978,
-    3979,  3980,  3981,  3982,  3983,  3984,  3985,  3986,  3987,  3988,
-    3989,  3990,  3991,  3992,  3993,  3994,  3995,  3996,  3997,  3998,
-    3999,  4000,  4001,  4002,  4003,  4004,  4005,  4008,  4009,  4010,
-    4011,  4012,  4013,  4014,  4015,  4016,  4017,  4018,  4019,  4020,
-    4021,  4022,  4023,  4024,  4025,  4026,  4027,  4028,  4037,  4038,
-    4039,  4040,  4041,  4042,  4043,  4047,  4068,  4087,  4105,  4117,
-    4134,  4155,  4160,  4165,  4175,  4185,  4190,  4202,  4206,  4210,
-    4214,  4218,  4225,  4229,  4233,  4237,  4244,  4249,  4256,  4261,
-    4265,  4270,  4274,  4282,  4293,  4297,  4309,  4317,  4325,  4332,
-    4343,  4363,  4367,  4371,  4375,  4379,  4397,  4415,  4433,  4451,
-    4461,  4471,  4484,  4496,  4508,  4527,  4548,  4553,  4557,  4561,
-    4573,  4577,  4589,  4596,  4606,  4610,  4625,  4630,  4637,  4641,
-    4654,  4662,  4673,  4677,  4685,  4693,  4701,  4709,  4723,  4737,
-    4741,  4763,  4768
+    3690,  3715,  3742,  3789,  3812,  3835,  3838,  3847,  3851,  3861,
+    3896,  3897,  3901,  3906,  3917,  3934,  3962,  3963,  3964,  3965,
+    3966,  3967,  3968,  3969,  3970,  3977,  3978,  3979,  3980,  3981,
+    3982,  3983,  3984,  3985,  3986,  3987,  3988,  3989,  3990,  3991,
+    3992,  3993,  3994,  3995,  3996,  3997,  3998,  3999,  4000,  4001,
+    4002,  4003,  4004,  4005,  4006,  4007,  4008,  4011,  4012,  4013,
+    4014,  4015,  4016,  4017,  4018,  4019,  4020,  4021,  4022,  4023,
+    4024,  4025,  4026,  4027,  4028,  4029,  4030,  4031,  4040,  4041,
+    4042,  4043,  4044,  4045,  4046,  4050,  4071,  4090,  4108,  4120,
+    4137,  4158,  4163,  4168,  4178,  4188,  4193,  4205,  4209,  4213,
+    4217,  4221,  4228,  4232,  4236,  4240,  4247,  4252,  4259,  4264,
+    4268,  4273,  4277,  4285,  4296,  4300,  4312,  4320,  4328,  4335,
+    4346,  4366,  4370,  4374,  4378,  4382,  4400,  4418,  4436,  4454,
+    4464,  4474,  4487,  4499,  4511,  4530,  4551,  4556,  4560,  4564,
+    4576,  4580,  4592,  4599,  4609,  4613,  4628,  4633,  4640,  4644,
+    4657,  4665,  4676,  4680,  4688,  4696,  4704,  4712,  4726,  4740,
+    4744,  4766,  4771
 };
 #endif
 
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+#if YYDEBUG || YYERROR_VERBOSE || 0
 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 static const char *const yytname[] =
@@ -1057,7 +1083,7 @@ static const char *const yytname[] =
   "VExpr_Single", "RecursiveListOfListOfDouble", "ListOfDouble",
   "ListOfDoubleOrAll", "FExpr_Multi", "RecursiveListOfDouble", "ColorExpr",
   "ListOfColor", "RecursiveListOfColor", "StringExprVar", "StringExpr",
-  "RecursiveListOfStringExprVar", 0
+  "RecursiveListOfStringExprVar", YY_NULL
 };
 #endif
 
@@ -1186,8 +1212,8 @@ static const yytype_uint8 yyr2[] =
        6,     1,     3
 };
 
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+   Performed when YYTABLE doesn't specify something else to do.  Zero
    means the default is an error.  */
 static const yytype_uint16 yydefact[] =
 {
@@ -1538,8 +1564,7 @@ static const yytype_int16 yypgoto[] =
 
 /* 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.  */
+   number is the opposite.  If YYTABLE_NINF, syntax error.  */
 #define YYTABLE_NINF -5
 static const yytype_int16 yytable[] =
 {
@@ -2351,6 +2376,12 @@ static const yytype_int16 yytable[] =
      360,     0,     0,     0,     0,   361
 };
 
+#define yypact_value_is_default(yystate) \
+  ((yystate) == (-1072))
+
+#define yytable_value_is_error(yytable_value) \
+  YYID (0)
+
 static const yytype_int16 yycheck[] =
 {
        6,   210,     3,     6,     6,   412,   413,     6,     6,     4,
@@ -3347,18 +3378,18 @@ static const yytype_uint8 yystos[] =
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
-#define YYBACKUP(Token, Value)					\
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    {								\
-      yychar = (Token);						\
-      yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
-      YYPOPSTACK (1);						\
-      goto yybackup;						\
-    }								\
-  else								\
-    {								\
+#define YYBACKUP(Token, Value)                                  \
+do                                                              \
+  if (yychar == YYEMPTY)                                        \
+    {                                                           \
+      yychar = (Token);                                         \
+      yylval = (Value);                                         \
+      YYPOPSTACK (yylen);                                       \
+      yystate = *yyssp;                                         \
+      goto yybackup;                                            \
+    }                                                           \
+  else                                                          \
+    {                                                           \
       yyerror (YY_("syntax error: cannot back up")); \
       YYERROR;							\
     }								\
@@ -3368,46 +3399,38 @@ while (YYID (0))
 #define YYTERROR	1
 #define YYERRCODE	256
 
-
 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
    If N is 0, then set CURRENT to the empty location which ends
    the previous symbol: RHS[0] (always defined).  */
 
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
 #ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)				\
-    do									\
-      if (YYID (N))                                                    \
-	{								\
-	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
-	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
-	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
-	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
-	}								\
-      else								\
-	{								\
-	  (Current).first_line   = (Current).last_line   =		\
-	    YYRHSLOC (Rhs, 0).last_line;				\
-	  (Current).first_column = (Current).last_column =		\
-	    YYRHSLOC (Rhs, 0).last_column;				\
-	}								\
+# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
+    do                                                                  \
+      if (YYID (N))                                                     \
+        {                                                               \
+          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
+          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
+          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
+          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
+        }                                                               \
+      else                                                              \
+        {                                                               \
+          (Current).first_line   = (Current).last_line   =              \
+            YYRHSLOC (Rhs, 0).last_line;                                \
+          (Current).first_column = (Current).last_column =              \
+            YYRHSLOC (Rhs, 0).last_column;                              \
+        }                                                               \
     while (YYID (0))
 #endif
 
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+
+
 
-/* YY_LOCATION_PRINT -- Print the location on the stream.
-   This macro was not mandated originally: define only if we know
-   we won't break user code: when these are the locations we know.  */
+/* This macro is provided for backward compatibility. */
 
 #ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-#  define YY_LOCATION_PRINT(File, Loc)			\
-     fprintf (File, "%d.%d-%d.%d",			\
-	      (Loc).first_line, (Loc).first_column,	\
-	      (Loc).last_line,  (Loc).last_column)
-# else
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
 #endif
 
 
@@ -3462,6 +3485,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
     YYSTYPE const * const yyvaluep;
 #endif
 {
+  FILE *yyo = yyoutput;
+  YYUSE (yyo);
   if (!yyvaluep)
     return;
 # ifdef YYPRINT
@@ -3599,7 +3624,6 @@ int yydebug;
 # define YYMAXDEPTH 10000
 #endif
 
-
 
 #if YYERROR_VERBOSE
 
@@ -3702,115 +3726,142 @@ yytnamerr (char *yyres, const char *yystr)
 }
 # endif
 
-/* Copy into YYRESULT an error message about the unexpected token
-   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
-   including the terminating null byte.  If YYRESULT is null, do not
-   copy anything; just return the number of bytes that would be
-   copied.  As a special case, return 0 if an ordinary "syntax error"
-   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
-   size calculation.  */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
-  int yyn = yypact[yystate];
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+   about the unexpected token YYTOKEN for the state stack whose top is
+   YYSSP.
 
-  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
-    return 0;
-  else
-    {
-      int yytype = YYTRANSLATE (yychar);
-      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
-      YYSIZE_T yysize = yysize0;
-      YYSIZE_T yysize1;
-      int yysize_overflow = 0;
-      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-      int yyx;
-
-# if 0
-      /* This is so xgettext sees the translatable formats that are
-	 constructed on the fly.  */
-      YY_("syntax error, unexpected %s");
-      YY_("syntax error, unexpected %s, expecting %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
-      char *yyfmt;
-      char const *yyf;
-      static char const yyunexpected[] = "syntax error, unexpected %s";
-      static char const yyexpecting[] = ", expecting %s";
-      static char const yyor[] = " or %s";
-      char yyformat[sizeof yyunexpected
-		    + sizeof yyexpecting - 1
-		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
-		       * (sizeof yyor - 1))];
-      char const *yyprefix = yyexpecting;
-
-      /* Start YYX at -YYN if negative to avoid negative indexes in
-	 YYCHECK.  */
-      int yyxbegin = yyn < 0 ? -yyn : 0;
-
-      /* Stay within bounds of both yycheck and yytname.  */
-      int yychecklim = YYLAST - yyn + 1;
-      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-      int yycount = 1;
-
-      yyarg[0] = yytname[yytype];
-      yyfmt = yystpcpy (yyformat, yyunexpected);
-
-      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	  {
-	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-	      {
-		yycount = 1;
-		yysize = yysize0;
-		yyformat[sizeof yyunexpected - 1] = '\0';
-		break;
-	      }
-	    yyarg[yycount++] = yytname[yyx];
-	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-	    yysize_overflow |= (yysize1 < yysize);
-	    yysize = yysize1;
-	    yyfmt = yystpcpy (yyfmt, yyprefix);
-	    yyprefix = yyor;
-	  }
+   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
+   not large enough to hold the message.  In that case, also set
+   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
+   required number of bytes is too large to store.  */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+                yytype_int16 *yyssp, int yytoken)
+{
+  YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+  YYSIZE_T yysize = yysize0;
+  YYSIZE_T yysize1;
+  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+  /* Internationalized format string. */
+  const char *yyformat = YY_NULL;
+  /* Arguments of yyformat. */
+  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+  /* Number of reported tokens (one for the "unexpected", one per
+     "expected"). */
+  int yycount = 0;
+
+  /* There are many possibilities here to consider:
+     - Assume YYFAIL is not used.  It's too flawed to consider.  See
+       <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+       for details.  YYERROR is fine as it does not invoke this
+       function.
+     - If this state is a consistent state with a default action, then
+       the only way this function was invoked is if the default action
+       is an error action.  In that case, don't check for expected
+       tokens because there are none.
+     - The only way there can be no lookahead present (in yychar) is if
+       this state is a consistent state with a default action.  Thus,
+       detecting the absence of a lookahead is sufficient to determine
+       that there is no unexpected or expected token to report.  In that
+       case, just report a simple "syntax error".
+     - Don't assume there isn't a lookahead just because this state is a
+       consistent state with a default action.  There might have been a
+       previous inconsistent state, consistent state with a non-default
+       action, or user semantic action that manipulated yychar.
+     - Of course, the expected token list depends on states to have
+       correct lookahead information, and it depends on the parser not
+       to perform extra reductions after fetching a lookahead from the
+       scanner and before detecting a syntax error.  Thus, state merging
+       (from LALR or IELR) and default reductions corrupt the expected
+       token list.  However, the list is correct for canonical LR with
+       one exception: it will still contain any token that will not be
+       accepted due to an error action in a later state.
+  */
+  if (yytoken != YYEMPTY)
+    {
+      int yyn = yypact[*yyssp];
+      yyarg[yycount++] = yytname[yytoken];
+      if (!yypact_value_is_default (yyn))
+        {
+          /* Start YYX at -YYN if negative to avoid negative indexes in
+             YYCHECK.  In other words, skip the first -YYN actions for
+             this state because they are default actions.  */
+          int yyxbegin = yyn < 0 ? -yyn : 0;
+          /* Stay within bounds of both yycheck and yytname.  */
+          int yychecklim = YYLAST - yyn + 1;
+          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+          int yyx;
+
+          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+                && !yytable_value_is_error (yytable[yyx + yyn]))
+              {
+                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+                  {
+                    yycount = 1;
+                    yysize = yysize0;
+                    break;
+                  }
+                yyarg[yycount++] = yytname[yyx];
+                yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+                if (! (yysize <= yysize1
+                       && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                  return 2;
+                yysize = yysize1;
+              }
+        }
+    }
 
-      yyf = YY_(yyformat);
-      yysize1 = yysize + yystrlen (yyf);
-      yysize_overflow |= (yysize1 < yysize);
-      yysize = yysize1;
+  switch (yycount)
+    {
+# define YYCASE_(N, S)                      \
+      case N:                               \
+        yyformat = S;                       \
+      break
+      YYCASE_(0, YY_("syntax error"));
+      YYCASE_(1, YY_("syntax error, unexpected %s"));
+      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+    }
 
-      if (yysize_overflow)
-	return YYSIZE_MAXIMUM;
+  yysize1 = yysize + yystrlen (yyformat);
+  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+    return 2;
+  yysize = yysize1;
 
-      if (yyresult)
-	{
-	  /* Avoid sprintf, as that infringes on the user's name space.
-	     Don't have undefined behavior even if the translation
-	     produced a string with the wrong number of "%s"s.  */
-	  char *yyp = yyresult;
-	  int yyi = 0;
-	  while ((*yyp = *yyf) != '\0')
-	    {
-	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
-		{
-		  yyp += yytnamerr (yyp, yyarg[yyi++]);
-		  yyf += 2;
-		}
-	      else
-		{
-		  yyp++;
-		  yyf++;
-		}
-	    }
-	}
-      return yysize;
+  if (*yymsg_alloc < yysize)
+    {
+      *yymsg_alloc = 2 * yysize;
+      if (! (yysize <= *yymsg_alloc
+             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+      return 1;
     }
+
+  /* Avoid sprintf, as that infringes on the user's name space.
+     Don't have undefined behavior even if the translation
+     produced a string with the wrong number of "%s"s.  */
+  {
+    char *yyp = *yymsg;
+    int yyi = 0;
+    while ((*yyp = *yyformat) != '\0')
+      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+        {
+          yyp += yytnamerr (yyp, yyarg[yyi++]);
+          yyformat += 2;
+        }
+      else
+        {
+          yyp++;
+          yyformat++;
+        }
+  }
+  return 0;
 }
 #endif /* YYERROR_VERBOSE */
-
 
 /*-----------------------------------------------.
 | Release the memory associated to this symbol.  |
@@ -3843,20 +3894,7 @@ yydestruct (yymsg, yytype, yyvaluep)
     }
 }
 
-/* Prevent warnings from -Wmissing-prototypes.  */
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
+
 
 
 /* The lookahead symbol.  */
@@ -3869,10 +3907,9 @@ YYSTYPE yylval;
 int yynerrs;
 
 
-
-/*-------------------------.
-| yyparse or yypush_parse.  |
-`-------------------------*/
+/*----------.
+| yyparse.  |
+`----------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
@@ -3896,8 +3933,6 @@ yyparse ()
 #endif
 #endif
 {
-
-
     int yystate;
     /* Number of tokens to shift before error messages enabled.  */
     int yyerrstatus;
@@ -3906,7 +3941,7 @@ yyparse ()
        `yyss': related to states.
        `yyvs': related to semantic values.
 
-       Refer to the stacks thru separate pointers, to allow yyoverflow
+       Refer to the stacks through separate pointers, to allow yyoverflow
        to reallocate them elsewhere.  */
 
     /* The state stack.  */
@@ -4052,7 +4087,7 @@ yybackup:
 
   /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
+  if (yypact_value_is_default (yyn))
     goto yydefault;
 
   /* Not known => get a lookahead token if don't already have one.  */
@@ -4083,8 +4118,8 @@ yybackup:
   yyn = yytable[yyn];
   if (yyn <= 0)
     {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
+      if (yytable_value_is_error (yyn))
+        goto yyerrlab;
       yyn = -yyn;
       goto yyreduce;
     }
@@ -4139,171 +4174,171 @@ yyreduce:
     {
         case 3:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 165 "Gmsh.y"
-    { yyerrok; return 1; ;}
+    { yyerrok; return 1; }
     break;
 
   case 6:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 176 "Gmsh.y"
-    { return 1; ;}
+    { return 1; }
     break;
 
   case 7:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 177 "Gmsh.y"
-    { return 1; ;}
+    { return 1; }
     break;
 
   case 8:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 178 "Gmsh.y"
-    { return 1; ;}
+    { return 1; }
     break;
 
   case 9:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 179 "Gmsh.y"
-    { return 1; ;}
+    { return 1; }
     break;
 
   case 10:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 180 "Gmsh.y"
-    { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;}
+    { List_Delete((yyvsp[(1) - (1)].l)); return 1; }
     break;
 
   case 11:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 181 "Gmsh.y"
-    { return 1; ;}
+    { return 1; }
     break;
 
   case 12:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 182 "Gmsh.y"
-    { return 1; ;}
+    { return 1; }
     break;
 
   case 13:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 183 "Gmsh.y"
-    { return 1; ;}
+    { return 1; }
     break;
 
   case 14:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 184 "Gmsh.y"
-    { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;}
+    { List_Delete((yyvsp[(1) - (1)].l)); return 1; }
     break;
 
   case 15:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 185 "Gmsh.y"
-    { return 1; ;}
+    { return 1; }
     break;
 
   case 16:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 186 "Gmsh.y"
-    { return 1; ;}
+    { return 1; }
     break;
 
   case 17:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 187 "Gmsh.y"
-    { return 1; ;}
+    { return 1; }
     break;
 
   case 18:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 188 "Gmsh.y"
-    { return 1; ;}
+    { return 1; }
     break;
 
   case 19:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 189 "Gmsh.y"
-    { return 1; ;}
+    { return 1; }
     break;
 
   case 20:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 190 "Gmsh.y"
-    { return 1; ;}
+    { return 1; }
     break;
 
   case 21:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 191 "Gmsh.y"
-    { return 1; ;}
+    { return 1; }
     break;
 
   case 22:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 192 "Gmsh.y"
-    { return 1; ;}
+    { return 1; }
     break;
 
   case 23:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 197 "Gmsh.y"
     {
       (yyval.c) = (char*)"w";
-    ;}
+    }
     break;
 
   case 24:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 201 "Gmsh.y"
     {
       (yyval.c) = (char*)"a";
-    ;}
+    }
     break;
 
   case 25:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 208 "Gmsh.y"
     {
       Msg::Direct((yyvsp[(3) - (5)].c));
       Free((yyvsp[(3) - (5)].c));
-    ;}
+    }
     break;
 
   case 26:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 213 "Gmsh.y"
     {
       Msg::Error((yyvsp[(3) - (5)].c));
       Free((yyvsp[(3) - (5)].c));
-    ;}
+    }
     break;
 
   case 27:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 218 "Gmsh.y"
     {
       std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(6) - (7)].c));
@@ -4317,12 +4352,12 @@ yyreduce:
       }
       Free((yyvsp[(3) - (7)].c));
       Free((yyvsp[(6) - (7)].c));
-    ;}
+    }
     break;
 
   case 28:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 232 "Gmsh.y"
     {
       char tmpstring[5000];
@@ -4335,12 +4370,12 @@ yyreduce:
 	Msg::Direct(tmpstring);
       Free((yyvsp[(3) - (7)].c));
       List_Delete((yyvsp[(5) - (7)].l));
-    ;}
+    }
     break;
 
   case 29:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 245 "Gmsh.y"
     {
       char tmpstring[5000];
@@ -4353,12 +4388,12 @@ yyreduce:
 	Msg::Error(tmpstring);
       Free((yyvsp[(3) - (7)].c));
       List_Delete((yyvsp[(5) - (7)].l));
-    ;}
+    }
     break;
 
   case 30:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 258 "Gmsh.y"
     {
       char tmpstring[5000];
@@ -4381,12 +4416,12 @@ yyreduce:
       Free((yyvsp[(3) - (9)].c));
       Free((yyvsp[(8) - (9)].c));
       List_Delete((yyvsp[(5) - (9)].l));
-    ;}
+    }
     break;
 
   case 31:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 286 "Gmsh.y"
     {
 #if defined(HAVE_POST)
@@ -4400,12 +4435,12 @@ yyreduce:
 	delete ViewData;
 #endif
       Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(2) - (6)].c));
-    ;}
+    }
     break;
 
   case 32:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 300 "Gmsh.y"
     {
 #if defined(HAVE_POST)
@@ -4416,12 +4451,12 @@ yyreduce:
       }
 #endif
       Free((yyvsp[(2) - (6)].c));
-    ;}
+    }
     break;
 
   case 33:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 311 "Gmsh.y"
     {
 #if defined(HAVE_POST)
@@ -4432,51 +4467,51 @@ yyreduce:
       }
 #endif
       Free((yyvsp[(2) - (6)].c));
-    ;}
+    }
     break;
 
   case 34:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 325 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       ViewData = new PViewDataList();
 #endif
-    ;}
+    }
     break;
 
   case 40:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 339 "Gmsh.y"
-    { ViewCoord.push_back((yyvsp[(1) - (1)].d)); ;}
+    { ViewCoord.push_back((yyvsp[(1) - (1)].d)); }
     break;
 
   case 41:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 341 "Gmsh.y"
-    { ViewCoord.push_back((yyvsp[(3) - (3)].d)); ;}
+    { ViewCoord.push_back((yyvsp[(3) - (3)].d)); }
     break;
 
   case 42:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 346 "Gmsh.y"
-    { if(ViewValueList) ViewValueList->push_back((yyvsp[(1) - (1)].d)); ;}
+    { if(ViewValueList) ViewValueList->push_back((yyvsp[(1) - (1)].d)); }
     break;
 
   case 43:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 348 "Gmsh.y"
-    { if(ViewValueList) ViewValueList->push_back((yyvsp[(3) - (3)].d)); ;}
+    { if(ViewValueList) ViewValueList->push_back((yyvsp[(3) - (3)].d)); }
     break;
 
   case 44:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 353 "Gmsh.y"
     {
 #if defined(HAVE_POST)
@@ -4580,12 +4615,12 @@ yyreduce:
 #endif
       ViewCoord.clear();
       Free((yyvsp[(1) - (1)].c));
-    ;}
+    }
     break;
 
   case 45:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 457 "Gmsh.y"
     {
 #if defined(HAVE_POST)
@@ -4595,47 +4630,47 @@ yyreduce:
 	    ViewValueList->push_back(ViewCoord[3 * j + i]);
       }
 #endif
-    ;}
+    }
     break;
 
   case 46:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 467 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(ViewValueList) (*ViewNumList)++;
 #endif
-    ;}
+    }
     break;
 
   case 47:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 476 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c)) + 1; i++) ViewData->T2C.push_back((yyvsp[(1) - (1)].c)[i]);
 #endif
       Free((yyvsp[(1) - (1)].c));
-    ;}
+    }
     break;
 
   case 48:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 483 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c)) + 1; i++) ViewData->T2C.push_back((yyvsp[(3) - (3)].c)[i]);
 #endif
       Free((yyvsp[(3) - (3)].c));
-    ;}
+    }
     break;
 
   case 49:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 493 "Gmsh.y"
     {
 #if defined(HAVE_POST)
@@ -4644,47 +4679,47 @@ yyreduce:
       ViewData->T2D.push_back((yyvsp[(7) - (8)].d));
       ViewData->T2D.push_back(ViewData->T2C.size());
 #endif
-    ;}
+    }
     break;
 
   case 50:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 502 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       ViewData->NbT2++;
 #endif
-    ;}
+    }
     break;
 
   case 51:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 511 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c)) + 1; i++) ViewData->T3C.push_back((yyvsp[(1) - (1)].c)[i]);
 #endif
       Free((yyvsp[(1) - (1)].c));
-    ;}
+    }
     break;
 
   case 52:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 518 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c)) + 1; i++) ViewData->T3C.push_back((yyvsp[(3) - (3)].c)[i]);
 #endif
       Free((yyvsp[(3) - (3)].c));
-    ;}
+    }
     break;
 
   case 53:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 528 "Gmsh.y"
     {
 #if defined(HAVE_POST)
@@ -4692,23 +4727,23 @@ yyreduce:
       ViewData->T3D.push_back((yyvsp[(7) - (10)].d)); ViewData->T3D.push_back((yyvsp[(9) - (10)].d));
       ViewData->T3D.push_back(ViewData->T3C.size());
 #endif
-    ;}
+    }
     break;
 
   case 54:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 536 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       ViewData->NbT3++;
 #endif
-    ;}
+    }
     break;
 
   case 55:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 546 "Gmsh.y"
     {
 #if defined(HAVE_POST)
@@ -4724,12 +4759,12 @@ yyreduce:
       ViewData->setInterpolationMatrices(type, ListOfListOfDouble2Matrix((yyvsp[(3) - (8)].l)),
                                          ListOfListOfDouble2Matrix((yyvsp[(6) - (8)].l)));
 #endif
-    ;}
+    }
     break;
 
   case 56:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 565 "Gmsh.y"
     {
 #if defined(HAVE_POST)
@@ -4745,80 +4780,80 @@ yyreduce:
                                          ListOfListOfDouble2Matrix((yyvsp[(9) - (14)].l)),
                                          ListOfListOfDouble2Matrix((yyvsp[(12) - (14)].l)));
 #endif
-    ;}
+    }
     break;
 
   case 57:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 584 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       ViewValueList = &ViewData->Time;
 #endif
-    ;}
+    }
     break;
 
   case 58:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 590 "Gmsh.y"
     {
-    ;}
+    }
     break;
 
   case 59:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 597 "Gmsh.y"
-    { (yyval.i) = 0; ;}
+    { (yyval.i) = 0; }
     break;
 
   case 60:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 598 "Gmsh.y"
-    { (yyval.i) = 1; ;}
+    { (yyval.i) = 1; }
     break;
 
   case 61:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 599 "Gmsh.y"
-    { (yyval.i) = 2; ;}
+    { (yyval.i) = 2; }
     break;
 
   case 62:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 600 "Gmsh.y"
-    { (yyval.i) = 3; ;}
+    { (yyval.i) = 3; }
     break;
 
   case 63:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 601 "Gmsh.y"
-    { (yyval.i) = 4; ;}
+    { (yyval.i) = 4; }
     break;
 
   case 64:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 605 "Gmsh.y"
-    { (yyval.i) = 1; ;}
+    { (yyval.i) = 1; }
     break;
 
   case 65:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 606 "Gmsh.y"
-    { (yyval.i) = -1; ;}
+    { (yyval.i) = -1; }
     break;
 
   case 67:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 615 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c)) && (yyvsp[(2) - (4)].i) && List_Nbr((yyvsp[(3) - (4)].l)) == 1){
@@ -4878,12 +4913,12 @@ yyreduce:
       }
       Free((yyvsp[(1) - (4)].c));
       List_Delete((yyvsp[(3) - (4)].l));
-    ;}
+    }
     break;
 
   case 68:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 677 "Gmsh.y"
     {
       gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(1) - (6)].c)]);
@@ -4912,12 +4947,12 @@ yyreduce:
       }
       Free((yyvsp[(1) - (6)].c));
       List_Delete((yyvsp[(5) - (6)].l));
-    ;}
+    }
     break;
 
   case 69:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 707 "Gmsh.y"
     {
       int index = (int)(yyvsp[(3) - (7)].d);
@@ -4950,12 +4985,12 @@ yyreduce:
           yymsg(0, "Variable '%s' is not a list", (yyvsp[(1) - (7)].c));
       }
       Free((yyvsp[(1) - (7)].c));
-    ;}
+    }
     break;
 
   case 70:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 742 "Gmsh.y"
     {
       int index = (int)(yyvsp[(3) - (7)].d);
@@ -4988,12 +5023,12 @@ yyreduce:
           yymsg(0, "Variable '%s' is not a list", (yyvsp[(1) - (7)].c));
       }
       Free((yyvsp[(1) - (7)].c));
-    ;}
+    }
     break;
 
   case 71:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 776 "Gmsh.y"
     {
       if(List_Nbr((yyvsp[(4) - (9)].l)) != List_Nbr((yyvsp[(8) - (9)].l))){
@@ -5039,12 +5074,12 @@ yyreduce:
       Free((yyvsp[(1) - (9)].c));
       List_Delete((yyvsp[(4) - (9)].l));
       List_Delete((yyvsp[(8) - (9)].l));
-    ;}
+    }
     break;
 
   case 72:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 824 "Gmsh.y"
     {
       if(List_Nbr((yyvsp[(4) - (9)].l)) != List_Nbr((yyvsp[(8) - (9)].l))){
@@ -5090,12 +5125,12 @@ yyreduce:
       Free((yyvsp[(1) - (9)].c));
       List_Delete((yyvsp[(4) - (9)].l));
       List_Delete((yyvsp[(8) - (9)].l));
-    ;}
+    }
     break;
 
   case 73:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 871 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
@@ -5110,12 +5145,12 @@ yyreduce:
           yymsg(0, "Variable '%s' is a list", (yyvsp[(1) - (3)].c));
       }
       Free((yyvsp[(1) - (3)].c));
-    ;}
+    }
     break;
 
   case 74:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 886 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
@@ -5131,23 +5166,23 @@ yyreduce:
           yymsg(0, "Variable '%s' is not a list", (yyvsp[(1) - (6)].c));
       }
       Free((yyvsp[(1) - (6)].c));
-    ;}
+    }
     break;
 
   case 75:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 902 "Gmsh.y"
     {
       gmsh_yystringsymbols[(yyvsp[(1) - (4)].c)] = std::string((yyvsp[(3) - (4)].c));
       Free((yyvsp[(1) - (4)].c));
       Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
   case 76:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 911 "Gmsh.y"
     {
       std::string tmp((yyvsp[(5) - (6)].c));
@@ -5158,7 +5193,7 @@ yyreduce:
 
   case 77:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 917 "Gmsh.y"
     {
       std::string tmp((yyvsp[(8) - (9)].c));
@@ -5169,7 +5204,7 @@ yyreduce:
 
   case 78:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 926 "Gmsh.y"
     {
       double d = 0.;
@@ -5187,12 +5222,12 @@ yyreduce:
 	NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (6)].c), 0, (yyvsp[(3) - (6)].c), d);
       }
       Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(3) - (6)].c));
-    ;}
+    }
     break;
 
   case 79:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 944 "Gmsh.y"
     {
       double d = 0.;
@@ -5210,12 +5245,12 @@ yyreduce:
 	NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c), d);
       }
       Free((yyvsp[(1) - (9)].c)); Free((yyvsp[(6) - (9)].c));
-    ;}
+    }
     break;
 
   case 80:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 962 "Gmsh.y"
     {
       double d = 0.;
@@ -5224,12 +5259,12 @@ yyreduce:
 	NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (5)].c), 0, (yyvsp[(3) - (5)].c), d);
       }
       Free((yyvsp[(1) - (5)].c)); Free((yyvsp[(3) - (5)].c));
-    ;}
+    }
     break;
 
   case 81:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 971 "Gmsh.y"
     {
       double d = 0.;
@@ -5238,32 +5273,32 @@ yyreduce:
 	NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (8)].c), (int)(yyvsp[(3) - (8)].d), (yyvsp[(6) - (8)].c), d);
       }
       Free((yyvsp[(1) - (8)].c)); Free((yyvsp[(6) - (8)].c));
-    ;}
+    }
     break;
 
   case 82:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 983 "Gmsh.y"
     {
       ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (8)].c), 0, (yyvsp[(5) - (8)].c), (yyvsp[(7) - (8)].u));
       Free((yyvsp[(1) - (8)].c)); Free((yyvsp[(5) - (8)].c));
-    ;}
+    }
     break;
 
   case 83:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 988 "Gmsh.y"
     {
       ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (11)].c), (int)(yyvsp[(3) - (11)].d), (yyvsp[(8) - (11)].c), (yyvsp[(10) - (11)].u));
       Free((yyvsp[(1) - (11)].c)); Free((yyvsp[(8) - (11)].c));
-    ;}
+    }
     break;
 
   case 84:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 996 "Gmsh.y"
     {
       GmshColorTable *ct = GetColorTable(0);
@@ -5283,12 +5318,12 @@ yyreduce:
       }
       Free((yyvsp[(1) - (6)].c));
       List_Delete((yyvsp[(5) - (6)].l));
-    ;}
+    }
     break;
 
   case 85:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1016 "Gmsh.y"
     {
       GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (9)].d));
@@ -5308,12 +5343,12 @@ yyreduce:
       }
       Free((yyvsp[(1) - (9)].c));
       List_Delete((yyvsp[(8) - (9)].l));
-    ;}
+    }
     break;
 
   case 86:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1039 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
@@ -5324,12 +5359,12 @@ yyreduce:
       else
 	yymsg(0, "Unknown command %s Field", (yyvsp[(1) - (5)].c));
 #endif
-    ;}
+    }
     break;
 
   case 87:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1050 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
@@ -5337,12 +5372,12 @@ yyreduce:
 	yymsg(0, "Cannot create field %i of type '%s'", (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c));
 #endif
       Free((yyvsp[(6) - (7)].c));
-    ;}
+    }
     break;
 
   case 88:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1058 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
@@ -5364,12 +5399,12 @@ yyreduce:
 	yymsg(0, "No field with id %i", (int)(yyvsp[(3) - (9)].d));
 #endif
       Free((yyvsp[(6) - (9)].c));
-    ;}
+    }
     break;
 
   case 89:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1080 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
@@ -5392,12 +5427,12 @@ yyreduce:
 #endif
       Free((yyvsp[(6) - (9)].c));
       Free((yyvsp[(8) - (9)].c));
-    ;}
+    }
     break;
 
   case 90:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1103 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
@@ -5423,12 +5458,12 @@ yyreduce:
 #endif
       Free((yyvsp[(6) - (11)].c));
       List_Delete((yyvsp[(9) - (11)].l));
-    ;}
+    }
     break;
 
   case 91:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1129 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
@@ -5446,12 +5481,12 @@ yyreduce:
 	yymsg(0, "No field with id %i", (int)(yyvsp[(3) - (7)].d));
 #endif
       Free((yyvsp[(6) - (7)].c));
-    ;}
+    }
     break;
 
   case 92:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1150 "Gmsh.y"
     {
 #if defined(HAVE_PLUGINS)
@@ -5463,12 +5498,12 @@ yyreduce:
       }
 #endif
       Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(6) - (9)].c));
-    ;}
+    }
     break;
 
   case 93:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1162 "Gmsh.y"
     {
 #if defined(HAVE_PLUGINS)
@@ -5480,12 +5515,12 @@ yyreduce:
       }
 #endif
       Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(6) - (9)].c)); Free((yyvsp[(8) - (9)].c));
-    ;}
+    }
     break;
 
   case 97:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1180 "Gmsh.y"
     {
       std::string key((yyvsp[(3) - (3)].c));
@@ -5496,12 +5531,12 @@ yyreduce:
         gmsh_yysymbols[key].value = val;
       }
       Free((yyvsp[(3) - (3)].c));
-    ;}
+    }
     break;
 
   case 98:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1191 "Gmsh.y"
     {
       std::string key((yyvsp[(3) - (5)].c));
@@ -5512,19 +5547,19 @@ yyreduce:
         gmsh_yysymbols[key].value = val;
       }
       Free((yyvsp[(3) - (5)].c));
-    ;}
+    }
     break;
 
   case 99:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1202 "Gmsh.y"
-    { floatOptions.clear(); charOptions.clear(); ;}
+    { floatOptions.clear(); charOptions.clear(); }
     break;
 
   case 100:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1204 "Gmsh.y"
     {
       std::string key((yyvsp[(3) - (9)].c));
@@ -5534,12 +5569,12 @@ yyreduce:
         gmsh_yysymbols[key].value = val;
       }
       Free((yyvsp[(3) - (9)].c));
-    ;}
+    }
     break;
 
   case 101:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1214 "Gmsh.y"
     {
       std::string key((yyvsp[(3) - (5)].c)), val((yyvsp[(5) - (5)].c));
@@ -5550,19 +5585,19 @@ yyreduce:
       }
       Free((yyvsp[(3) - (5)].c));
       Free((yyvsp[(5) - (5)].c));
-    ;}
+    }
     break;
 
   case 102:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1225 "Gmsh.y"
-    { floatOptions.clear(); charOptions.clear(); ;}
+    { floatOptions.clear(); charOptions.clear(); }
     break;
 
   case 103:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1227 "Gmsh.y"
     {
       std::string key((yyvsp[(3) - (9)].c)), val((yyvsp[(6) - (9)].c));
@@ -5572,33 +5607,33 @@ yyreduce:
       }
       Free((yyvsp[(3) - (9)].c));
       Free((yyvsp[(6) - (9)].c));
-    ;}
+    }
     break;
 
   case 104:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1240 "Gmsh.y"
     {
       (yyval.l) = List_Create(20,20,sizeof(doubleXstring));
       doubleXstring v = {(yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].c)};
       List_Add((yyval.l), &v);
-    ;}
+    }
     break;
 
   case 105:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1246 "Gmsh.y"
     {
       doubleXstring v = {(yyvsp[(3) - (5)].d), (yyvsp[(5) - (5)].c)};
       List_Add((yyval.l), &v);
-    ;}
+    }
     break;
 
   case 108:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1258 "Gmsh.y"
     {
       std::string key((yyvsp[(2) - (3)].c));
@@ -5609,12 +5644,12 @@ yyreduce:
       }
       Free((yyvsp[(2) - (3)].c));
       List_Delete((yyvsp[(3) - (3)].l));
-    ;}
+    }
     break;
 
   case 109:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1269 "Gmsh.y"
     {
       std::string key((yyvsp[(2) - (5)].c));
@@ -5628,12 +5663,12 @@ yyreduce:
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++)
         Free(((doubleXstring*)List_Pointer((yyvsp[(4) - (5)].l), i))->s);
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
   case 110:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1284 "Gmsh.y"
     {
       std::string key((yyvsp[(2) - (3)].c));
@@ -5641,24 +5676,24 @@ yyreduce:
       charOptions[key].push_back(val);
       Free((yyvsp[(2) - (3)].c));
       Free((yyvsp[(3) - (3)].c));
-    ;}
+    }
     break;
 
   case 113:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1300 "Gmsh.y"
     {
       std::string key((yyvsp[(2) - (3)].c));
       double val = (yyvsp[(3) - (3)].d);
       floatOptions[key].push_back(val);
       Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
   case 114:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1308 "Gmsh.y"
     {
       std::string key((yyvsp[(2) - (3)].c));
@@ -5666,12 +5701,12 @@ yyreduce:
       charOptions[key].push_back(val);
       Free((yyvsp[(2) - (3)].c));
       Free((yyvsp[(3) - (3)].c));
-    ;}
+    }
     break;
 
   case 115:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1317 "Gmsh.y"
     {
       std::string key((yyvsp[(2) - (5)].c));
@@ -5684,42 +5719,42 @@ yyreduce:
       }
       Free((yyvsp[(2) - (5)].c));
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
   case 116:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1336 "Gmsh.y"
     {
       (yyval.i) = (int)(yyvsp[(1) - (1)].d);
-    ;}
+    }
     break;
 
   case 117:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1340 "Gmsh.y"
     {
       (yyval.i) = GModel::current()->setPhysicalName
         (std::string((yyvsp[(1) - (1)].c)), curPhysDim,
          ++GModel::current()->getGEOInternals()->MaxPhysicalNum);
       Free((yyvsp[(1) - (1)].c));
-    ;}
+    }
     break;
 
   case 118:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1350 "Gmsh.y"
     {
       (yyval.l) = 0;
-    ;}
+    }
     break;
 
   case 119:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1354 "Gmsh.y"
     {
       (yyval.l) = List_Create(1, 1, sizeof(Vertex*));
@@ -5729,30 +5764,30 @@ yyreduce:
       else{
 	List_Add((yyval.l), &v);
       }
-    ;}
+    }
     break;
 
   case 120:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1366 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++) (yyval.v)[i] = 0.;
-    ;}
+    }
     break;
 
   case 121:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1370 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i];
-    ;}
+    }
     break;
 
   case 122:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1380 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
@@ -5775,21 +5810,21 @@ yyreduce:
       }
       (yyval.s).Type = MSH_POINT;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 123:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1403 "Gmsh.y"
     {
       curPhysDim = 0;
-    ;}
+    }
     break;
 
   case 124:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1407 "Gmsh.y"
     {
       int num = (int)(yyvsp[(5) - (9)].i);
@@ -5805,12 +5840,12 @@ yyreduce:
       List_Delete((yyvsp[(8) - (9)].l));
       (yyval.s).Type = MSH_PHYSICAL_POINT;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 125:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1423 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){
@@ -5829,12 +5864,12 @@ yyreduce:
       // dummy values
       (yyval.s).Type = 0;
       (yyval.s).Num = 0;
-    ;}
+    }
     break;
 
   case 126:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1445 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
@@ -5852,12 +5887,12 @@ yyreduce:
       List_Delete((yyvsp[(6) - (7)].l));
       (yyval.s).Type = MSH_SEGM_LINE;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 127:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1463 "Gmsh.y"
     {
       for (int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
@@ -5878,12 +5913,12 @@ yyreduce:
 	  }
 	}
       }
-    ;}
+    }
     break;
 
   case 128:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1484 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
@@ -5901,12 +5936,12 @@ yyreduce:
       List_Delete((yyvsp[(6) - (7)].l));
       (yyval.s).Type = MSH_SEGM_SPLN;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 129:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1502 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (8)].d);
@@ -5936,12 +5971,12 @@ yyreduce:
       List_Delete((yyvsp[(6) - (8)].l));
       (yyval.s).Type = MSH_SEGM_CIRC;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 130:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1532 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (8)].d);
@@ -5971,12 +6006,12 @@ yyreduce:
       List_Delete((yyvsp[(6) - (8)].l));
       (yyval.s).Type = MSH_SEGM_ELLI;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 131:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1562 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
@@ -5994,12 +6029,12 @@ yyreduce:
       List_Delete((yyvsp[(6) - (7)].l));
       (yyval.s).Type = MSH_SEGM_BSPLN;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 132:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1580 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
@@ -6017,12 +6052,12 @@ yyreduce:
       List_Delete((yyvsp[(6) - (7)].l));
       (yyval.s).Type = MSH_SEGM_BEZIER;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 133:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1598 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (11)].d);
@@ -6048,12 +6083,12 @@ yyreduce:
       List_Delete((yyvsp[(8) - (11)].l));
       (yyval.s).Type = MSH_SEGM_NURBS;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 134:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1624 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
@@ -6071,12 +6106,12 @@ yyreduce:
       Free((yyvsp[(2) - (8)].c));
       (yyval.s).Type = MSH_SEGM_LOOP;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 135:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1642 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
@@ -6094,21 +6129,21 @@ yyreduce:
       List_Delete((yyvsp[(7) - (8)].l));
       (yyval.s).Type = MSH_SEGM_COMPOUND;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 136:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1660 "Gmsh.y"
     {
       curPhysDim = 1;
-    ;}
+    }
     break;
 
   case 137:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1664 "Gmsh.y"
     {
       int num = (int)(yyvsp[(5) - (9)].i);
@@ -6124,12 +6159,12 @@ yyreduce:
       List_Delete((yyvsp[(8) - (9)].l));
       (yyval.s).Type = MSH_PHYSICAL_LINE;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 138:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1683 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
@@ -6147,12 +6182,12 @@ yyreduce:
       List_Delete((yyvsp[(7) - (8)].l));
       (yyval.s).Type = MSH_SURF_PLAN;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 139:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1701 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (9)].d), type = 0;
@@ -6191,46 +6226,46 @@ yyreduce:
       List_Delete((yyvsp[(7) - (9)].l));
       (yyval.s).Type = type;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 140:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1740 "Gmsh.y"
     {
       myGmshSurface = 0;
       (yyval.s).Type = 0;
       (yyval.s).Num = 0;
-    ;}
+    }
     break;
 
   case 141:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1746 "Gmsh.y"
     {
       myGmshSurface = gmshSurface::getSurface((int)(yyvsp[(3) - (4)].d));
       (yyval.s).Type = 0;
       (yyval.s).Num = 0;
-    ;}
+    }
     break;
 
   case 142:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1752 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (10)].d);
       myGmshSurface = gmshParametricSurface::NewParametricSurface(num, (yyvsp[(7) - (10)].c), (yyvsp[(8) - (10)].c), (yyvsp[(9) - (10)].c));
       (yyval.s).Type = 0;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 143:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1759 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
@@ -6255,12 +6290,12 @@ yyreduce:
       }
       (yyval.s).Type = 0;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 144:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1784 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
@@ -6285,12 +6320,12 @@ yyreduce:
       }
       (yyval.s).Type = 0;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 145:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1809 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
@@ -6307,12 +6342,12 @@ yyreduce:
       Free((yyvsp[(2) - (8)].c));
       (yyval.s).Type = MSH_SURF_LOOP;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 146:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1826 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
@@ -6329,12 +6364,12 @@ yyreduce:
       List_Delete((yyvsp[(7) - (8)].l));
       (yyval.s).Type = MSH_SURF_COMPOUND;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 147:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1844 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (12)].d);
@@ -6364,21 +6399,21 @@ yyreduce:
       Free((yyvsp[(8) - (12)].c));
       (yyval.s).Type = MSH_SURF_COMPOUND;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 148:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1874 "Gmsh.y"
     {
       curPhysDim = 2;
-    ;}
+    }
     break;
 
   case 149:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1878 "Gmsh.y"
     {
       int num = (int)(yyvsp[(5) - (9)].i);
@@ -6394,12 +6429,12 @@ yyreduce:
       List_Delete((yyvsp[(8) - (9)].l));
       (yyval.s).Type = MSH_PHYSICAL_SURFACE;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 150:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1898 "Gmsh.y"
     {
       yymsg(0, "'Complex Volume' command is deprecated: use 'Volume' instead");
@@ -6417,12 +6452,12 @@ yyreduce:
       List_Delete((yyvsp[(7) - (8)].l));
       (yyval.s).Type = MSH_VOLUME;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 151:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1916 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
@@ -6439,12 +6474,12 @@ yyreduce:
       List_Delete((yyvsp[(6) - (7)].l));
       (yyval.s).Type = MSH_VOLUME;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 152:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1933 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
@@ -6460,21 +6495,21 @@ yyreduce:
       List_Delete((yyvsp[(7) - (8)].l));
       (yyval.s).Type = MSH_VOLUME_COMPOUND;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 153:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1949 "Gmsh.y"
     {
       curPhysDim = 3;
-    ;}
+    }
     break;
 
   case 154:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1953 "Gmsh.y"
     {
       int num = (int)(yyvsp[(5) - (9)].i);
@@ -6490,62 +6525,62 @@ yyreduce:
       List_Delete((yyvsp[(8) - (9)].l));
       (yyval.s).Type = MSH_PHYSICAL_VOLUME;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
   case 155:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1975 "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);
-    ;}
+    }
     break;
 
   case 156:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1980 "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);
-    ;}
+    }
     break;
 
   case 157:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1985 "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);
-    ;}
+    }
     break;
 
   case 158:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1990 "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);
-    ;}
+    }
     break;
 
   case 159:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 1995 "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);
-    ;}
+    }
     break;
 
   case 160:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2000 "Gmsh.y"
     {
       (yyval.l) = List_Create(3, 3, sizeof(Shape));
@@ -6568,23 +6603,23 @@ yyreduce:
       }
       Free((yyvsp[(1) - (4)].c));
       List_Delete((yyvsp[(3) - (4)].l));
-    ;}
+    }
     break;
 
   case 161:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2023 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       IntersectCurvesWithSurface((yyvsp[(4) - (9)].l), (int)(yyvsp[(8) - (9)].d), (yyval.l));
       List_Delete((yyvsp[(4) - (9)].l));
-    ;}
+    }
     break;
 
   case 162:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2029 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape*));
@@ -6592,44 +6627,44 @@ yyreduce:
       List_Delete((yyvsp[(7) - (9)].l));
       SplitCurve((int)(yyvsp[(4) - (9)].d), tmp, (yyval.l));
       List_Delete(tmp);
-    ;}
+    }
     break;
 
   case 163:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2039 "Gmsh.y"
-    { (yyval.l) = (yyvsp[(1) - (1)].l); ;}
+    { (yyval.l) = (yyvsp[(1) - (1)].l); }
     break;
 
   case 164:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2040 "Gmsh.y"
-    { (yyval.l) = (yyvsp[(1) - (1)].l); ;}
+    { (yyval.l) = (yyvsp[(1) - (1)].l); }
     break;
 
   case 165:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2045 "Gmsh.y"
     {
       (yyval.l) = List_Create(3, 3, sizeof(Shape));
-    ;}
+    }
     break;
 
   case 166:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2049 "Gmsh.y"
     {
       List_Add((yyval.l), &(yyvsp[(2) - (2)].s));
-    ;}
+    }
     break;
 
   case 167:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2053 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
@@ -6652,12 +6687,12 @@ yyreduce:
 	    yymsg(1, "Unknown point %d", TheShape.Num);
 	}
       }
-    ;}
+    }
     break;
 
   case 168:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2076 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
@@ -6680,12 +6715,12 @@ yyreduce:
 	    yymsg(1, "Unknown curve %d", TheShape.Num);
 	}
       }
-    ;}
+    }
     break;
 
   case 169:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2099 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
@@ -6708,12 +6743,12 @@ yyreduce:
 	    yymsg(1, "Unknown surface %d", TheShape.Num);
 	}
       }
-    ;}
+    }
     break;
 
   case 170:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2122 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
@@ -6736,12 +6771,12 @@ yyreduce:
 	    yymsg(1, "Unknown volume %d", TheShape.Num);
 	}
       }
-    ;}
+    }
     break;
 
   case 171:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2150 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
@@ -6762,12 +6797,12 @@ yyreduce:
       else
         yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (8)].d));
 #endif
-    ;}
+    }
     break;
 
   case 172:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2171 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
@@ -6790,12 +6825,12 @@ yyreduce:
 	 Tree_Add(GModel::current()->getGEOInternals()->LevelSets, &l);
       }
 #endif
-    ;}
+    }
     break;
 
   case 173:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2195 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
@@ -6815,12 +6850,12 @@ yyreduce:
       else
         yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (14)].d));
 #endif
-    ;}
+    }
     break;
 
   case 174:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2216 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
@@ -6841,12 +6876,12 @@ yyreduce:
       else
         yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (16)].d));
 #endif
-    ;}
+    }
     break;
 
   case 175:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2237 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
@@ -6866,12 +6901,12 @@ yyreduce:
       else
         yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (12)].d));
 #endif
-    ;}
+    }
     break;
 
   case 176:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2257 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
@@ -6983,12 +7018,12 @@ yyreduce:
         yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (8)].d));
       Free((yyvsp[(2) - (8)].c));
 #endif
-    ;}
+    }
     break;
 
   case 177:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2369 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
@@ -7007,12 +7042,12 @@ yyreduce:
         yymsg(0, "Wrong levelset definition");
       Free((yyvsp[(2) - (8)].c)); Free((yyvsp[(7) - (8)].c));
 #endif
-    ;}
+    }
     break;
 
   case 178:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2388 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
@@ -7050,12 +7085,12 @@ yyreduce:
         yymsg(0, "Wrong levelset definition");
       Free((yyvsp[(2) - (6)].c));
 #endif
-    ;}
+    }
     break;
 
   case 179:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2427 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
@@ -7158,12 +7193,12 @@ yyreduce:
         yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (14)].d));
       Free((yyvsp[(2) - (14)].c));
 #endif
-    ;}
+    }
     break;
 
   case 180:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2535 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
@@ -7172,23 +7207,23 @@ yyreduce:
 	DeleteShape(TheShape.Type, TheShape.Num);
       }
       List_Delete((yyvsp[(3) - (4)].l));
-    ;}
+    }
     break;
 
   case 181:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2544 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
       GModel::current()->getFields()->deleteField((int)(yyvsp[(4) - (6)].d));
 #endif
-    ;}
+    }
     break;
 
   case 182:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2550 "Gmsh.y"
     {
 #if defined(HAVE_POST)
@@ -7203,12 +7238,12 @@ yyreduce:
 	yymsg(0, "Unknown command 'Delete %s'", (yyvsp[(2) - (6)].c));
 #endif
       Free((yyvsp[(2) - (6)].c));
-    ;}
+    }
     break;
 
   case 183:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2565 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){
@@ -7236,12 +7271,12 @@ yyreduce:
 	  yymsg(0, "Unknown object or expression to delete '%s'", (yyvsp[(2) - (3)].c));
       }
       Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
   case 184:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2593 "Gmsh.y"
     {
 #if defined(HAVE_POST)
@@ -7253,12 +7288,12 @@ yyreduce:
 	yymsg(0, "Unknown command 'Delete %s %s'", (yyvsp[(2) - (4)].c), (yyvsp[(3) - (4)].c));
 #endif
       Free((yyvsp[(2) - (4)].c)); Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
   case 185:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2610 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
@@ -7267,34 +7302,34 @@ yyreduce:
 	ColorShape(TheShape.Type, TheShape.Num, (yyvsp[(2) - (5)].u));
       }
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
   case 186:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2624 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++)
 	VisibilityShape((yyvsp[(2) - (3)].c), i, 1);
       Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
   case 187:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2630 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++)
 	VisibilityShape((yyvsp[(2) - (3)].c), i, 0);
       Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
   case 188:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2636 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
@@ -7303,12 +7338,12 @@ yyreduce:
 	VisibilityShape(TheShape.Type, TheShape.Num, 1);
       }
       List_Delete((yyvsp[(3) - (4)].l));
-    ;}
+    }
     break;
 
   case 189:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2645 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
@@ -7317,12 +7352,12 @@ yyreduce:
 	VisibilityShape(TheShape.Type, TheShape.Num, 0);
       }
       List_Delete((yyvsp[(3) - (4)].l));
-    ;}
+    }
     break;
 
   case 190:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2659 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (3)].c), "Include")){
@@ -7367,12 +7402,12 @@ yyreduce:
       else
 	yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (3)].c));
       Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
   case 191:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2704 "Gmsh.y"
     {
 #if defined(HAVE_POST)
@@ -7389,12 +7424,12 @@ yyreduce:
 	yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (7)].c));
 #endif
       Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(2) - (7)].c)); Free((yyvsp[(6) - (7)].c));
-    ;}
+    }
     break;
 
   case 192:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2721 "Gmsh.y"
     {
 #if defined(HAVE_POST) && defined(HAVE_MESH)
@@ -7409,12 +7444,12 @@ yyreduce:
 	yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (7)].c));
 #endif
       Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(2) - (7)].c)); Free((yyvsp[(3) - (7)].c));
-    ;}
+    }
     break;
 
   case 193:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2736 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){
@@ -7433,12 +7468,12 @@ yyreduce:
       else
 	yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (3)].c));
       Free((yyvsp[(1) - (3)].c));
-    ;}
+    }
     break;
 
   case 194:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2755 "Gmsh.y"
     {
 #if defined(HAVE_PLUGINS)
@@ -7450,12 +7485,12 @@ yyreduce:
        }
 #endif
        Free((yyvsp[(3) - (7)].c)); Free((yyvsp[(6) - (7)].c));
-     ;}
+     }
     break;
 
   case 195:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2767 "Gmsh.y"
     {
 #if defined(HAVE_POST)
@@ -7479,103 +7514,103 @@ yyreduce:
 	yymsg(0, "Unknown 'Combine' command");
 #endif
       Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
   case 196:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2791 "Gmsh.y"
     {
       Msg::Exit(0);
-    ;}
+    }
     break;
 
   case 197:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2795 "Gmsh.y"
     {
       gmsh_yyerrorstate = 999; // this will be checked when yyparse returns
       YYABORT;
-    ;}
+    }
     break;
 
   case 198:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2800 "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
       // GModel directly during parsing.
       GModel::current()->importGEOInternals();
-    ;}
+    }
     break;
 
   case 199:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2807 "Gmsh.y"
     {
       CTX::instance()->forcedBBox = 0;
       GModel::current()->importGEOInternals();
       SetBoundingBox();
-    ;}
+    }
     break;
 
   case 200:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2813 "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));
-    ;}
+    }
     break;
 
   case 201:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2818 "Gmsh.y"
     {
 #if defined(HAVE_OPENGL)
       drawContext::global()->draw();
 #endif
-    ;}
+    }
     break;
 
   case 202:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2824 "Gmsh.y"
     {
       GModel::current()->createTopologyFromMesh();
-    ;}
+    }
     break;
 
   case 203:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2828 "Gmsh.y"
     {
       GModel::current()->createTopologyFromMesh(1);
-    ;}
+    }
     break;
 
   case 204:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2832 "Gmsh.y"
     {
       GModel::current()->importGEOInternals();
       GModel::current()->refineMesh(CTX::instance()->mesh.secondOrderLinear);
-    ;}
+    }
     break;
 
   case 205:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2842 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d);
@@ -7592,12 +7627,12 @@ yyreduce:
 	yymsg(0, "Reached maximum number of imbricated loops");
 	ImbricatedLoop = MAX_RECUR_LOOPS - 1;
       }
-    ;}
+    }
     break;
 
   case 206:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2859 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d);
@@ -7614,12 +7649,12 @@ yyreduce:
 	yymsg(0, "Reached maximum number of imbricated loops");
 	ImbricatedLoop = MAX_RECUR_LOOPS - 1;
       }
-    ;}
+    }
     break;
 
   case 207:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2876 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d);
@@ -7640,12 +7675,12 @@ yyreduce:
 	yymsg(0, "Reached maximum number of imbricated loops");
 	ImbricatedLoop = MAX_RECUR_LOOPS - 1;
       }
-    ;}
+    }
     break;
 
   case 208:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2897 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d);
@@ -7666,12 +7701,12 @@ yyreduce:
 	yymsg(0, "Reached maximum number of imbricated loops");
 	ImbricatedLoop = MAX_RECUR_LOOPS - 1;
       }
-    ;}
+    }
     break;
 
   case 209:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2918 "Gmsh.y"
     {
       if(ImbricatedLoop <= 0){
@@ -7706,12 +7741,12 @@ yyreduce:
 	else
 	  ImbricatedLoop--;
       }
-    ;}
+    }
     break;
 
   case 210:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2953 "Gmsh.y"
     {
       if(!FunctionManager::Instance()->createFunction
@@ -7719,52 +7754,52 @@ yyreduce:
 	yymsg(0, "Redefinition of function %s", (yyvsp[(2) - (2)].c));
       skip_until(NULL, "Return");
       //FIXME: wee leak $2
-    ;}
+    }
     break;
 
   case 211:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2961 "Gmsh.y"
     {
       if(!FunctionManager::Instance()->leaveFunction
          (&gmsh_yyin, gmsh_yyname, gmsh_yylineno))
 	yymsg(0, "Error while exiting function");
-    ;}
+    }
     break;
 
   case 212:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2967 "Gmsh.y"
     {
       if(!FunctionManager::Instance()->enterFunction
          ((yyvsp[(2) - (3)].c), &gmsh_yyin, gmsh_yyname, gmsh_yylineno))
 	yymsg(0, "Unknown function %s", (yyvsp[(2) - (3)].c));
       //FIXME: wee leak $2
-    ;}
+    }
     break;
 
   case 213:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2974 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (4)].d)) skip_until("If", "EndIf");
-    ;}
+    }
     break;
 
   case 214:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2978 "Gmsh.y"
     {
-    ;}
+    }
     break;
 
   case 215:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2987 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
@@ -7772,12 +7807,12 @@ yyreduce:
 		    (yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		    NULL, (yyval.l));
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
   case 216:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 2995 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
@@ -7785,12 +7820,12 @@ yyreduce:
 		    0., 0., 0., (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),
 		    NULL, (yyval.l));
       List_Delete((yyvsp[(10) - (11)].l));
-    ;}
+    }
     break;
 
   case 217:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3003 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
@@ -7798,22 +7833,22 @@ yyreduce:
 		    (yyvsp[(3) - (13)].v)[0], (yyvsp[(3) - (13)].v)[1], (yyvsp[(3) - (13)].v)[2], (yyvsp[(5) - (13)].v)[0], (yyvsp[(5) - (13)].v)[1], (yyvsp[(5) - (13)].v)[2], (yyvsp[(7) - (13)].v)[0], (yyvsp[(7) - (13)].v)[1], (yyvsp[(7) - (13)].v)[2], (yyvsp[(9) - (13)].d),
 		    NULL, (yyval.l));
       List_Delete((yyvsp[(12) - (13)].l));
-    ;}
+    }
     break;
 
   case 218:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3011 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
-    ;}
+    }
     break;
 
   case 219:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3016 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
@@ -7821,22 +7856,22 @@ yyreduce:
 		    (yyvsp[(2) - (7)].v)[0], (yyvsp[(2) - (7)].v)[1], (yyvsp[(2) - (7)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		    &extr, (yyval.l));
       List_Delete((yyvsp[(4) - (7)].l));
-    ;}
+    }
     break;
 
   case 220:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3024 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
-    ;}
+    }
     break;
 
   case 221:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3029 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
@@ -7844,22 +7879,22 @@ yyreduce:
 		    0., 0., 0., (yyvsp[(3) - (13)].v)[0], (yyvsp[(3) - (13)].v)[1], (yyvsp[(3) - (13)].v)[2], (yyvsp[(5) - (13)].v)[0], (yyvsp[(5) - (13)].v)[1], (yyvsp[(5) - (13)].v)[2], (yyvsp[(7) - (13)].d),
 		    &extr, (yyval.l));
       List_Delete((yyvsp[(10) - (13)].l));
-    ;}
+    }
     break;
 
   case 222:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3037 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
-    ;}
+    }
     break;
 
   case 223:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3042 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
@@ -7867,356 +7902,356 @@ yyreduce:
 		    (yyvsp[(3) - (15)].v)[0], (yyvsp[(3) - (15)].v)[1], (yyvsp[(3) - (15)].v)[2], (yyvsp[(5) - (15)].v)[0], (yyvsp[(5) - (15)].v)[1], (yyvsp[(5) - (15)].v)[2], (yyvsp[(7) - (15)].v)[0], (yyvsp[(7) - (15)].v)[1], (yyvsp[(7) - (15)].v)[2], (yyvsp[(9) - (15)].d),
 		    &extr, (yyval.l));
       List_Delete((yyvsp[(12) - (15)].l));
-    ;}
+    }
     break;
 
   case 224:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3050 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
-    ;}
+    }
     break;
 
   case 225:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3055 "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.,
 		    &extr, (yyval.l));
       List_Delete((yyvsp[(3) - (6)].l));
-    ;}
+    }
     break;
 
   case 226:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3063 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (8)].d),
 		   (yyvsp[(6) - (8)].v)[0], (yyvsp[(6) - (8)].v)[1], (yyvsp[(6) - (8)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
   case 227:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3070 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (8)].d),
 		   (yyvsp[(6) - (8)].v)[0], (yyvsp[(6) - (8)].v)[1], (yyvsp[(6) - (8)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
   case 228:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3077 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (8)].d),
 		   (yyvsp[(6) - (8)].v)[0], (yyvsp[(6) - (8)].v)[1], (yyvsp[(6) - (8)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
   case 229:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3084 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d),
 		   0., 0., 0., (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], (yyvsp[(8) - (12)].v)[0], (yyvsp[(8) - (12)].v)[1], (yyvsp[(8) - (12)].v)[2], (yyvsp[(10) - (12)].d),
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
   case 230:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3091 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d),
 		   0., 0., 0., (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], (yyvsp[(8) - (12)].v)[0], (yyvsp[(8) - (12)].v)[1], (yyvsp[(8) - (12)].v)[2], (yyvsp[(10) - (12)].d),
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
   case 231:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3098 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d),
 		   0., 0., 0., (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], (yyvsp[(8) - (12)].v)[0], (yyvsp[(8) - (12)].v)[1], (yyvsp[(8) - (12)].v)[2], (yyvsp[(10) - (12)].d),
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
   case 232:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3105 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (14)].d),
 		   (yyvsp[(6) - (14)].v)[0], (yyvsp[(6) - (14)].v)[1], (yyvsp[(6) - (14)].v)[2], (yyvsp[(8) - (14)].v)[0], (yyvsp[(8) - (14)].v)[1], (yyvsp[(8) - (14)].v)[2], (yyvsp[(10) - (14)].v)[0], (yyvsp[(10) - (14)].v)[1], (yyvsp[(10) - (14)].v)[2], (yyvsp[(12) - (14)].d),
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
   case 233:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3112 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (14)].d),
 		   (yyvsp[(6) - (14)].v)[0], (yyvsp[(6) - (14)].v)[1], (yyvsp[(6) - (14)].v)[2], (yyvsp[(8) - (14)].v)[0], (yyvsp[(8) - (14)].v)[1], (yyvsp[(8) - (14)].v)[2], (yyvsp[(10) - (14)].v)[0], (yyvsp[(10) - (14)].v)[1], (yyvsp[(10) - (14)].v)[2], (yyvsp[(12) - (14)].d),
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
   case 234:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3119 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (14)].d),
 		   (yyvsp[(6) - (14)].v)[0], (yyvsp[(6) - (14)].v)[1], (yyvsp[(6) - (14)].v)[2], (yyvsp[(8) - (14)].v)[0], (yyvsp[(8) - (14)].v)[1], (yyvsp[(8) - (14)].v)[2], (yyvsp[(10) - (14)].v)[0], (yyvsp[(10) - (14)].v)[1], (yyvsp[(10) - (14)].v)[2], (yyvsp[(12) - (14)].d),
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
   case 235:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3126 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
-    ;}
+    }
     break;
 
   case 236:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3131 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d),
 		   (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
   case 237:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3138 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
-    ;}
+    }
     break;
 
   case 238:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3143 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d),
 		   (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
   case 239:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3150 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
-    ;}
+    }
     break;
 
   case 240:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3155 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d),
 		   (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
   case 241:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3162 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
-    ;}
+    }
     break;
 
   case 242:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3167 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (16)].d),
 		   0., 0., 0., (yyvsp[(6) - (16)].v)[0], (yyvsp[(6) - (16)].v)[1], (yyvsp[(6) - (16)].v)[2], (yyvsp[(8) - (16)].v)[0], (yyvsp[(8) - (16)].v)[1], (yyvsp[(8) - (16)].v)[2], (yyvsp[(10) - (16)].d),
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
   case 243:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3174 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
-    ;}
+    }
     break;
 
   case 244:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3179 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (16)].d),
 		   0., 0., 0., (yyvsp[(6) - (16)].v)[0], (yyvsp[(6) - (16)].v)[1], (yyvsp[(6) - (16)].v)[2], (yyvsp[(8) - (16)].v)[0], (yyvsp[(8) - (16)].v)[1], (yyvsp[(8) - (16)].v)[2], (yyvsp[(10) - (16)].d),
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
   case 245:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3186 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
-    ;}
+    }
     break;
 
   case 246:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3191 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (16)].d),
 		   0., 0., 0., (yyvsp[(6) - (16)].v)[0], (yyvsp[(6) - (16)].v)[1], (yyvsp[(6) - (16)].v)[2], (yyvsp[(8) - (16)].v)[0], (yyvsp[(8) - (16)].v)[1], (yyvsp[(8) - (16)].v)[2], (yyvsp[(10) - (16)].d),
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
   case 247:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3198 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
-    ;}
+    }
     break;
 
   case 248:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3203 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (18)].d),
 		   (yyvsp[(6) - (18)].v)[0], (yyvsp[(6) - (18)].v)[1], (yyvsp[(6) - (18)].v)[2], (yyvsp[(8) - (18)].v)[0], (yyvsp[(8) - (18)].v)[1], (yyvsp[(8) - (18)].v)[2], (yyvsp[(10) - (18)].v)[0], (yyvsp[(10) - (18)].v)[1], (yyvsp[(10) - (18)].v)[2], (yyvsp[(12) - (18)].d),
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
   case 249:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3210 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
-    ;}
+    }
     break;
 
   case 250:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3215 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (18)].d),
 		   (yyvsp[(6) - (18)].v)[0], (yyvsp[(6) - (18)].v)[1], (yyvsp[(6) - (18)].v)[2], (yyvsp[(8) - (18)].v)[0], (yyvsp[(8) - (18)].v)[1], (yyvsp[(8) - (18)].v)[2], (yyvsp[(10) - (18)].v)[0], (yyvsp[(10) - (18)].v)[1], (yyvsp[(10) - (18)].v)[2], (yyvsp[(12) - (18)].d),
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
   case 251:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3222 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
-    ;}
+    }
     break;
 
   case 252:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3227 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (18)].d),
 		   (yyvsp[(6) - (18)].v)[0], (yyvsp[(6) - (18)].v)[1], (yyvsp[(6) - (18)].v)[2], (yyvsp[(8) - (18)].v)[0], (yyvsp[(8) - (18)].v)[1], (yyvsp[(8) - (18)].v)[2], (yyvsp[(10) - (18)].v)[0], (yyvsp[(10) - (18)].v)[1], (yyvsp[(10) - (18)].v)[2], (yyvsp[(12) - (18)].d),
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
   case 253:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3238 "Gmsh.y"
     {
-    ;}
+    }
     break;
 
   case 254:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3241 "Gmsh.y"
     {
-    ;}
+    }
     break;
 
   case 255:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3247 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = true;
@@ -8225,12 +8260,12 @@ yyreduce:
       extr.mesh.hLayer.clear();
       extr.mesh.NbElmLayer.push_back((int)fabs((yyvsp[(3) - (5)].d)));
       extr.mesh.hLayer.push_back(1.);
-    ;}
+    }
     break;
 
   case 256:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3256 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = true;
@@ -8250,12 +8285,12 @@ yyreduce:
 	yymsg(0, "Wrong layer definition {%d, %d}", List_Nbr((yyvsp[(3) - (7)].l)), List_Nbr((yyvsp[(5) - (7)].l)));
       List_Delete((yyvsp[(3) - (7)].l));
       List_Delete((yyvsp[(5) - (7)].l));
-    ;}
+    }
     break;
 
   case 257:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3276 "Gmsh.y"
     {
       yymsg(0, "Explicit region numbers in layers are deprecated");
@@ -8278,57 +8313,57 @@ yyreduce:
       List_Delete((yyvsp[(3) - (9)].l));
       List_Delete((yyvsp[(5) - (9)].l));
       List_Delete((yyvsp[(7) - (9)].l));
-    ;}
+    }
     break;
 
   case 258:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3299 "Gmsh.y"
     {
       extr.mesh.Recombine = true;
-    ;}
+    }
     break;
 
   case 259:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3303 "Gmsh.y"
     {
       extr.mesh.QuadToTri = QUADTRI_DBL_1;
-    ;}
+    }
     break;
 
   case 260:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3307 "Gmsh.y"
     {
       extr.mesh.QuadToTri = QUADTRI_DBL_1_RECOMB;
-    ;}
+    }
     break;
 
   case 261:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3311 "Gmsh.y"
     {
       extr.mesh.QuadToTri = QUADTRI_SNGL_1;
-    ;}
+    }
     break;
 
   case 262:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3315 "Gmsh.y"
     {
       extr.mesh.QuadToTri = QUADTRI_SNGL_1_RECOMB;
-    ;}
+    }
     break;
 
   case 263:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3319 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (9)].d);
@@ -8347,12 +8382,12 @@ yyreduce:
 	}
       }
       List_Delete((yyvsp[(6) - (9)].l));
-    ;}
+    }
     break;
 
   case 264:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3338 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (6)].c), "Index"))
@@ -8360,21 +8395,21 @@ yyreduce:
       else if(!strcmp((yyvsp[(2) - (6)].c), "View"))
         extr.mesh.ViewIndex = (yyvsp[(4) - (6)].d);
       Free((yyvsp[(2) - (6)].c));
-    ;}
+    }
     break;
 
   case 265:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3350 "Gmsh.y"
     {
       (yyval.v)[0] = (yyval.v)[1] = 1.;
-    ;}
+    }
     break;
 
   case 266:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3354 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (3)].c), "Progression") || !strcmp((yyvsp[(2) - (3)].c), "Power"))
@@ -8387,21 +8422,21 @@ yyreduce:
       }
       (yyval.v)[1] = (yyvsp[(3) - (3)].d);
       Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
   case 267:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3369 "Gmsh.y"
     {
       (yyval.i) = -1; // left
-    ;}
+    }
     break;
 
   case 268:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3373 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (1)].c), "Right"))
@@ -8411,48 +8446,48 @@ yyreduce:
       else // alternated
         (yyval.i) = 0;
       Free((yyvsp[(1) - (1)].c));
-    ;}
+    }
     break;
 
   case 269:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3385 "Gmsh.y"
     {
      (yyval.l) = List_Create(1, 1, sizeof(double));
-   ;}
+   }
     break;
 
   case 270:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3389 "Gmsh.y"
     {
      (yyval.l) = (yyvsp[(2) - (2)].l);
-   ;}
+   }
     break;
 
   case 271:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3394 "Gmsh.y"
     {
       (yyval.i) = 45;
-    ;}
+    }
     break;
 
   case 272:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3398 "Gmsh.y"
     {
       (yyval.i) = (int)(yyvsp[(2) - (2)].d);
-    ;}
+    }
     break;
 
   case 273:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3405 "Gmsh.y"
     {
       int type = (int)(yyvsp[(6) - (7)].v)[0];
@@ -8508,12 +8543,12 @@ yyreduce:
         }
         List_Delete((yyvsp[(3) - (7)].l));
       }
-    ;}
+    }
     break;
 
   case 274:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3461 "Gmsh.y"
     {
       int k = List_Nbr((yyvsp[(4) - (6)].l));
@@ -8583,22 +8618,22 @@ yyreduce:
         }
       }
       List_Delete((yyvsp[(4) - (6)].l));
-    ;}
+    }
     break;
 
   case 275:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3531 "Gmsh.y"
     {
       yymsg(1, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)");
       List_Delete((yyvsp[(7) - (8)].l));
-    ;}
+    }
     break;
 
   case 276:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3536 "Gmsh.y"
     {
       int k = List_Nbr((yyvsp[(4) - (5)].l));
@@ -8665,12 +8700,12 @@ yyreduce:
         }
       }
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
   case 277:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3603 "Gmsh.y"
     {
       if(!(yyvsp[(2) - (3)].l)){
@@ -8706,12 +8741,12 @@ yyreduce:
         }
         List_Delete((yyvsp[(2) - (3)].l));
       }
-    ;}
+    }
     break;
 
   case 278:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3639 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (7)].l)); i++){
@@ -8719,12 +8754,12 @@ yyreduce:
 	List_Read((yyvsp[(4) - (7)].l), i, &d);
 	CTX::instance()->mesh.algo2d_per_face[(int)d] = (int)(yyvsp[(6) - (7)].d);
       }
-    ;}
+    }
     break;
 
   case 279:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3648 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (5)].l)){
@@ -8767,12 +8802,12 @@ yyreduce:
         }
         List_Delete((yyvsp[(3) - (5)].l));
       }
-    ;}
+    }
     break;
 
   case 280:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3691 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){
@@ -8792,12 +8827,12 @@ yyreduce:
         }
       }
       List_Delete((yyvsp[(3) - (6)].l));
-    ;}
+    }
     break;
 
   case 281:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3716 "Gmsh.y"
     {
       if(List_Nbr((yyvsp[(5) - (6)].l)) != List_Nbr((yyvsp[(3) - (6)].l))){
@@ -8813,7 +8848,7 @@ yyreduce:
           int j_slave  = (int)d_slave;
           Curve *c_slave = FindCurve(abs(j_slave));
           if(c_slave){
-            c_slave->meshMaster = j_master;
+	    GModel::current()->getGEOInternals()->periodicEdges[j_slave] = j_master;
           }
           else{
             GEdge *ge = GModel::current()->getEdgeByTag(abs(j_slave));
@@ -8824,12 +8859,12 @@ yyreduce:
       }
       List_Delete((yyvsp[(3) - (6)].l));
       List_Delete((yyvsp[(5) - (6)].l));
-    ;}
+    }
     break;
 
   case 282:
 
-/* Line 1464 of yacc.c  */
+/* Line 1788 of yacc.c  */
 #line 3744 "Gmsh.y"
     {
       if (List_Nbr((yyvsp[(5) - (12)].l)) != List_Nbr((yyvsp[(10) - (12)].l))){
@@ -8841,11 +8876,12 @@ yyreduce:
         int j_slave = (int)(yyvsp[(3) - (12)].d);
         Surface *s_slave = FindSurface(abs(j_slave));
         if(s_slave){
-          s_slave->meshMaster = j_master;
+	  GModel::current()->getGEOInternals()->periodicFaces[j_slave] = j_master;
           for (int i = 0; i < List_Nbr((yyvsp[(5) - (12)].l)); i++){
             double dm, ds;
             List_Read((yyvsp[(5) - (12)].l), i, &ds);
             List_Read((yyvsp[(10) - (12)].l), i, &dm);
+	    GModel::current()->getGEOInternals()->periodicEdges[(int)ds] = (int)dm;
             s_slave->edgeCounterparts[(int)ds] = (int)dm;
           }
         }
@@ -8858,6 +8894,8 @@ yyreduce:
               List_Read((yyvsp[(5) - (12)].l), i, &ds);
               List_Read((yyvsp[(10) - (12)].l), i, &dm);
               gf->edgeCounterparts[(int)ds] = (int)dm;
+	      GEdge *ges = GModel::current()->getEdgeByTag(abs((int)ds));
+	      ges->setMeshMaster((int)dm);
             }
           }
           else yymsg(0, "Unknown surface %d", j_slave);
@@ -8865,13 +8903,13 @@ yyreduce:
       }
       List_Delete((yyvsp[(5) - (12)].l));
       List_Delete((yyvsp[(10) - (12)].l));
-    ;}
+    }
     break;
 
   case 283:
 
-/* Line 1464 of yacc.c  */
-#line 3787 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 3790 "Gmsh.y"
     {
       Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d));
       if(s){
@@ -8893,13 +8931,13 @@ yyreduce:
         else
           yymsg(0, "Unknown surface %d", (int)(yyvsp[(8) - (10)].d));
       }
-    ;}
+    }
     break;
 
   case 284:
 
-/* Line 1464 of yacc.c  */
-#line 3810 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 3813 "Gmsh.y"
     {
       Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d));
       if(s){
@@ -8921,38 +8959,38 @@ yyreduce:
         else
           yymsg(0, "Unknown surface %d", (int)(yyvsp[(8) - (10)].d));
       }
-    ;}
+    }
     break;
 
   case 285:
 
-/* Line 1464 of yacc.c  */
-#line 3833 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 3836 "Gmsh.y"
     {
-    ;}
+    }
     break;
 
   case 286:
 
-/* Line 1464 of yacc.c  */
-#line 3836 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 3839 "Gmsh.y"
     {
-    ;}
+    }
     break;
 
   case 287:
 
-/* Line 1464 of yacc.c  */
-#line 3845 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 3848 "Gmsh.y"
     {
       ReplaceAllDuplicates();
-    ;}
+    }
     break;
 
   case 288:
 
-/* Line 1464 of yacc.c  */
-#line 3849 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 3852 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (3)].c), "Geometry"))
         ReplaceAllDuplicates();
@@ -8961,13 +8999,13 @@ yyreduce:
       else
         yymsg(0, "Unknown coherence command");
       Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
   case 289:
 
-/* Line 1464 of yacc.c  */
-#line 3859 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 3862 "Gmsh.y"
     {
       if(List_Nbr((yyvsp[(4) - (6)].l)) >= 2){
         double d;
@@ -8996,37 +9034,37 @@ yyreduce:
         yymsg(0, "Need at least two points to merge");
       ReplaceAllDuplicates();
       List_Delete((yyvsp[(4) - (6)].l));
-    ;}
+    }
     break;
 
   case 290:
 
-/* Line 1464 of yacc.c  */
-#line 3893 "Gmsh.y"
-    { (yyval.c) = (char*)"Homology"; ;}
+/* Line 1788 of yacc.c  */
+#line 3896 "Gmsh.y"
+    { (yyval.c) = (char*)"Homology"; }
     break;
 
   case 291:
 
-/* Line 1464 of yacc.c  */
-#line 3894 "Gmsh.y"
-    { (yyval.c) = (char*)"Cohomology"; ;}
+/* Line 1788 of yacc.c  */
+#line 3897 "Gmsh.y"
+    { (yyval.c) = (char*)"Cohomology"; }
     break;
 
   case 292:
 
-/* Line 1464 of yacc.c  */
-#line 3899 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 3902 "Gmsh.y"
     {
       std::vector<int> domain, subdomain, dim;
       GModel::current()->addHomologyRequest((yyvsp[(1) - (2)].c), domain, subdomain, dim);
-    ;}
+    }
     break;
 
   case 293:
 
-/* Line 1464 of yacc.c  */
-#line 3904 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 3907 "Gmsh.y"
     {
       std::vector<int> domain, subdomain, dim;
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (5)].l)); i++){
@@ -9036,13 +9074,13 @@ yyreduce:
       }
       GModel::current()->addHomologyRequest((yyvsp[(1) - (5)].c), domain, subdomain, dim);
       List_Delete((yyvsp[(3) - (5)].l));
-    ;}
+    }
     break;
 
   case 294:
 
-/* Line 1464 of yacc.c  */
-#line 3915 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 3918 "Gmsh.y"
     {
       std::vector<int> domain, subdomain, dim;
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (7)].l)); i++){
@@ -9058,13 +9096,13 @@ yyreduce:
       GModel::current()->addHomologyRequest((yyvsp[(1) - (7)].c), domain, subdomain, dim);
       List_Delete((yyvsp[(3) - (7)].l));
       List_Delete((yyvsp[(5) - (7)].l));
-    ;}
+    }
     break;
 
   case 295:
 
-/* Line 1464 of yacc.c  */
-#line 3932 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 3935 "Gmsh.y"
     {
       std::vector<int> domain, subdomain, dim;
       for(int i = 0; i < List_Nbr((yyvsp[(6) - (10)].l)); i++){
@@ -9086,501 +9124,501 @@ yyreduce:
       List_Delete((yyvsp[(6) - (10)].l));
       List_Delete((yyvsp[(8) - (10)].l));
       List_Delete((yyvsp[(3) - (10)].l));
-    ;}
+    }
     break;
 
   case 296:
 
-/* Line 1464 of yacc.c  */
-#line 3959 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (1)].d);           ;}
+/* Line 1788 of yacc.c  */
+#line 3962 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (1)].d);           }
     break;
 
   case 297:
 
-/* Line 1464 of yacc.c  */
-#line 3960 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(2) - (3)].d);           ;}
+/* Line 1788 of yacc.c  */
+#line 3963 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(2) - (3)].d);           }
     break;
 
   case 298:
 
-/* Line 1464 of yacc.c  */
-#line 3961 "Gmsh.y"
-    { (yyval.d) = -(yyvsp[(2) - (2)].d);          ;}
+/* Line 1788 of yacc.c  */
+#line 3964 "Gmsh.y"
+    { (yyval.d) = -(yyvsp[(2) - (2)].d);          }
     break;
 
   case 299:
 
-/* Line 1464 of yacc.c  */
-#line 3962 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(2) - (2)].d);           ;}
+/* Line 1788 of yacc.c  */
+#line 3965 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(2) - (2)].d);           }
     break;
 
   case 300:
 
-/* Line 1464 of yacc.c  */
-#line 3963 "Gmsh.y"
-    { (yyval.d) = !(yyvsp[(2) - (2)].d);          ;}
+/* Line 1788 of yacc.c  */
+#line 3966 "Gmsh.y"
+    { (yyval.d) = !(yyvsp[(2) - (2)].d);          }
     break;
 
   case 301:
 
-/* Line 1464 of yacc.c  */
-#line 3964 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d);      ;}
+/* Line 1788 of yacc.c  */
+#line 3967 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d);      }
     break;
 
   case 302:
 
-/* Line 1464 of yacc.c  */
-#line 3965 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d);      ;}
+/* Line 1788 of yacc.c  */
+#line 3968 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d);      }
     break;
 
   case 303:
 
-/* Line 1464 of yacc.c  */
-#line 3966 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d);      ;}
+/* Line 1788 of yacc.c  */
+#line 3969 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d);      }
     break;
 
   case 304:
 
-/* Line 1464 of yacc.c  */
-#line 3968 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 3971 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (3)].d))
 	yymsg(0, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d));
       else
 	(yyval.d) = (yyvsp[(1) - (3)].d) / (yyvsp[(3) - (3)].d);
-    ;}
+    }
     break;
 
   case 305:
 
-/* Line 1464 of yacc.c  */
-#line 3974 "Gmsh.y"
-    { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d);  ;}
+/* Line 1788 of yacc.c  */
+#line 3977 "Gmsh.y"
+    { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d);  }
     break;
 
   case 306:
 
-/* Line 1464 of yacc.c  */
-#line 3975 "Gmsh.y"
-    { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d));  ;}
+/* Line 1788 of yacc.c  */
+#line 3978 "Gmsh.y"
+    { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d));  }
     break;
 
   case 307:
 
-/* Line 1464 of yacc.c  */
-#line 3976 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d);      ;}
+/* Line 1788 of yacc.c  */
+#line 3979 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d);      }
     break;
 
   case 308:
 
-/* Line 1464 of yacc.c  */
-#line 3977 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d);      ;}
+/* Line 1788 of yacc.c  */
+#line 3980 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d);      }
     break;
 
   case 309:
 
-/* Line 1464 of yacc.c  */
-#line 3978 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d);     ;}
+/* Line 1788 of yacc.c  */
+#line 3981 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d);     }
     break;
 
   case 310:
 
-/* Line 1464 of yacc.c  */
-#line 3979 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d);     ;}
+/* Line 1788 of yacc.c  */
+#line 3982 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d);     }
     break;
 
   case 311:
 
-/* Line 1464 of yacc.c  */
-#line 3980 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d);     ;}
+/* Line 1788 of yacc.c  */
+#line 3983 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d);     }
     break;
 
   case 312:
 
-/* Line 1464 of yacc.c  */
-#line 3981 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d);     ;}
+/* Line 1788 of yacc.c  */
+#line 3984 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d);     }
     break;
 
   case 313:
 
-/* Line 1464 of yacc.c  */
-#line 3982 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d);     ;}
+/* Line 1788 of yacc.c  */
+#line 3985 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d);     }
     break;
 
   case 314:
 
-/* Line 1464 of yacc.c  */
-#line 3983 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d);     ;}
+/* Line 1788 of yacc.c  */
+#line 3986 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d);     }
     break;
 
   case 315:
 
-/* Line 1464 of yacc.c  */
-#line 3984 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;}
+/* Line 1788 of yacc.c  */
+#line 3987 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); }
     break;
 
   case 316:
 
-/* Line 1464 of yacc.c  */
-#line 3985 "Gmsh.y"
-    { (yyval.d) = exp((yyvsp[(3) - (4)].d));      ;}
+/* Line 1788 of yacc.c  */
+#line 3988 "Gmsh.y"
+    { (yyval.d) = exp((yyvsp[(3) - (4)].d));      }
     break;
 
   case 317:
 
-/* Line 1464 of yacc.c  */
-#line 3986 "Gmsh.y"
-    { (yyval.d) = log((yyvsp[(3) - (4)].d));      ;}
+/* Line 1788 of yacc.c  */
+#line 3989 "Gmsh.y"
+    { (yyval.d) = log((yyvsp[(3) - (4)].d));      }
     break;
 
   case 318:
 
-/* Line 1464 of yacc.c  */
-#line 3987 "Gmsh.y"
-    { (yyval.d) = log10((yyvsp[(3) - (4)].d));    ;}
+/* Line 1788 of yacc.c  */
+#line 3990 "Gmsh.y"
+    { (yyval.d) = log10((yyvsp[(3) - (4)].d));    }
     break;
 
   case 319:
 
-/* Line 1464 of yacc.c  */
-#line 3988 "Gmsh.y"
-    { (yyval.d) = sqrt((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 3991 "Gmsh.y"
+    { (yyval.d) = sqrt((yyvsp[(3) - (4)].d));     }
     break;
 
   case 320:
 
-/* Line 1464 of yacc.c  */
-#line 3989 "Gmsh.y"
-    { (yyval.d) = sin((yyvsp[(3) - (4)].d));      ;}
+/* Line 1788 of yacc.c  */
+#line 3992 "Gmsh.y"
+    { (yyval.d) = sin((yyvsp[(3) - (4)].d));      }
     break;
 
   case 321:
 
-/* Line 1464 of yacc.c  */
-#line 3990 "Gmsh.y"
-    { (yyval.d) = asin((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 3993 "Gmsh.y"
+    { (yyval.d) = asin((yyvsp[(3) - (4)].d));     }
     break;
 
   case 322:
 
-/* Line 1464 of yacc.c  */
-#line 3991 "Gmsh.y"
-    { (yyval.d) = cos((yyvsp[(3) - (4)].d));      ;}
+/* Line 1788 of yacc.c  */
+#line 3994 "Gmsh.y"
+    { (yyval.d) = cos((yyvsp[(3) - (4)].d));      }
     break;
 
   case 323:
 
-/* Line 1464 of yacc.c  */
-#line 3992 "Gmsh.y"
-    { (yyval.d) = acos((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 3995 "Gmsh.y"
+    { (yyval.d) = acos((yyvsp[(3) - (4)].d));     }
     break;
 
   case 324:
 
-/* Line 1464 of yacc.c  */
-#line 3993 "Gmsh.y"
-    { (yyval.d) = tan((yyvsp[(3) - (4)].d));      ;}
+/* Line 1788 of yacc.c  */
+#line 3996 "Gmsh.y"
+    { (yyval.d) = tan((yyvsp[(3) - (4)].d));      }
     break;
 
   case 325:
 
-/* Line 1464 of yacc.c  */
-#line 3994 "Gmsh.y"
-    { (yyval.d) = atan((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 3997 "Gmsh.y"
+    { (yyval.d) = atan((yyvsp[(3) - (4)].d));     }
     break;
 
   case 326:
 
-/* Line 1464 of yacc.c  */
-#line 3995 "Gmsh.y"
-    { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;}
+/* Line 1788 of yacc.c  */
+#line 3998 "Gmsh.y"
+    { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));}
     break;
 
   case 327:
 
-/* Line 1464 of yacc.c  */
-#line 3996 "Gmsh.y"
-    { (yyval.d) = sinh((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 3999 "Gmsh.y"
+    { (yyval.d) = sinh((yyvsp[(3) - (4)].d));     }
     break;
 
   case 328:
 
-/* Line 1464 of yacc.c  */
-#line 3997 "Gmsh.y"
-    { (yyval.d) = cosh((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 4000 "Gmsh.y"
+    { (yyval.d) = cosh((yyvsp[(3) - (4)].d));     }
     break;
 
   case 329:
 
-/* Line 1464 of yacc.c  */
-#line 3998 "Gmsh.y"
-    { (yyval.d) = tanh((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 4001 "Gmsh.y"
+    { (yyval.d) = tanh((yyvsp[(3) - (4)].d));     }
     break;
 
   case 330:
 
-/* Line 1464 of yacc.c  */
-#line 3999 "Gmsh.y"
-    { (yyval.d) = fabs((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 4002 "Gmsh.y"
+    { (yyval.d) = fabs((yyvsp[(3) - (4)].d));     }
     break;
 
   case 331:
 
-/* Line 1464 of yacc.c  */
-#line 4000 "Gmsh.y"
-    { (yyval.d) = floor((yyvsp[(3) - (4)].d));    ;}
+/* Line 1788 of yacc.c  */
+#line 4003 "Gmsh.y"
+    { (yyval.d) = floor((yyvsp[(3) - (4)].d));    }
     break;
 
   case 332:
 
-/* Line 1464 of yacc.c  */
-#line 4001 "Gmsh.y"
-    { (yyval.d) = ceil((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 4004 "Gmsh.y"
+    { (yyval.d) = ceil((yyvsp[(3) - (4)].d));     }
     break;
 
   case 333:
 
-/* Line 1464 of yacc.c  */
-#line 4002 "Gmsh.y"
-    { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
+/* Line 1788 of yacc.c  */
+#line 4005 "Gmsh.y"
+    { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); }
     break;
 
   case 334:
 
-/* Line 1464 of yacc.c  */
-#line 4003 "Gmsh.y"
-    { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
+/* Line 1788 of yacc.c  */
+#line 4006 "Gmsh.y"
+    { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); }
     break;
 
   case 335:
 
-/* Line 1464 of yacc.c  */
-#line 4004 "Gmsh.y"
-    { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;}
+/* Line 1788 of yacc.c  */
+#line 4007 "Gmsh.y"
+    { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); }
     break;
 
   case 336:
 
-/* Line 1464 of yacc.c  */
-#line 4005 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;}
+/* Line 1788 of yacc.c  */
+#line 4008 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; }
     break;
 
   case 337:
 
-/* Line 1464 of yacc.c  */
-#line 4008 "Gmsh.y"
-    { (yyval.d) = exp((yyvsp[(3) - (4)].d));      ;}
+/* Line 1788 of yacc.c  */
+#line 4011 "Gmsh.y"
+    { (yyval.d) = exp((yyvsp[(3) - (4)].d));      }
     break;
 
   case 338:
 
-/* Line 1464 of yacc.c  */
-#line 4009 "Gmsh.y"
-    { (yyval.d) = log((yyvsp[(3) - (4)].d));      ;}
+/* Line 1788 of yacc.c  */
+#line 4012 "Gmsh.y"
+    { (yyval.d) = log((yyvsp[(3) - (4)].d));      }
     break;
 
   case 339:
 
-/* Line 1464 of yacc.c  */
-#line 4010 "Gmsh.y"
-    { (yyval.d) = log10((yyvsp[(3) - (4)].d));    ;}
+/* Line 1788 of yacc.c  */
+#line 4013 "Gmsh.y"
+    { (yyval.d) = log10((yyvsp[(3) - (4)].d));    }
     break;
 
   case 340:
 
-/* Line 1464 of yacc.c  */
-#line 4011 "Gmsh.y"
-    { (yyval.d) = sqrt((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 4014 "Gmsh.y"
+    { (yyval.d) = sqrt((yyvsp[(3) - (4)].d));     }
     break;
 
   case 341:
 
-/* Line 1464 of yacc.c  */
-#line 4012 "Gmsh.y"
-    { (yyval.d) = sin((yyvsp[(3) - (4)].d));      ;}
+/* Line 1788 of yacc.c  */
+#line 4015 "Gmsh.y"
+    { (yyval.d) = sin((yyvsp[(3) - (4)].d));      }
     break;
 
   case 342:
 
-/* Line 1464 of yacc.c  */
-#line 4013 "Gmsh.y"
-    { (yyval.d) = asin((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 4016 "Gmsh.y"
+    { (yyval.d) = asin((yyvsp[(3) - (4)].d));     }
     break;
 
   case 343:
 
-/* Line 1464 of yacc.c  */
-#line 4014 "Gmsh.y"
-    { (yyval.d) = cos((yyvsp[(3) - (4)].d));      ;}
+/* Line 1788 of yacc.c  */
+#line 4017 "Gmsh.y"
+    { (yyval.d) = cos((yyvsp[(3) - (4)].d));      }
     break;
 
   case 344:
 
-/* Line 1464 of yacc.c  */
-#line 4015 "Gmsh.y"
-    { (yyval.d) = acos((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 4018 "Gmsh.y"
+    { (yyval.d) = acos((yyvsp[(3) - (4)].d));     }
     break;
 
   case 345:
 
-/* Line 1464 of yacc.c  */
-#line 4016 "Gmsh.y"
-    { (yyval.d) = tan((yyvsp[(3) - (4)].d));      ;}
+/* Line 1788 of yacc.c  */
+#line 4019 "Gmsh.y"
+    { (yyval.d) = tan((yyvsp[(3) - (4)].d));      }
     break;
 
   case 346:
 
-/* Line 1464 of yacc.c  */
-#line 4017 "Gmsh.y"
-    { (yyval.d) = atan((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 4020 "Gmsh.y"
+    { (yyval.d) = atan((yyvsp[(3) - (4)].d));     }
     break;
 
   case 347:
 
-/* Line 1464 of yacc.c  */
-#line 4018 "Gmsh.y"
-    { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;}
+/* Line 1788 of yacc.c  */
+#line 4021 "Gmsh.y"
+    { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));}
     break;
 
   case 348:
 
-/* Line 1464 of yacc.c  */
-#line 4019 "Gmsh.y"
-    { (yyval.d) = sinh((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 4022 "Gmsh.y"
+    { (yyval.d) = sinh((yyvsp[(3) - (4)].d));     }
     break;
 
   case 349:
 
-/* Line 1464 of yacc.c  */
-#line 4020 "Gmsh.y"
-    { (yyval.d) = cosh((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 4023 "Gmsh.y"
+    { (yyval.d) = cosh((yyvsp[(3) - (4)].d));     }
     break;
 
   case 350:
 
-/* Line 1464 of yacc.c  */
-#line 4021 "Gmsh.y"
-    { (yyval.d) = tanh((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 4024 "Gmsh.y"
+    { (yyval.d) = tanh((yyvsp[(3) - (4)].d));     }
     break;
 
   case 351:
 
-/* Line 1464 of yacc.c  */
-#line 4022 "Gmsh.y"
-    { (yyval.d) = fabs((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 4025 "Gmsh.y"
+    { (yyval.d) = fabs((yyvsp[(3) - (4)].d));     }
     break;
 
   case 352:
 
-/* Line 1464 of yacc.c  */
-#line 4023 "Gmsh.y"
-    { (yyval.d) = floor((yyvsp[(3) - (4)].d));    ;}
+/* Line 1788 of yacc.c  */
+#line 4026 "Gmsh.y"
+    { (yyval.d) = floor((yyvsp[(3) - (4)].d));    }
     break;
 
   case 353:
 
-/* Line 1464 of yacc.c  */
-#line 4024 "Gmsh.y"
-    { (yyval.d) = ceil((yyvsp[(3) - (4)].d));     ;}
+/* Line 1788 of yacc.c  */
+#line 4027 "Gmsh.y"
+    { (yyval.d) = ceil((yyvsp[(3) - (4)].d));     }
     break;
 
   case 354:
 
-/* Line 1464 of yacc.c  */
-#line 4025 "Gmsh.y"
-    { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
+/* Line 1788 of yacc.c  */
+#line 4028 "Gmsh.y"
+    { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); }
     break;
 
   case 355:
 
-/* Line 1464 of yacc.c  */
-#line 4026 "Gmsh.y"
-    { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
+/* Line 1788 of yacc.c  */
+#line 4029 "Gmsh.y"
+    { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); }
     break;
 
   case 356:
 
-/* Line 1464 of yacc.c  */
-#line 4027 "Gmsh.y"
-    { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;}
+/* Line 1788 of yacc.c  */
+#line 4030 "Gmsh.y"
+    { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); }
     break;
 
   case 357:
 
-/* Line 1464 of yacc.c  */
-#line 4028 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;}
+/* Line 1788 of yacc.c  */
+#line 4031 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; }
     break;
 
   case 358:
 
-/* Line 1464 of yacc.c  */
-#line 4037 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (1)].d); ;}
+/* Line 1788 of yacc.c  */
+#line 4040 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (1)].d); }
     break;
 
   case 359:
 
-/* Line 1464 of yacc.c  */
-#line 4038 "Gmsh.y"
-    { (yyval.d) = 3.141592653589793; ;}
+/* Line 1788 of yacc.c  */
+#line 4041 "Gmsh.y"
+    { (yyval.d) = 3.141592653589793; }
     break;
 
   case 360:
 
-/* Line 1464 of yacc.c  */
-#line 4039 "Gmsh.y"
-    { (yyval.d) = Msg::GetCommRank(); ;}
+/* Line 1788 of yacc.c  */
+#line 4042 "Gmsh.y"
+    { (yyval.d) = Msg::GetCommRank(); }
     break;
 
   case 361:
 
-/* Line 1464 of yacc.c  */
-#line 4040 "Gmsh.y"
-    { (yyval.d) = Msg::GetCommSize(); ;}
+/* Line 1788 of yacc.c  */
+#line 4043 "Gmsh.y"
+    { (yyval.d) = Msg::GetCommSize(); }
     break;
 
   case 362:
 
-/* Line 1464 of yacc.c  */
-#line 4041 "Gmsh.y"
-    { (yyval.d) = GetGmshMajorVersion(); ;}
+/* Line 1788 of yacc.c  */
+#line 4044 "Gmsh.y"
+    { (yyval.d) = GetGmshMajorVersion(); }
     break;
 
   case 363:
 
-/* Line 1464 of yacc.c  */
-#line 4042 "Gmsh.y"
-    { (yyval.d) = GetGmshMinorVersion(); ;}
+/* Line 1788 of yacc.c  */
+#line 4045 "Gmsh.y"
+    { (yyval.d) = GetGmshMinorVersion(); }
     break;
 
   case 364:
 
-/* Line 1464 of yacc.c  */
-#line 4043 "Gmsh.y"
-    { (yyval.d) = GetGmshPatchVersion(); ;}
+/* Line 1788 of yacc.c  */
+#line 4046 "Gmsh.y"
+    { (yyval.d) = GetGmshPatchVersion(); }
     break;
 
   case 365:
 
-/* Line 1464 of yacc.c  */
-#line 4048 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4051 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (1)].c))){
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (1)].c));
@@ -9596,13 +9634,13 @@ yyreduce:
           (yyval.d) = s.value[0];
       }
       Free((yyvsp[(1) - (1)].c));
-    ;}
+    }
     break;
 
   case 366:
 
-/* Line 1464 of yacc.c  */
-#line 4069 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4072 "Gmsh.y"
     {
       char tmpstring[1024];
       sprintf(tmpstring, "%s_%d", (yyvsp[(1) - (5)].c), (int)(yyvsp[(4) - (5)].d)) ;
@@ -9620,13 +9658,13 @@ yyreduce:
           (yyval.d) = s.value[0];
       }
       Free((yyvsp[(1) - (5)].c));
-    ;}
+    }
     break;
 
   case 367:
 
-/* Line 1464 of yacc.c  */
-#line 4088 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4091 "Gmsh.y"
     {
       int index = (int)(yyvsp[(3) - (4)].d);
       if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){
@@ -9643,13 +9681,13 @@ yyreduce:
           (yyval.d) = s.value[index];
       }
       Free((yyvsp[(1) - (4)].c));
-    ;}
+    }
     break;
 
   case 368:
 
-/* Line 1464 of yacc.c  */
-#line 4106 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4109 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(2) - (4)].c));
@@ -9660,13 +9698,13 @@ yyreduce:
 	(yyval.d) = s.value.size();
       }
       Free((yyvsp[(2) - (4)].c));
-    ;}
+    }
     break;
 
   case 369:
 
-/* Line 1464 of yacc.c  */
-#line 4118 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4121 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (2)].c));
@@ -9682,13 +9720,13 @@ yyreduce:
           (yyval.d) = (s.value[0] += (yyvsp[(2) - (2)].i));
       }
       Free((yyvsp[(1) - (2)].c));
-    ;}
+    }
     break;
 
   case 370:
 
-/* Line 1464 of yacc.c  */
-#line 4135 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4138 "Gmsh.y"
     {
       int index = (int)(yyvsp[(3) - (5)].d);
       if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){
@@ -9705,33 +9743,33 @@ yyreduce:
           (yyval.d) = (s.value[index] += (yyvsp[(5) - (5)].i));
       }
       Free((yyvsp[(1) - (5)].c));
-    ;}
+    }
     break;
 
   case 371:
 
-/* Line 1464 of yacc.c  */
-#line 4156 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4159 "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 372:
 
-/* Line 1464 of yacc.c  */
-#line 4161 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4164 "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 373:
 
-/* Line 1464 of yacc.c  */
-#line 4166 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4169 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (4)].c), 0, (yyvsp[(3) - (4)].c), d)){
@@ -9740,13 +9778,13 @@ yyreduce:
 	(yyval.d) = d;
       }
       Free((yyvsp[(1) - (4)].c)); Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
   case 374:
 
-/* Line 1464 of yacc.c  */
-#line 4176 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4179 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c), d)){
@@ -9755,23 +9793,23 @@ yyreduce:
 	(yyval.d) = d;
       }
       Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(6) - (7)].c));
-    ;}
+    }
     break;
 
   case 375:
 
-/* Line 1464 of yacc.c  */
-#line 4186 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4189 "Gmsh.y"
     {
       (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d));
       Free((yyvsp[(3) - (6)].c));
-    ;}
+    }
     break;
 
   case 376:
 
-/* Line 1464 of yacc.c  */
-#line 4191 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4194 "Gmsh.y"
     {
       std::string s((yyvsp[(3) - (6)].c)), substr((yyvsp[(5) - (6)].c));
       if(s.find(substr) != std::string::npos)
@@ -9779,186 +9817,186 @@ yyreduce:
       else
         (yyval.d) = 0.;
       Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c));
-    ;}
+    }
     break;
 
   case 377:
 
-/* Line 1464 of yacc.c  */
-#line 4203 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4206 "Gmsh.y"
     {
       memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double));
-    ;}
+    }
     break;
 
   case 378:
 
-/* Line 1464 of yacc.c  */
-#line 4207 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4210 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i];
-    ;}
+    }
     break;
 
   case 379:
 
-/* Line 1464 of yacc.c  */
-#line 4211 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4214 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i];
-    ;}
+    }
     break;
 
   case 380:
 
-/* Line 1464 of yacc.c  */
-#line 4215 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4218 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i];
-    ;}
+    }
     break;
 
   case 381:
 
-/* Line 1464 of yacc.c  */
-#line 4219 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4222 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i];
-    ;}
+    }
     break;
 
   case 382:
 
-/* Line 1464 of yacc.c  */
-#line 4226 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4229 "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 383:
 
-/* Line 1464 of yacc.c  */
-#line 4230 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4233 "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 384:
 
-/* Line 1464 of yacc.c  */
-#line 4234 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4237 "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 385:
 
-/* Line 1464 of yacc.c  */
-#line 4238 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4241 "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 386:
 
-/* Line 1464 of yacc.c  */
-#line 4245 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4248 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(List_T*));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].l)));
-    ;}
+    }
     break;
 
   case 387:
 
-/* Line 1464 of yacc.c  */
-#line 4250 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4253 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].l)));
-    ;}
+    }
     break;
 
   case 388:
 
-/* Line 1464 of yacc.c  */
-#line 4257 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4260 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
-    ;}
+    }
     break;
 
   case 389:
 
-/* Line 1464 of yacc.c  */
-#line 4262 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4265 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(1) - (1)].l);
-    ;}
+    }
     break;
 
   case 390:
 
-/* Line 1464 of yacc.c  */
-#line 4266 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4269 "Gmsh.y"
     {
       // creates an empty list
       (yyval.l) = List_Create(2, 1, sizeof(double));
-    ;}
+    }
     break;
 
   case 391:
 
-/* Line 1464 of yacc.c  */
-#line 4271 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4274 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (3)].l);
-    ;}
+    }
     break;
 
   case 392:
 
-/* Line 1464 of yacc.c  */
-#line 4275 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4278 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(3) - (4)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
 	double *pd = (double*)List_Pointer((yyval.l), i);
 	(*pd) = - (*pd);
       }
-    ;}
+    }
     break;
 
   case 393:
 
-/* Line 1464 of yacc.c  */
-#line 4283 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4286 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(4) - (5)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
 	double *pd = (double*)List_Pointer((yyval.l), i);
 	(*pd) *= (yyvsp[(1) - (5)].d);
       }
-    ;}
+    }
     break;
 
   case 394:
 
-/* Line 1464 of yacc.c  */
-#line 4294 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4297 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(1) - (1)].l);
-    ;}
+    }
     break;
 
   case 395:
 
-/* Line 1464 of yacc.c  */
-#line 4298 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4301 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all"))
         (yyval.l) = 0;
@@ -9966,51 +10004,51 @@ yyreduce:
         yyerror("Unknown special string for list replacement");
         (yyval.l) = List_Create(2, 1, sizeof(double));
       }
-    ;}
+    }
     break;
 
   case 396:
 
-/* Line 1464 of yacc.c  */
-#line 4310 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4313 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (2)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
 	double *pd = (double*)List_Pointer((yyval.l), i);
 	(*pd) = - (*pd);
       }
-    ;}
+    }
     break;
 
   case 397:
 
-/* Line 1464 of yacc.c  */
-#line 4318 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4321 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(3) - (3)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
 	double *pd = (double*)List_Pointer((yyval.l), i);
 	(*pd) *= (yyvsp[(1) - (3)].d);
       }
-    ;}
+    }
     break;
 
   case 398:
 
-/* Line 1464 of yacc.c  */
-#line 4326 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4329 "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));
           ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d += 1.) : (d -= 1.))
 	List_Add((yyval.l), &d);
-    ;}
+    }
     break;
 
   case 399:
 
-/* Line 1464 of yacc.c  */
-#line 4333 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4336 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!(yyvsp[(5) - (5)].d) || ((yyvsp[(1) - (5)].d) < (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) < 0) || ((yyvsp[(1) - (5)].d) > (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) > 0)){
@@ -10020,13 +10058,13 @@ yyreduce:
       else
 	for(double d = (yyvsp[(1) - (5)].d); ((yyvsp[(5) - (5)].d) > 0) ? (d <= (yyvsp[(3) - (5)].d)) : (d >= (yyvsp[(3) - (5)].d)); d += (yyvsp[(5) - (5)].d))
 	  List_Add((yyval.l), &d);
-   ;}
+   }
     break;
 
   case 400:
 
-/* Line 1464 of yacc.c  */
-#line 4344 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4347 "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
@@ -10045,49 +10083,49 @@ yyreduce:
 	List_Add((yyval.l), &v->Pos.Y);
 	List_Add((yyval.l), &v->Pos.Z);
       }
-    ;}
+    }
     break;
 
   case 401:
 
-/* Line 1464 of yacc.c  */
-#line 4364 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4367 "Gmsh.y"
     {
       (yyval.l) = GetAllEntityNumbers(0);
-    ;}
+    }
     break;
 
   case 402:
 
-/* Line 1464 of yacc.c  */
-#line 4368 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4371 "Gmsh.y"
     {
       (yyval.l) = GetAllEntityNumbers(1);
-    ;}
+    }
     break;
 
   case 403:
 
-/* Line 1464 of yacc.c  */
-#line 4372 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4375 "Gmsh.y"
     {
       (yyval.l) = GetAllEntityNumbers(2);
-    ;}
+    }
     break;
 
   case 404:
 
-/* Line 1464 of yacc.c  */
-#line 4376 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4379 "Gmsh.y"
     {
       (yyval.l) = GetAllEntityNumbers(3);
-    ;}
+    }
     break;
 
   case 405:
 
-/* Line 1464 of yacc.c  */
-#line 4380 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4383 "Gmsh.y"
     {
       (yyval.l) = List_Create(10, 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
@@ -10104,13 +10142,13 @@ yyreduce:
         }
       }
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
   case 406:
 
-/* Line 1464 of yacc.c  */
-#line 4398 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4401 "Gmsh.y"
     {
       (yyval.l) = List_Create(10, 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
@@ -10127,13 +10165,13 @@ yyreduce:
         }
       }
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
   case 407:
 
-/* Line 1464 of yacc.c  */
-#line 4416 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4419 "Gmsh.y"
     {
       (yyval.l) = List_Create(10, 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
@@ -10150,13 +10188,13 @@ yyreduce:
         }
       }
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
   case 408:
 
-/* Line 1464 of yacc.c  */
-#line 4434 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4437 "Gmsh.y"
     {
       (yyval.l) = List_Create(10, 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
@@ -10173,13 +10211,13 @@ yyreduce:
         }
       }
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
   case 409:
 
-/* Line 1464 of yacc.c  */
-#line 4452 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4455 "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++){
@@ -10188,13 +10226,13 @@ yyreduce:
 	List_Add((yyval.l), &d);
       }
       List_Delete((yyvsp[(1) - (1)].l));
-    ;}
+    }
     break;
 
   case 410:
 
-/* Line 1464 of yacc.c  */
-#line 4462 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4465 "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++){
@@ -10203,13 +10241,13 @@ yyreduce:
 	List_Add((yyval.l), &d);
       }
       List_Delete((yyvsp[(1) - (1)].l));
-    ;}
+    }
     break;
 
   case 411:
 
-/* Line 1464 of yacc.c  */
-#line 4472 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4475 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
@@ -10220,13 +10258,13 @@ yyreduce:
 	  List_Add((yyval.l), &s.value[i]);
       }
       Free((yyvsp[(1) - (3)].c));
-    ;}
+    }
     break;
 
   case 412:
 
-/* Line 1464 of yacc.c  */
-#line 4485 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4488 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
@@ -10237,13 +10275,13 @@ yyreduce:
 	  List_Add((yyval.l), &s.value[i]);
       }
       Free((yyvsp[(1) - (3)].c));
-    ;}
+    }
     break;
 
   case 413:
 
-/* Line 1464 of yacc.c  */
-#line 4497 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4500 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(3) - (4)].c)))
@@ -10254,13 +10292,13 @@ yyreduce:
 	  List_Add((yyval.l), &s.value[i]);
       }
       Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
   case 414:
 
-/* Line 1464 of yacc.c  */
-#line 4509 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4512 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
@@ -10277,13 +10315,13 @@ yyreduce:
       }
       Free((yyvsp[(1) - (6)].c));
       List_Delete((yyvsp[(4) - (6)].l));
-    ;}
+    }
     break;
 
   case 415:
 
-/* Line 1464 of yacc.c  */
-#line 4528 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4531 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
@@ -10300,41 +10338,41 @@ yyreduce:
       }
       Free((yyvsp[(1) - (6)].c));
       List_Delete((yyvsp[(4) - (6)].l));
-    ;}
+    }
     break;
 
   case 416:
 
-/* Line 1464 of yacc.c  */
-#line 4549 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4552 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
-    ;}
+    }
     break;
 
   case 417:
 
-/* Line 1464 of yacc.c  */
-#line 4554 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4557 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(1) - (1)].l);
-    ;}
+    }
     break;
 
   case 418:
 
-/* Line 1464 of yacc.c  */
-#line 4558 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4561 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].d)));
-    ;}
+    }
     break;
 
   case 419:
 
-/* Line 1464 of yacc.c  */
-#line 4562 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4565 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){
 	double d;
@@ -10342,64 +10380,64 @@ yyreduce:
 	List_Add((yyval.l), &d);
       }
       List_Delete((yyvsp[(3) - (3)].l));
-    ;}
+    }
     break;
 
   case 420:
 
-/* Line 1464 of yacc.c  */
-#line 4574 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4577 "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 421:
 
-/* Line 1464 of yacc.c  */
-#line 4578 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4581 "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 422:
 
-/* Line 1464 of yacc.c  */
-#line 4590 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4593 "Gmsh.y"
     {
       int flag;
       (yyval.u) = GetColorForString(-1, (yyvsp[(1) - (1)].c), &flag);
       if(flag) yymsg(0, "Unknown color '%s'", (yyvsp[(1) - (1)].c));
       Free((yyvsp[(1) - (1)].c));
-    ;}
+    }
     break;
 
   case 423:
 
-/* Line 1464 of yacc.c  */
-#line 4597 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4600 "Gmsh.y"
     {
       unsigned int val = 0;
       ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val);
       (yyval.u) = val;
       Free((yyvsp[(1) - (5)].c)); Free((yyvsp[(5) - (5)].c));
-    ;}
+    }
     break;
 
   case 424:
 
-/* Line 1464 of yacc.c  */
-#line 4607 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4610 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (3)].l);
-    ;}
+    }
     break;
 
   case 425:
 
-/* Line 1464 of yacc.c  */
-#line 4611 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4614 "Gmsh.y"
     {
       (yyval.l) = List_Create(256, 10, sizeof(unsigned int));
       GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (6)].d));
@@ -10410,41 +10448,41 @@ yyreduce:
 	  List_Add((yyval.l), &ct->table[i]);
       }
       Free((yyvsp[(1) - (6)].c));
-    ;}
+    }
     break;
 
   case 426:
 
-/* Line 1464 of yacc.c  */
-#line 4626 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4629 "Gmsh.y"
     {
       (yyval.l) = List_Create(256, 10, sizeof(unsigned int));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].u)));
-    ;}
+    }
     break;
 
   case 427:
 
-/* Line 1464 of yacc.c  */
-#line 4631 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4634 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].u)));
-    ;}
+    }
     break;
 
   case 428:
 
-/* Line 1464 of yacc.c  */
-#line 4638 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4641 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(1) - (1)].c);
-    ;}
+    }
     break;
 
   case 429:
 
-/* Line 1464 of yacc.c  */
-#line 4642 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4645 "Gmsh.y"
     {
       if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){
 	yymsg(0, "Unknown string variable '%s'", (yyvsp[(1) - (1)].c));
@@ -10456,100 +10494,100 @@ yyreduce:
 	strcpy((yyval.c), val.c_str());
 	Free((yyvsp[(1) - (1)].c));
       }
-    ;}
+    }
     break;
 
   case 430:
 
-/* Line 1464 of yacc.c  */
-#line 4655 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4658 "Gmsh.y"
     {
       std::string out;
       StringOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), out);
       (yyval.c) = (char*)Malloc((out.size() + 1) * sizeof(char));
       strcpy((yyval.c), out.c_str());
       Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c));
-    ;}
+    }
     break;
 
   case 431:
 
-/* Line 1464 of yacc.c  */
-#line 4663 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4666 "Gmsh.y"
     {
       std::string out;
       StringOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), out);
       (yyval.c) = (char*)Malloc((out.size() + 1) * sizeof(char));
       strcpy((yyval.c), out.c_str());
       Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c));
-    ;}
+    }
     break;
 
   case 432:
 
-/* Line 1464 of yacc.c  */
-#line 4674 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4677 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(1) - (1)].c);
-    ;}
+    }
     break;
 
   case 433:
 
-/* Line 1464 of yacc.c  */
-#line 4678 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4681 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc(32 * sizeof(char));
       time_t now;
       time(&now);
       strcpy((yyval.c), ctime(&now));
       (yyval.c)[strlen((yyval.c)) - 1] = '\0';
-    ;}
+    }
     break;
 
   case 434:
 
-/* Line 1464 of yacc.c  */
-#line 4686 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4689 "Gmsh.y"
     {
       const char *env = GetEnvironmentVar((yyvsp[(3) - (4)].c));
       if(!env) env = "";
       (yyval.c) = (char *)Malloc((sizeof(env) + 1) * sizeof(char));
       strcpy((yyval.c), env);
       Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
   case 435:
 
-/* Line 1464 of yacc.c  */
-#line 4694 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4697 "Gmsh.y"
     {
       std::string s = Msg::GetString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c));
       (yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char));
       strcpy((yyval.c), s.c_str());
       Free((yyvsp[(3) - (6)].c));
       Free((yyvsp[(5) - (6)].c));
-    ;}
+    }
     break;
 
   case 436:
 
-/* Line 1464 of yacc.c  */
-#line 4702 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4705 "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));
       strcat((yyval.c), (yyvsp[(5) - (6)].c));
       Free((yyvsp[(3) - (6)].c));
       Free((yyvsp[(5) - (6)].c));
-    ;}
+    }
     break;
 
   case 437:
 
-/* Line 1464 of yacc.c  */
-#line 4710 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4713 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char));
       int i;
@@ -10562,13 +10600,13 @@ yyreduce:
       }
       if(i <= 0) strcpy((yyval.c), (yyvsp[(3) - (4)].c));
       Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
   case 438:
 
-/* Line 1464 of yacc.c  */
-#line 4724 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4727 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char));
       int i;
@@ -10581,22 +10619,22 @@ yyreduce:
       else
 	strcpy((yyval.c), &(yyvsp[(3) - (4)].c)[i+1]);
       Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
   case 439:
 
-/* Line 1464 of yacc.c  */
-#line 4738 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4741 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(3) - (4)].c);
-    ;}
+    }
     break;
 
   case 440:
 
-/* Line 1464 of yacc.c  */
-#line 4742 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4745 "Gmsh.y"
     {
       char tmpstring[5000];
       int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring);
@@ -10614,32 +10652,43 @@ yyreduce:
 	Free((yyvsp[(3) - (6)].c));
       }
       List_Delete((yyvsp[(5) - (6)].l));
-    ;}
+    }
     break;
 
   case 441:
 
-/* Line 1464 of yacc.c  */
-#line 4764 "Gmsh.y"
+/* Line 1788 of yacc.c  */
+#line 4767 "Gmsh.y"
     {
       (yyval.l) = List_Create(20,20,sizeof(char*));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].c)));
-    ;}
+    }
     break;
 
   case 442:
 
-/* Line 1464 of yacc.c  */
-#line 4769 "Gmsh.y"
-    { List_Add((yyval.l), &((yyvsp[(3) - (3)].c))); ;}
+/* Line 1788 of yacc.c  */
+#line 4772 "Gmsh.y"
+    { List_Add((yyval.l), &((yyvsp[(3) - (3)].c))); }
     break;
 
 
 
-/* Line 1464 of yacc.c  */
-#line 10641 "Gmsh.tab.cpp"
+/* Line 1788 of yacc.c  */
+#line 10679 "Gmsh.tab.cpp"
       default: break;
     }
+  /* User semantic actions sometimes alter yychar, and that requires
+     that yytoken be updated with the new translation.  We take the
+     approach of translating immediately before every use of yytoken.
+     One alternative is translating here after every semantic action,
+     but that translation would be missed if the semantic action invokes
+     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
+     incorrect destructor might then be invoked immediately.  In the
+     case of YYERROR or YYBACKUP, subsequent parser actions might lead
+     to an incorrect destructor call or verbose syntax error message
+     before the lookahead is translated.  */
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
 
   YYPOPSTACK (yylen);
@@ -10667,6 +10716,10 @@ yyreduce:
 | yyerrlab -- here on detecting error |
 `------------------------------------*/
 yyerrlab:
+  /* Make sure we have latest lookahead translation.  See comments at
+     user semantic actions for why this is necessary.  */
+  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
   /* If not already recovering from an error, report this error.  */
   if (!yyerrstatus)
     {
@@ -10674,37 +10727,36 @@ yyerrlab:
 #if ! YYERROR_VERBOSE
       yyerror (YY_("syntax error"));
 #else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+                                        yyssp, yytoken)
       {
-	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
-	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
-	  {
-	    YYSIZE_T yyalloc = 2 * yysize;
-	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
-	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
-	    if (yymsg != yymsgbuf)
-	      YYSTACK_FREE (yymsg);
-	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
-	    if (yymsg)
-	      yymsg_alloc = yyalloc;
-	    else
-	      {
-		yymsg = yymsgbuf;
-		yymsg_alloc = sizeof yymsgbuf;
-	      }
-	  }
-
-	if (0 < yysize && yysize <= yymsg_alloc)
-	  {
-	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (yymsg);
-	  }
-	else
-	  {
-	    yyerror (YY_("syntax error"));
-	    if (yysize != 0)
-	      goto yyexhaustedlab;
-	  }
+        char const *yymsgp = YY_("syntax error");
+        int yysyntax_error_status;
+        yysyntax_error_status = YYSYNTAX_ERROR;
+        if (yysyntax_error_status == 0)
+          yymsgp = yymsg;
+        else if (yysyntax_error_status == 1)
+          {
+            if (yymsg != yymsgbuf)
+              YYSTACK_FREE (yymsg);
+            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+            if (!yymsg)
+              {
+                yymsg = yymsgbuf;
+                yymsg_alloc = sizeof yymsgbuf;
+                yysyntax_error_status = 2;
+              }
+            else
+              {
+                yysyntax_error_status = YYSYNTAX_ERROR;
+                yymsgp = yymsg;
+              }
+          }
+        yyerror (yymsgp);
+        if (yysyntax_error_status == 2)
+          goto yyexhaustedlab;
       }
+# undef YYSYNTAX_ERROR
 #endif
     }
 
@@ -10763,7 +10815,7 @@ yyerrlab1:
   for (;;)
     {
       yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
+      if (!yypact_value_is_default (yyn))
 	{
 	  yyn += YYTERROR;
 	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -10810,7 +10862,7 @@ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-#if !defined(yyoverflow) || YYERROR_VERBOSE
+#if !defined yyoverflow || YYERROR_VERBOSE
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
@@ -10822,8 +10874,13 @@ yyexhaustedlab:
 
 yyreturn:
   if (yychar != YYEMPTY)
-     yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval);
+    {
+      /* Make sure we have latest lookahead translation.  See comments at
+         user semantic actions for why this is necessary.  */
+      yytoken = YYTRANSLATE (yychar);
+      yydestruct ("Cleanup: discarding lookahead",
+                  yytoken, &yylval);
+    }
   /* Do not reclaim the symbols of the rule which action triggered
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
@@ -10848,8 +10905,8 @@ yyreturn:
 
 
 
-/* Line 1684 of yacc.c  */
-#line 4772 "Gmsh.y"
+/* Line 2049 of yacc.c  */
+#line 4775 "Gmsh.y"
 
 
 int PrintListOfDouble(char *format, List_T *list, char *buffer)
diff --git a/Parser/Gmsh.tab.hpp b/Parser/Gmsh.tab.hpp
index 6a55f5e023ffe1c43cb3c48f90c38438a58795a5..0474f9d1d16e8aa369b31191a5218d15e32c5f18 100644
--- a/Parser/Gmsh.tab.hpp
+++ b/Parser/Gmsh.tab.hpp
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
+/* A Bison parser, made by GNU Bison 2.6.  */
 
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* Bison interface for Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -31,6 +30,15 @@
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
+#ifndef GMSH_YY_GMSH_TAB_HPP
+# define GMSH_YY_GMSH_TAB_HPP
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int gmsh_yydebug;
+#endif
 
 /* Tokens.  */
 #ifndef YYTOKENTYPE
@@ -181,12 +189,11 @@
 #endif
 
 
-
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
 {
 
-/* Line 1685 of yacc.c  */
+/* Line 2050 of yacc.c  */
 #line 92 "Gmsh.y"
 
   char *c;
@@ -199,8 +206,8 @@ typedef union YYSTYPE
 
 
 
-/* Line 1685 of yacc.c  */
-#line 204 "Gmsh.tab.hpp"
+/* Line 2050 of yacc.c  */
+#line 211 "Gmsh.tab.hpp"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -209,4 +216,18 @@ typedef union YYSTYPE
 
 extern YYSTYPE gmsh_yylval;
 
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int gmsh_yyparse (void *YYPARSE_PARAM);
+#else
+int gmsh_yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int gmsh_yyparse (void);
+#else
+int gmsh_yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
 
+#endif /* !GMSH_YY_GMSH_TAB_HPP  */
diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y
index d8fdb34e25805aad49b7faf3c59d190ff13565ca..dd2108fc7e7bf78cd0f89e3ee4bd8278ea4da770 100644
--- a/Parser/Gmsh.y
+++ b/Parser/Gmsh.y
@@ -3727,7 +3727,7 @@ Periodic :
           int j_slave  = (int)d_slave;
           Curve *c_slave = FindCurve(abs(j_slave));
           if(c_slave){
-            c_slave->meshMaster = j_master;
+	    GModel::current()->getGEOInternals()->periodicEdges[j_slave] = j_master;
           }
           else{
             GEdge *ge = GModel::current()->getEdgeByTag(abs(j_slave));
@@ -3751,11 +3751,12 @@ Periodic :
         int j_slave = (int)$3;
         Surface *s_slave = FindSurface(abs(j_slave));
         if(s_slave){
-          s_slave->meshMaster = j_master;
+	  GModel::current()->getGEOInternals()->periodicFaces[j_slave] = j_master;
           for (int i = 0; i < List_Nbr($5); i++){
             double dm, ds;
             List_Read($5, i, &ds);
             List_Read($10, i, &dm);
+	    GModel::current()->getGEOInternals()->periodicEdges[(int)ds] = (int)dm;
             s_slave->edgeCounterparts[(int)ds] = (int)dm;
           }
         }
@@ -3768,6 +3769,8 @@ Periodic :
               List_Read($5, i, &ds);
               List_Read($10, i, &dm);
               gf->edgeCounterparts[(int)ds] = (int)dm;
+	      GEdge *ges = GModel::current()->getEdgeByTag(abs((int)ds));
+	      ges->setMeshMaster((int)dm);
             }
           }
           else yymsg(0, "Unknown surface %d", j_slave);
diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp
index c2f2b61c4f9cf0c7e1d9606457242fb4c14d649a..ab042b47bdb7e311973d581e5b1cc4a2753957ab 100644
--- a/Parser/Gmsh.yy.cpp
+++ b/Parser/Gmsh.yy.cpp
@@ -66,7 +66,6 @@ typedef int16_t flex_int16_t;
 typedef uint16_t flex_uint16_t;
 typedef int32_t flex_int32_t;
 typedef uint32_t flex_uint32_t;
-typedef uint64_t flex_uint64_t;
 #else
 typedef signed char flex_int8_t;
 typedef short int flex_int16_t;
@@ -375,7 +374,7 @@ static void yy_fatal_error (yyconst char msg[]  );
  */
 #define YY_DO_BEFORE_ACTION \
 	(yytext_ptr) = yy_bp; \
-	gmsh_yyleng = (yy_size_t) (yy_cp - yy_bp); \
+	gmsh_yyleng = (size_t) (yy_cp - yy_bp); \
 	(yy_hold_char) = *yy_cp; \
 	*yy_cp = '\0'; \
 	(yy_c_buf_p) = yy_cp;
@@ -956,7 +955,7 @@ void   skipline(void);
 #define YY_NO_UNISTD_H
 #endif
 
-#line 960 "Gmsh.yy.cpp"
+#line 959 "Gmsh.yy.cpp"
 
 #define INITIAL 0
 
@@ -1141,7 +1140,7 @@ YY_DECL
 #line 49 "Gmsh.l"
 
 
-#line 1145 "Gmsh.yy.cpp"
+#line 1144 "Gmsh.yy.cpp"
 
 	if ( !(yy_init) )
 		{
@@ -2026,7 +2025,7 @@ YY_RULE_SETUP
 #line 237 "Gmsh.l"
 ECHO;
 	YY_BREAK
-#line 2030 "Gmsh.yy.cpp"
+#line 2029 "Gmsh.yy.cpp"
 case YY_STATE_EOF(INITIAL):
 	yyterminate();
 
diff --git a/benchmarks/2d/Square-01.geo b/benchmarks/2d/Square-01.geo
index 5078de84475cc5a8289d4b45b8452c9c22c3e090..6053b54017f5cde0761602877c194e12cbdb74bf 100644
--- a/benchmarks/2d/Square-01.geo
+++ b/benchmarks/2d/Square-01.geo
@@ -10,4 +10,4 @@ Line(3) = {1,4};
 Line(4) = {4,3};       
 Line Loop(5) = {1,2,3,4};       
 Plane Surface(6) = {5};       
-Recombine Surface {6};
+//Recombine Surface {6};
diff --git a/benchmarks/2d/conge.geo b/benchmarks/2d/conge.geo
index 5357e0f176e46cda615ddbaf2c27a20668d8d6bf..1b8384cccd3e57a9866d9babb8713e98e6b3be2e 100644
--- a/benchmarks/2d/conge.geo
+++ b/benchmarks/2d/conge.geo
@@ -75,8 +75,8 @@ Plane Surface(24) = {23,21};
 
 Physical Line(24) = {9,1,2,3,4,5,6,7,8,11};
 Physical Line(25) = {12,13,14,15,16,17,18,19,20,10};
-Physical Surface(26) = {24};
+Physical Surface(26) = {24,22};
 Physical Line(27) = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 14, 13, 12, 11};
 Physical Line(28) = {17, 16, 20, 19, 18, 15};
-Recombine Surface {24, 22};
+//Recombine Surface {24, 22};
 Mesh.RecombinationAlgorithm=1;
\ No newline at end of file
diff --git a/benchmarks/2d/many_holes.geo b/benchmarks/2d/many_holes.geo
index 717042ad79f87a5d566cc054cecfcd189ce72234..1708e2468e31cd97dfd98ac7a3dae5a5db03c7f6 100644
--- a/benchmarks/2d/many_holes.geo
+++ b/benchmarks/2d/many_holes.geo
@@ -44,7 +44,7 @@ EndFor
 
 Plane Surface (20) = {10,11:(10+K)};
 
-Recombine Surface {20};
+//Recombine Surface {20};
 
 //Physical Surface (30) = {20};