Skip to content
Snippets Groups Projects
Gmsh.tab.cpp 236 KiB
Newer Older
      STL_Surf->STL->Add_Facet( yyvsp[-12].d, yyvsp[-11].d, yyvsp[-10].d,
				yyvsp[-8].d, yyvsp[-7].d, yyvsp[-6].d,
				yyvsp[-4].d, yyvsp[-3].d, yyvsp[-2].d);
      return 1;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 9:
      Msg(PARSER_INFO,"STL file format read");
      Tree_Add(THEM->Surfaces, &STL_Surf);
      return 1;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 12:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 13:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 14:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 15:
      Msg(PARSER_INFO,"Step Iso-10303-21 file format");
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 16:
      Msg(PARSER_INFO,"Step Iso-10303-21 file format read");
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 20:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 21:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 22:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 23:
{
        Add_Cartesian_Point((int)yyvsp[-8].d,yyvsp[-4].c,yyvsp[-2].v[0],yyvsp[-2].v[1],yyvsp[-2].v[2]);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 24:
{
       Add_BSpline_Curve_With_Knots ((int)yyvsp[-22].d, yyvsp[-18].c, (int) yyvsp[-16].d, yyvsp[-14].l,	yyvsp[-6].l, yyvsp[-4].l, 0., 1.);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 25:
{
      Add_BSpline_Surface_With_Knots ((int)yyvsp[-30].d, yyvsp[-26].c, (int) yyvsp[-24].d, (int) yyvsp[-22].d, yyvsp[-20].l, yyvsp[-10].l,
				      yyvsp[-8].l, yyvsp[-6].l, yyvsp[-4].l, 0., 1., 0., 1. );
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 26:
{
      Add_Edge_Curve ((int)yyvsp[-14].d, yyvsp[-10].c , (int)yyvsp[-8].d , (int)yyvsp[-6].d, (int)yyvsp[-4].d);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 27:
{
      Add_Face_Outer_Bound((int)yyvsp[-10].d,yyvsp[-6].c,(int)yyvsp[-4].d,yyvsp[-2].i,1);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 28:
{
      /* La je dois voir la norme ! Face_Bound : trou externe a la surface ! */
      Msg(PARSER_INFO,"Found a face bound");
      Add_Face_Outer_Bound((int)yyvsp[-10].d,yyvsp[-6].c,(int)yyvsp[-4].d,yyvsp[-2].i,0);
    ;
    break;}
case 29:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Add_Oriented_Edge((int)yyvsp[-14].d,yyvsp[-10].c,(int)yyvsp[-4].d,yyvsp[-2].i);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Add_Edge_Loop((int)yyvsp[-8].d,yyvsp[-4].c,yyvsp[-2].l);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Add_Advanced_Face((int)yyvsp[-12].d,yyvsp[-8].c,yyvsp[-6].l,(int)yyvsp[-4].d,yyvsp[-2].i);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Add_Vertex_Point((int)yyvsp[-8].d,yyvsp[-4].c,(int)yyvsp[-2].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Add_Axis2_Placement3D  ( (int)yyvsp[-12].d, (int)yyvsp[-4].d, (int)yyvsp[-2].d, (int)yyvsp[-6].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Add_Direction((int)yyvsp[-8].d , yyvsp[-4].c, yyvsp[-2].v[0], yyvsp[-2].v[1], yyvsp[-2].v[2]);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Add_Plane((int)yyvsp[-8].d,yyvsp[-4].c,(int)yyvsp[-2].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Add_Line ((int)yyvsp[-10].d, yyvsp[-6].c , (int) yyvsp[-4].d, (int)yyvsp[-2].d);
      Msg(PARSER_INFO,"Found a closed shell");
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Add_Closed_Shell((int)yyvsp[-8].d, yyvsp[-4].c , yyvsp[-2].l);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Add_Cylinder ((int)yyvsp[-10].d, yyvsp[-6].c , (int)yyvsp[-4].d, yyvsp[-2].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Add_Cone ((int)yyvsp[-12].d, yyvsp[-8].c , (int)yyvsp[-6].d, yyvsp[-4].d,yyvsp[-2].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Add_Torus ((int)yyvsp[-12].d, yyvsp[-8].c , (int)yyvsp[-6].d, yyvsp[-4].d,yyvsp[-2].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Add_Circle((int) yyvsp[-10].d, yyvsp[-6].c, (int) yyvsp[-4].d, yyvsp[-2].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Add_Ellipsis((int) yyvsp[-12].d, yyvsp[-8].c, (int) yyvsp[-6].d, yyvsp[-4].d, yyvsp[-2].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
    ;
case 54:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{
      Msg(PARSER_INFO,"Gmsh file format read");
Christophe Geuzaine's avatar
Christophe Geuzaine committed
    ;
case 55:
case 56:
case 57:
case 58:
case 59:
case 60:
case 61:
case 62:
{ return 1; ;
case 63:
case 64:
case 65:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ return 1; ;
    break;}
case 66:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ return 1; ;
    break;}
case 67:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 68:
      for(i = 0 ; i<List_Nbr(yyvsp[-2].l) ; i++){
	if(!i){
	  str = strtok(yyvsp[-4].c, "%");
	}
	str = strtok(NULL, "%");
	if(str){
	  sprintf(tmpstring3, tmpstring2, *(double*)List_Pointer(yyvsp[-2].l,i)); 
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	  vyyerror("Missing %d parameter(s) in Printf format",
		   List_Nbr(yyvsp[-2].l)-i);
      List_Delete(yyvsp[-2].l);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 69:
	EndView(1, yyname, yyvsp[-4].c); 
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 70:
	EndView(1, yyname, yyvsp[-6].c);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 71:
      BeginView(1); 
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 84:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ List_Add(ActualView->SP, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 85:
{ List_Add(ActualView->SP, &yyvsp[0].d) ; ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 86:
{ 
      List_Add(ActualView->SP, &yyvsp[-5].d); List_Add(ActualView->SP, &yyvsp[-3].d);
      List_Add(ActualView->SP, &yyvsp[-1].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 87:
      ActualView->NbSP++ ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 88:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ List_Add(ActualView->VP, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 89:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ List_Add(ActualView->VP, &yyvsp[0].d) ; ;
    break;}
case 90:
{ 
      List_Add(ActualView->VP, &yyvsp[-5].d); List_Add(ActualView->VP, &yyvsp[-3].d);
      List_Add(ActualView->VP, &yyvsp[-1].d); 
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 91:
      ActualView->NbVP++ ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 92:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ List_Add(ActualView->TP, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 93:
{ List_Add(ActualView->TP, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 94:
{ 
      List_Add(ActualView->TP, &yyvsp[-5].d); List_Add(ActualView->TP, &yyvsp[-3].d);
      List_Add(ActualView->TP, &yyvsp[-1].d);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 95:
      ActualView->NbTP++ ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 96:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ List_Add(ActualView->SL, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 97:
{ List_Add(ActualView->SL, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 98:
{ 
      List_Add(ActualView->SL, &yyvsp[-11].d); List_Add(ActualView->SL, &yyvsp[-5].d);
      List_Add(ActualView->SL, &yyvsp[-9].d); List_Add(ActualView->SL, &yyvsp[-3].d);
      List_Add(ActualView->SL, &yyvsp[-7].d); List_Add(ActualView->SL, &yyvsp[-1].d);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 99:
      ActualView->NbSL++ ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 100:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ List_Add(ActualView->VL, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 101:
{ List_Add(ActualView->VL, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 102:
      List_Add(ActualView->VL, &yyvsp[-11].d); List_Add(ActualView->VL, &yyvsp[-5].d);
      List_Add(ActualView->VL, &yyvsp[-9].d); List_Add(ActualView->VL, &yyvsp[-3].d);
      List_Add(ActualView->VL, &yyvsp[-7].d); List_Add(ActualView->VL, &yyvsp[-1].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 103:
      ActualView->NbVL++ ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 104:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ List_Add(ActualView->TL, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 105:
{ List_Add(ActualView->TL, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 106:
      List_Add(ActualView->TL, &yyvsp[-11].d); List_Add(ActualView->TL, &yyvsp[-5].d);
      List_Add(ActualView->TL, &yyvsp[-9].d); List_Add(ActualView->TL, &yyvsp[-3].d);
      List_Add(ActualView->TL, &yyvsp[-7].d); List_Add(ActualView->TL, &yyvsp[-1].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 107:
      ActualView->NbTL++ ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 108:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ List_Add(ActualView->ST, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 109:
{ List_Add(ActualView->ST, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 110:
{ 
      List_Add(ActualView->ST, &yyvsp[-17].d); List_Add(ActualView->ST, &yyvsp[-11].d);
      List_Add(ActualView->ST, &yyvsp[-5].d);
      List_Add(ActualView->ST, &yyvsp[-15].d); List_Add(ActualView->ST, &yyvsp[-9].d);
      List_Add(ActualView->ST, &yyvsp[-3].d);
      List_Add(ActualView->ST, &yyvsp[-13].d); List_Add(ActualView->ST, &yyvsp[-7].d);
      List_Add(ActualView->ST, &yyvsp[-1].d);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 111:
      ActualView->NbST++ ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 112:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ List_Add(ActualView->VT, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 113:
{ List_Add(ActualView->VT, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 114:
{ 
      List_Add(ActualView->VT, &yyvsp[-17].d); List_Add(ActualView->VT, &yyvsp[-11].d);
      List_Add(ActualView->VT, &yyvsp[-5].d);
      List_Add(ActualView->VT, &yyvsp[-15].d); List_Add(ActualView->VT, &yyvsp[-9].d);
      List_Add(ActualView->VT, &yyvsp[-3].d);
      List_Add(ActualView->VT, &yyvsp[-13].d); List_Add(ActualView->VT, &yyvsp[-7].d);
      List_Add(ActualView->VT, &yyvsp[-1].d);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 115:
      ActualView->NbVT++ ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 116:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ List_Add(ActualView->TT, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 117:
{ List_Add(ActualView->TT, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 118:
{ 
      List_Add(ActualView->TT, &yyvsp[-17].d); List_Add(ActualView->TT, &yyvsp[-11].d);
      List_Add(ActualView->TT, &yyvsp[-5].d);
      List_Add(ActualView->TT, &yyvsp[-15].d); List_Add(ActualView->TT, &yyvsp[-9].d);
      List_Add(ActualView->TT, &yyvsp[-3].d);
      List_Add(ActualView->TT, &yyvsp[-13].d); List_Add(ActualView->TT, &yyvsp[-7].d);
      List_Add(ActualView->TT, &yyvsp[-1].d);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 119:
      ActualView->NbTT++ ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 120:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ List_Add(ActualView->SS, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 121:
{ List_Add(ActualView->SS, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 122:
{ 
      List_Add(ActualView->SS, &yyvsp[-23].d);  List_Add(ActualView->SS, &yyvsp[-17].d);
      List_Add(ActualView->SS, &yyvsp[-11].d); List_Add(ActualView->SS, &yyvsp[-5].d);
      List_Add(ActualView->SS, &yyvsp[-21].d);  List_Add(ActualView->SS, &yyvsp[-15].d);
      List_Add(ActualView->SS, &yyvsp[-9].d); List_Add(ActualView->SS, &yyvsp[-3].d);
      List_Add(ActualView->SS, &yyvsp[-19].d);  List_Add(ActualView->SS, &yyvsp[-13].d);
      List_Add(ActualView->SS, &yyvsp[-7].d); List_Add(ActualView->SS, &yyvsp[-1].d);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 123:
{
      ActualView->NbSS++ ;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 124:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ List_Add(ActualView->VS, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 125:
{ List_Add(ActualView->VS, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 126:
{ 
      List_Add(ActualView->VS, &yyvsp[-23].d);  List_Add(ActualView->VS, &yyvsp[-17].d);
      List_Add(ActualView->VS, &yyvsp[-11].d); List_Add(ActualView->VS, &yyvsp[-5].d);
      List_Add(ActualView->VS, &yyvsp[-21].d);  List_Add(ActualView->VS, &yyvsp[-15].d);
      List_Add(ActualView->VS, &yyvsp[-9].d); List_Add(ActualView->VS, &yyvsp[-3].d);
      List_Add(ActualView->VS, &yyvsp[-19].d);  List_Add(ActualView->VS, &yyvsp[-13].d);
      List_Add(ActualView->VS, &yyvsp[-7].d); List_Add(ActualView->VS, &yyvsp[-1].d);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 127:
{
      ActualView->NbVS++ ;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 128:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ List_Add(ActualView->TS, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 129:
{ List_Add(ActualView->TS, &yyvsp[0].d) ; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 130:
{ 
      List_Add(ActualView->TS, &yyvsp[-23].d);  List_Add(ActualView->TS, &yyvsp[-17].d);
      List_Add(ActualView->TS, &yyvsp[-11].d); List_Add(ActualView->TS, &yyvsp[-5].d);
      List_Add(ActualView->TS, &yyvsp[-21].d);  List_Add(ActualView->TS, &yyvsp[-15].d);
      List_Add(ActualView->TS, &yyvsp[-9].d); List_Add(ActualView->TS, &yyvsp[-3].d);
      List_Add(ActualView->TS, &yyvsp[-19].d);  List_Add(ActualView->TS, &yyvsp[-13].d);
      List_Add(ActualView->TS, &yyvsp[-7].d); List_Add(ActualView->TS, &yyvsp[-1].d);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 131:
{
      ActualView->NbTS++ ;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 132:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 133:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 134:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 135:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 136:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 137:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 138:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 139:
      if (!(pSymbol = (Symbol*)List_PQuery(Symbol_L, &TheSymbol, CompareSymbols))){
	TheSymbol.val = List_Create(1,1,sizeof(double));
	if(!yyvsp[-2].i){
	  List_Put(TheSymbol.val, 0, &yyvsp[-1].d);
	  List_Add(Symbol_L, &TheSymbol);
	}
	else
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	  vyyerror("Unknown variable '%s'", yyvsp[-3].c) ;
	pd = (double*)List_Pointer_Fast(pSymbol->val, 0) ; 
	switch(yyvsp[-2].i){
	case 0 : *pd = yyvsp[-1].d; break ;
	case 1 : *pd += yyvsp[-1].d ; break ;
	case 2 : *pd -= yyvsp[-1].d ; break ;
	case 3 : *pd *= yyvsp[-1].d ; break ;
	case 4 : 
	  if(yyvsp[-1].d) *pd /= yyvsp[-1].d ; 
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	  else vyyerror("Division by zero in '%s /= %g'", yyvsp[-3].c, yyvsp[-1].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 140:
      TheSymbol.Name = yyvsp[-6].c;
      if (!(pSymbol = (Symbol*)List_PQuery(Symbol_L, &TheSymbol, CompareSymbols))){
	TheSymbol.val = List_Create(5,5,sizeof(double));
	if(!yyvsp[-2].i){
	  List_Put(TheSymbol.val, (int)yyvsp[-4].d, &yyvsp[-1].d);
	  List_Add(Symbol_L, &TheSymbol);
	}
	else
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	  vyyerror("Unknown variable '%s'", yyvsp[-6].c) ;
	if((pd = (double*)List_Pointer_Test(pSymbol->val, (int)yyvsp[-4].d))){
	  switch(yyvsp[-2].i){
	  case 0 : *pd = yyvsp[-1].d; break ;
	  case 1 : *pd += yyvsp[-1].d ; break ;
	  case 2 : *pd -= yyvsp[-1].d ; break ;
	  case 3 : *pd *= yyvsp[-1].d ; break ;
	  case 4 : 
	    if(yyvsp[-1].d) *pd /= yyvsp[-1].d ; 
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	    else vyyerror("Division by zero in '%s[%d] /= %g'", yyvsp[-6].c, (int)yyvsp[-4].d, yyvsp[-1].d);
	    break;
	  }
	}
	else{
	  if(!yyvsp[-2].i)
	    List_Put(pSymbol->val, (int)yyvsp[-4].d, &yyvsp[-1].d);
	  else
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	    vyyerror("Uninitialized variable '%s[%d]'", yyvsp[-6].c, (int)yyvsp[-4].d) ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 141:
{
      if(List_Nbr(yyvsp[-5].l) != List_Nbr(yyvsp[-1].l))
	vyyerror("Incompatible array dimensions in affectation");
      else{
	TheSymbol.Name = yyvsp[-8].c;
	if (!(pSymbol = (Symbol*)List_PQuery(Symbol_L, &TheSymbol, CompareSymbols))){
	  TheSymbol.val = List_Create(5,5,sizeof(double));
	  if(!yyvsp[-2].i){
	    for(i=0 ; i<List_Nbr(yyvsp[-5].l) ; i++){
	      List_Put(TheSymbol.val, (int)(*(double*)List_Pointer(yyvsp[-5].l,i)),
		       (double*)List_Pointer(yyvsp[-1].l,i));
	      List_Add(Symbol_L, &TheSymbol);
	    }
	  }
	  else
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	    vyyerror("Unknown variable '%s'", yyvsp[-8].c) ;
	}
	else{
	  for(i=0 ; i<List_Nbr(yyvsp[-5].l) ; i++){
	    j = (int)(*(double*)List_Pointer(yyvsp[-5].l,i)) ;
	    d = *(double*)List_Pointer(yyvsp[-1].l,i) ;
	    if((pd = (double*)List_Pointer_Test(pSymbol->val, j))){
	      switch(yyvsp[-2].i){
	      case 0 : *pd = d; break ;
	      case 1 : *pd += d ; break ;
	      case 2 : *pd -= d ; break ;
	      case 3 : *pd *= d ; break ;
	      case 4 : 
		if(yyvsp[-1].l) *pd /= d ; 
Christophe Geuzaine's avatar
Christophe Geuzaine committed
		else vyyerror("Division by zero in '%s[%d] /= %g'", yyvsp[-8].c, j, d);
		break;
	      }
	    }
	    else{
	      if(!yyvsp[-2].i)
		List_Put(pSymbol->val, j, &d);
	      else
Christophe Geuzaine's avatar
Christophe Geuzaine committed
		vyyerror("Uninitialized variable '%s[%d]'", yyvsp[-8].c, j) ;	  
	    }
	  }
	}
      }
      List_Delete(yyvsp[-5].l);
      List_Delete(yyvsp[-1].l);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 142:
{
      TheSymbol.Name = yyvsp[-5].c;
      if (!(pSymbol = (Symbol*)List_PQuery(Symbol_L, &TheSymbol, CompareSymbols))){
	TheSymbol.val = List_Create(5,5,sizeof(double));
	List_Copy(yyvsp[-1].l,TheSymbol.val);
	List_Add(Symbol_L, &TheSymbol);
      }
      else{
	List_Reset(pSymbol->val);
	List_Copy(yyvsp[-1].l, pSymbol->val);
      }
      List_Delete(yyvsp[-1].l);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 143:
      if (!(pSymbol = (Symbol*)List_PQuery(Symbol_L, &TheSymbol, CompareSymbols)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	vyyerror("Unknown variable '%s'", yyvsp[-2].c) ; 
	*(double*)List_Pointer_Fast(pSymbol->val, 0) += yyvsp[-1].i; 
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 144:
      TheSymbol.Name = yyvsp[-5].c ;
      if (!(pSymbol = (Symbol*)List_PQuery(Symbol_L, &TheSymbol, CompareSymbols)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	vyyerror("Unknown variable '%s'", yyvsp[-5].c) ; 
      else{
	if((pd = (double*)List_Pointer_Test(pSymbol->val, (int)yyvsp[-3].d)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	  vyyerror("Uninitialized variable '%s[%d]'", yyvsp[-5].c, (int)yyvsp[-3].d) ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 145:
{ 
      if(!(pStrCat = Get_StringOptionCategory(yyvsp[-5].c)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	vyyerror("Unknown string option class '%s'", yyvsp[-5].c);
	if(!(pStrOpt = (char *(*) (int, int, char *))Get_StringOption(yyvsp[-3].c, pStrCat)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	  vyyerror("Unknown string option '%s.%s'", yyvsp[-5].c, yyvsp[-3].c);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 146:
{ 
      if(!(pStrCat = Get_StringOptionCategory(yyvsp[-8].c)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	vyyerror("Unknown string option class '%s'", yyvsp[-8].c);
	if(!(pStrOpt = (char *(*) (int, int, char *))Get_StringOption(yyvsp[-3].c, pStrCat)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	  vyyerror("Unknown string option '%s[%d].%s'", yyvsp[-8].c, (int)yyvsp[-6].d, yyvsp[-3].c);
	  pStrOpt((int)yyvsp[-6].d,GMSH_SET|GMSH_GUI,yyvsp[-1].c) ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 147:
      if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-5].c)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	vyyerror("Unknown numeric option class '%s'", yyvsp[-5].c);
	if(!(pNumOpt = (double (*) (int, int, double))Get_NumberOption(yyvsp[-3].c, pNumCat)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	  vyyerror("Unknown numeric option '%s.%s'", yyvsp[-5].c, yyvsp[-3].c);
	  switch(yyvsp[-2].i){
	  case 0 : d = yyvsp[-1].d ; break ;
	  case 1 : d = pNumOpt(0,GMSH_GET,0) + yyvsp[-1].d ; break ;
	  case 2 : d = pNumOpt(0,GMSH_GET,0) - yyvsp[-1].d ; break ;
	  case 3 : d = pNumOpt(0,GMSH_GET,0) * yyvsp[-1].d ; break ;
	  case 4 : 
	    if(yyvsp[-1].d) d = pNumOpt(0,GMSH_GET,0) / yyvsp[-1].d ; 
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	    else vyyerror("Division by zero in '%s.%s /= %g'", yyvsp[-5].c, yyvsp[-3].c, yyvsp[-1].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 148:
{
      if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-8].c)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	vyyerror("Unknown numeric option class '%s'", yyvsp[-8].c);
	if(!(pNumOpt =  (double (*) (int, int, double))Get_NumberOption(yyvsp[-3].c, pNumCat)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	  vyyerror("Unknown numeric option '%s[%d].%s'", yyvsp[-8].c, (int)yyvsp[-6].d, yyvsp[-3].c);
	  switch(yyvsp[-2].i){
	  case 0 : d = yyvsp[-1].d; break ;
	  case 1 : d = pNumOpt((int)yyvsp[-6].d,GMSH_GET,0) + yyvsp[-1].d ; break ;
	  case 2 : d = pNumOpt((int)yyvsp[-6].d,GMSH_GET,0) - yyvsp[-1].d ; break ;
	  case 3 : d = pNumOpt((int)yyvsp[-6].d,GMSH_GET,0) * yyvsp[-1].d ; break ;
	  case 4 : 
	    if(yyvsp[-1].d) d = pNumOpt((int)yyvsp[-6].d,GMSH_GET,0) / yyvsp[-1].d ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	    else vyyerror("Division by zero in '%s[%d].%s /= %g'", 
			  yyvsp[-8].c, (int)yyvsp[-6].d, yyvsp[-3].c, yyvsp[-1].d);
	    break;
	  }
	  pNumOpt((int)yyvsp[-6].d,GMSH_SET|GMSH_GUI,d) ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 149:
      if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-4].c)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	vyyerror("Unknown numeric option class '%s'", yyvsp[-4].c);
	if(!(pNumOpt =  (double (*) (int, int, double))Get_NumberOption(yyvsp[-2].c, pNumCat)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	  vyyerror("Unknown numeric option '%s.%s'", yyvsp[-4].c, yyvsp[-2].c);
	else
	  pNumOpt(0,GMSH_SET|GMSH_GUI,pNumOpt(0,GMSH_GET,0)+yyvsp[-1].i) ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 150:
      if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-7].c)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	vyyerror("Unknown numeric option class '%s'", yyvsp[-7].c);
	if(!(pNumOpt =  (double (*) (int, int, double))Get_NumberOption(yyvsp[-2].c, pNumCat)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	  vyyerror("Unknown numeric option '%s[%d].%s'", yyvsp[-7].c, (int)yyvsp[-5].d, yyvsp[-2].c);
	else
	  pNumOpt((int)yyvsp[-5].d,GMSH_SET|GMSH_GUI,pNumOpt((int)yyvsp[-5].d,GMSH_GET,0)+yyvsp[-1].i) ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 151:
#line 1010 "Gmsh.y"
      if(!(pColCat = Get_ColorOptionCategory(yyvsp[-7].c)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	vyyerror("Unknown color option class '%s'", yyvsp[-7].c);
	if(!(pColOpt =  (unsigned int (*) (int, int, unsigned int))Get_ColorOption(yyvsp[-3].c, pColCat)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	  vyyerror("Unknown color option '%s.Color.%s'", yyvsp[-7].c, yyvsp[-3].c);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 152:
#line 1022 "Gmsh.y"
      if(!(pColCat = Get_ColorOptionCategory(yyvsp[-10].c)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	vyyerror("Unknown color option class '%s'", yyvsp[-10].c);
	if(!(pColOpt =  (unsigned int (*) (int, int, unsigned int))Get_ColorOption(yyvsp[-3].c, pColCat)))
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	  vyyerror("Unknown color option '%s[%d].Color.%s'", yyvsp[-10].c, (int)yyvsp[-8].d, yyvsp[-3].c);
	else
	  pColOpt((int)yyvsp[-8].d,GMSH_SET|GMSH_GUI,yyvsp[-1].u) ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 153:
#line 1036 "Gmsh.y"
{
      ColorTable *ct = Get_ColorTable(0);
      if(!ct)
	vyyerror("View[%d] does not exist", 0);
      else{
	ct->size = List_Nbr(yyvsp[-1].l);
	if(ct->size > COLORTABLE_NBMAX_COLOR)
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	  vyyerror("Too many (%d>%d) colors in View[%d].ColorTable", 
		   ct->size, COLORTABLE_NBMAX_COLOR, 0);
	else
	  for(i=0 ; i<ct->size ; i++) List_Read(yyvsp[-1].l, i, &ct->table[i]);
      }
      List_Delete(yyvsp[-1].l);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 154:
#line 1052 "Gmsh.y"
      ColorTable *ct = Get_ColorTable((int)yyvsp[-6].d);
      if(!ct)
	vyyerror("View[%d] does not exist", (int)yyvsp[-6].d);
	ct->size = List_Nbr(yyvsp[-1].l);
	if(ct->size > COLORTABLE_NBMAX_COLOR)
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	  vyyerror("Too many (%d>%d) colors in View[%d].ColorTable", 
		   ct->size, COLORTABLE_NBMAX_COLOR, (int)yyvsp[-6].d);
	else
	  for(i=0 ; i<ct->size ; i++) List_Read(yyvsp[-1].l, i, &ct->table[i]);
      List_Delete(yyvsp[-1].l);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 155:
#line 1078 "Gmsh.y"
      Cdbpts101((int)yyvsp[-4].d,yyvsp[-1].v[0],yyvsp[-1].v[1],yyvsp[-1].v[2],yyvsp[-1].v[3],yyvsp[-1].v[4]);
      yyval.s.Type = MSH_POINT;
      yyval.s.Num  = (int)yyvsp[-4].d;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 156:
#line 1085 "Gmsh.y"
      Cdbz101((int)yyvsp[-4].d,MSH_PHYSICAL_POINT,0,0,0,0,0,NULL,yyvsp[-1].l,NULL);
      yyval.s.Type = MSH_PHYSICAL_POINT;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 157:
#line 1091 "Gmsh.y"
      Vertex *v;
      Attractor *a;
      double p;
      int ip;
      for(int i=0;i<List_Nbr(yyvsp[-9].l);i++){
      	List_Read(yyvsp[-9].l,i,&p);
        ip = (int)p;
        v = FindPoint(ip,THEM);
        if(!v)
	  vyyerror("Unkown Point %d", ip);
	else{
	  a = Create_Attractor(List_Nbr(THEM->Metric->Attractors)+1,
			       yyvsp[-6].d,yyvsp[-4].d,yyvsp[-2].d,v,NULL,NULL);
	  List_Add(THEM->Metric->Attractors,&a);
        }
      }
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 158:
#line 1110 "Gmsh.y"
{
      for(i=0;i<List_Nbr(yyvsp[-3].l);i++){
	List_Read(yyvsp[-3].l,i,&d);