Skip to content
Snippets Groups Projects
Gmsh.tab.cpp 270 KiB
Newer Older
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;}
case 270:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2893 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = log10(yyvsp[-1].d);    ;
    break;}
case 271:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2894 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = sqrt(yyvsp[-1].d);     ;
    break;}
case 272:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2895 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = sin(yyvsp[-1].d);      ;
    break;}
case 273:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2896 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = asin(yyvsp[-1].d);     ;
    break;}
case 274:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2897 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = cos(yyvsp[-1].d);      ;
    break;}
case 275:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2898 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = acos(yyvsp[-1].d);     ;
    break;}
case 276:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2899 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = tan(yyvsp[-1].d);      ;
    break;}
case 277:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2900 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = atan(yyvsp[-1].d);     ;
    break;}
case 278:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2901 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = atan2(yyvsp[-3].d, yyvsp[-1].d);;
    break;}
case 279:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2902 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = sinh(yyvsp[-1].d);     ;
    break;}
case 280:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2903 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = cosh(yyvsp[-1].d);     ;
    break;}
case 281:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2904 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = tanh(yyvsp[-1].d);     ;
    break;}
case 282:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2905 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = fabs(yyvsp[-1].d);     ;
    break;}
case 283:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2906 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = floor(yyvsp[-1].d);    ;
    break;}
case 284:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2907 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = ceil(yyvsp[-1].d);     ;
    break;}
case 285:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2908 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = fmod(yyvsp[-3].d, yyvsp[-1].d); ;
    break;}
case 286:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2909 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = fmod(yyvsp[-3].d, yyvsp[-1].d); ;
    break;}
case 287:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2910 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = sqrt(yyvsp[-3].d*yyvsp[-3].d+yyvsp[-1].d*yyvsp[-1].d); ;
    break;}
case 288:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2911 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = yyvsp[-1].d*(double)rand()/(double)RAND_MAX; ;
    break;}
case 289:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2920 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = yyvsp[0].d; ;
    break;}
case 290:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2921 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = 3.141592653589793; ;
    break;}
case 291:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2922 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = ParUtil::Instance()->rank(); ;
    break;}
case 292:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2923 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = ParUtil::Instance()->size(); ;
    break;}
case 293:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2924 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = Get_GmshMajorVersion(); ;
    break;}
case 294:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2925 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = Get_GmshMinorVersion(); ;
    break;}
case 295:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2926 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ yyval.d = Get_GmshPatchVersion(); ;
    break;}
case 296:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2931 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Symbol TheSymbol;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      TheSymbol.Name = yyvsp[0].c;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Symbol *pSymbol;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!(pSymbol = (Symbol*)Tree_PQuery(Symbol_T, &TheSymbol))) {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yymsg(GERROR, "Unknown variable '%s'", yyvsp[0].c);
	yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yyval.d = *(double*)List_Pointer_Fast(pSymbol->val, 0);
      Free(yyvsp[0].c);
    ;
    break;}
case 297:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2947 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      char tmpstring[1024];
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      sprintf(tmpstring, "%s_%d", yyvsp[-4].c, (int)yyvsp[-1].d) ;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Symbol TheSymbol;
      TheSymbol.Name = tmpstring;
      Symbol *pSymbol;
      if(!(pSymbol = (Symbol*)Tree_PQuery(Symbol_T, &TheSymbol))) {
	yymsg(GERROR, "Unknown variable '%s'", tmpstring);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      }
      else
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yyval.d = *(double*)List_Pointer_Fast(pSymbol->val, 0);
      Free(yyvsp[-4].c);
    ;
    break;}
case 298:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2962 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Symbol TheSymbol;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      TheSymbol.Name = yyvsp[-3].c;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Symbol *pSymbol;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!(pSymbol = (Symbol*)Tree_PQuery(Symbol_T, &TheSymbol))) {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yymsg(GERROR, "Unknown variable '%s'", yyvsp[-3].c);
	yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	double *pd;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	if((pd = (double*)List_Pointer_Test(pSymbol->val, (int)yyvsp[-1].d)))
	  yyval.d = *pd;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	  yymsg(GERROR, "Uninitialized variable '%s[%d]'", yyvsp[-3].c, (int)yyvsp[-1].d);
	  yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Free(yyvsp[-3].c);
    ;
    break;}
case 299:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2982 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Symbol TheSymbol;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      TheSymbol.Name = yyvsp[-2].c;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Symbol *pSymbol;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!(pSymbol = (Symbol*)Tree_PQuery(Symbol_T, &TheSymbol))) {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yymsg(GERROR, "Unknown variable '%s'", yyvsp[-2].c);
	yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      }
      else{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yyval.d = List_Nbr(pSymbol->val);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      }
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Free(yyvsp[-2].c);
    ;
    break;}
case 300:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 2996 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Symbol TheSymbol;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      TheSymbol.Name = yyvsp[-1].c;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Symbol *pSymbol;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!(pSymbol = (Symbol*)Tree_PQuery(Symbol_T, &TheSymbol))) {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yymsg(GERROR, "Unknown variable '%s'", yyvsp[-1].c);
	yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yyval.d = (*(double*)List_Pointer_Fast(pSymbol->val, 0) += yyvsp[0].i);
      Free(yyvsp[-1].c);
    ;
    break;}
case 301:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3009 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Symbol TheSymbol;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      TheSymbol.Name = yyvsp[-4].c;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Symbol *pSymbol;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!(pSymbol = (Symbol*)Tree_PQuery(Symbol_T, &TheSymbol))) {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yymsg(GERROR, "Unknown variable '%s'", yyvsp[-4].c);
	yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	double *pd;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	if((pd = (double*)List_Pointer_Test(pSymbol->val, (int)yyvsp[-2].d)))
	  yyval.d = (*pd += yyvsp[0].i);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	  yymsg(GERROR, "Uninitialized variable '%s[%d]'", yyvsp[-4].c, (int)yyvsp[-2].d);
	  yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Free(yyvsp[-4].c);
    ;
    break;}
case 302:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3032 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      double (*pNumOpt)(int num, int action, double value);
      StringXNumber *pNumCat;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-2].c))){
	yymsg(GERROR, "Unknown numeric option class '%s'", yyvsp[-2].c);
	yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	if(!(pNumOpt =  (double (*) (int, int, double))Get_NumberOption(yyvsp[0].c, pNumCat))){
	  yymsg(GERROR, "Unknown numeric option '%s.%s'", yyvsp[-2].c, yyvsp[0].c);
	  yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	  yyval.d = pNumOpt(0, GMSH_GET, 0);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Free(yyvsp[-2].c); Free(yyvsp[0].c);
    ;
    break;}
case 303:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3050 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      double (*pNumOpt)(int num, int action, double value);
      StringXNumber *pNumCat;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-5].c))){
	yymsg(GERROR, "Unknown numeric option class '%s'", yyvsp[-5].c);
	yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	if(!(pNumOpt =  (double (*) (int, int, double))Get_NumberOption(yyvsp[0].c, pNumCat))){
	  yymsg(GERROR, "Unknown numeric option '%s[%d].%s'", yyvsp[-5].c, (int)yyvsp[-3].d, yyvsp[0].c);
	  yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	  yyval.d = pNumOpt((int)yyvsp[-3].d, GMSH_GET, 0);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Free(yyvsp[-5].c); Free(yyvsp[0].c);
    ;
    break;}
case 304:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3068 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      double (*pNumOpt)(int num, int action, double value);
      StringXNumber *pNumCat;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-3].c))){
	yymsg(GERROR, "Unknown numeric option class '%s'", yyvsp[-3].c);
	yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	if(!(pNumOpt =  (double (*) (int, int, double))Get_NumberOption(yyvsp[-1].c, pNumCat))){
	  yymsg(GERROR, "Unknown numeric option '%s.%s'", yyvsp[-3].c, yyvsp[-1].c);
	  yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	  yyval.d = pNumOpt(0, GMSH_SET|GMSH_GUI, pNumOpt(0, GMSH_GET, 0)+yyvsp[0].i);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Free(yyvsp[-3].c); Free(yyvsp[-1].c);
    ;
    break;}
case 305:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3086 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      double (*pNumOpt)(int num, int action, double value);
      StringXNumber *pNumCat;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-6].c))){
	yymsg(GERROR, "Unknown numeric option class '%s'", yyvsp[-6].c);
	yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	if(!(pNumOpt =  (double (*) (int, int, double))Get_NumberOption(yyvsp[-1].c, pNumCat))){
	  yymsg(GERROR, "Unknown numeric option '%s[%d].%s'", yyvsp[-6].c, (int)yyvsp[-4].d, yyvsp[-1].c);
	  yyval.d = 0.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	  yyval.d = pNumOpt((int)yyvsp[-4].d, GMSH_SET|GMSH_GUI, pNumOpt((int)yyvsp[-4].d, GMSH_GET, 0)+yyvsp[0].i);
      }
      Free(yyvsp[-6].c); Free(yyvsp[-1].c);
    ;
    break;}
case 306:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3104 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ 
      yyval.d = GetValue(yyvsp[-3].c, yyvsp[-1].d);
      Free(yyvsp[-3].c);
    ;
    break;}
case 307:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3112 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      memcpy(yyval.v, yyvsp[0].v, 5*sizeof(double));
    ;
    break;}
case 308:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3116 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      for(int i = 0; i < 5; i++) yyval.v[i] = -yyvsp[0].v[i];
    ;
    break;}
case 309:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3120 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ 
      for(int i = 0; i < 5; i++) yyval.v[i] = yyvsp[0].v[i];
    ;
    break;}
case 310:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3124 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ 
      for(int i = 0; i < 5; i++) yyval.v[i] = yyvsp[-2].v[i] - yyvsp[0].v[i];
    ;
    break;}
case 311:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3128 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      for(int i = 0; i < 5; i++) yyval.v[i] = yyvsp[-2].v[i] + yyvsp[0].v[i];
    ;
    break;}
case 312:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3135 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ 
      yyval.v[0] = yyvsp[-9].d;  yyval.v[1] = yyvsp[-7].d;  yyval.v[2] = yyvsp[-5].d;  yyval.v[3] = yyvsp[-3].d; yyval.v[4] = yyvsp[-1].d;
    ;
    break;}
case 313:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3139 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ 
      yyval.v[0] = yyvsp[-7].d;  yyval.v[1] = yyvsp[-5].d;  yyval.v[2] = yyvsp[-3].d;  yyval.v[3] = yyvsp[-1].d; yyval.v[4] = 1.0;
    ;
    break;}
case 314:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3143 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.v[0] = yyvsp[-5].d;  yyval.v[1] = yyvsp[-3].d;  yyval.v[2] = yyvsp[-1].d;  yyval.v[3] = 0.0; yyval.v[4] = 1.0;
    ;
    break;}
case 315:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3147 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.v[0] = yyvsp[-5].d;  yyval.v[1] = yyvsp[-3].d;  yyval.v[2] = yyvsp[-1].d;  yyval.v[3] = 0.0; yyval.v[4] = 1.0;
    ;
    break;}
case 316:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3154 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = List_Create(2, 1, sizeof(List_T*));
      List_Add(yyval.l, &(yyvsp[0].l));
    ;
    break;}
case 317:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3159 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      List_Add(yyval.l, &(yyvsp[0].l));
    ;
    break;}
case 318:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3167 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = List_Create(2, 1, sizeof(double));
      List_Add(yyval.l, &(yyvsp[0].d));
    ;
    break;}
case 319:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3172 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = yyvsp[0].l;
    ;
    break;}
case 320:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3176 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      // creates an empty list
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      yyval.l = List_Create(2, 1, sizeof(double));
    ;
    break;}
case 321:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3181 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = yyvsp[-1].l;
    ;
    break;}
case 322:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3185 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = yyvsp[-1].l;
      for(int i = 0; i < List_Nbr(yyval.l); i++){
	double *pd = (double*)List_Pointer(yyval.l, i);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	(*pd) = - (*pd);
      }
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    ;
    break;}
case 323:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3193 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = yyvsp[-1].l;
      for(int i = 0; i < List_Nbr(yyval.l); i++){
	double *pd = (double*)List_Pointer(yyval.l, i);
	(*pd) *= yyvsp[-4].d;
      }
    ;
    break;}
case 324:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3204 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = yyvsp[0].l;
      for(int i = 0; i < List_Nbr(yyval.l); i++){
	double *pd = (double*)List_Pointer(yyval.l, i);
	(*pd) = - (*pd);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    ;
    break;}
case 325:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3212 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = yyvsp[0].l;
      for(int i = 0; i < List_Nbr(yyval.l); i++){
	double *pd = (double*)List_Pointer(yyval.l, i);
	(*pd) *= yyvsp[-2].d;
      }
    ;
    break;}
case 326:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3220 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ 
      yyval.l = List_Create(2, 1, sizeof(double)); 
      for(double d = yyvsp[-2].d; (yyvsp[-2].d < yyvsp[0].d) ? (d <= yyvsp[0].d) : (d >= yyvsp[0].d); (yyvsp[-2].d < yyvsp[0].d) ? (d += 1.) : (d -= 1.)) 
	List_Add(yyval.l, &d);
    ;
    break;}
case 327:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3226 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = List_Create(2, 1, sizeof(double)); 
      if(!yyvsp[0].d || (yyvsp[-4].d < yyvsp[-2].d && yyvsp[0].d < 0) || (yyvsp[-4].d > yyvsp[-2].d && yyvsp[0].d > 0)){
        yymsg(GERROR, "Wrong increment in '%g:%g:%g'", yyvsp[-4].d, yyvsp[-2].d, yyvsp[0].d);
	List_Add(yyval.l, &(yyvsp[-4].d));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	for(double d = yyvsp[-4].d; (yyvsp[0].d > 0) ? (d <= yyvsp[-2].d) : (d >= yyvsp[-2].d); d += yyvsp[0].d)
	  List_Add(yyval.l, &d);
   ;
    break;}
case 328:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3237 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      // Returns the coordinates of a point and fills a list with it.
      // This allows to ensure e.g. that relative point positions are
      // always conserved
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Vertex *v = FindPoint((int)yyvsp[-1].d);
      yyval.l = List_Create(3, 1, sizeof(double));      
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!v) {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yymsg(GERROR, "Unknown point '%d'", (int) yyvsp[-1].d);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	double d = 0.0;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	List_Add(yyval.l, &d);
	List_Add(yyval.l, &d);
	List_Add(yyval.l, &d);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      }
      else{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	List_Add(yyval.l, &v->Pos.X);
	List_Add(yyval.l, &v->Pos.Y);
	List_Add(yyval.l, &v->Pos.Z);
      }
    ;
    break;}
case 329:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3257 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = List_Create(List_Nbr(yyvsp[0].l), 1, sizeof(double));
      for(int i = 0; i < List_Nbr(yyvsp[0].l); i++){
	Shape *s = (Shape*) List_Pointer(yyvsp[0].l, i);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	double d = s->Num;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	List_Add(yyval.l, &d);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      }
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      List_Delete(yyvsp[0].l);
    ;
    break;}
case 330:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3267 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = List_Create(List_Nbr(yyvsp[0].l), 1, sizeof(double));
      for(int i = 0; i < List_Nbr(yyvsp[0].l); i++){
	Shape *s = (Shape*) List_Pointer(yyvsp[0].l, i);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	double d = s->Num;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	List_Add(yyval.l, &d);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      }
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      List_Delete(yyvsp[0].l);
    ;
    break;}
case 331:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3277 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = List_Create(List_Nbr(yyvsp[0].l), 1, sizeof(double));
      for(int i = 0; i < List_Nbr(yyvsp[0].l); i++){
	Shape *s = (Shape*) List_Pointer(yyvsp[0].l, i);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	List_Add(yyval.l, &d);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      List_Delete(yyvsp[0].l);
    ;
    break;}
case 332:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3287 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = List_Create(2, 1, sizeof(double));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Symbol TheSymbol;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      TheSymbol.Name = yyvsp[-2].c;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Symbol *pSymbol;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!(pSymbol = (Symbol*)Tree_PQuery(Symbol_T, &TheSymbol))) {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yymsg(GERROR, "Unknown variable '%s'", yyvsp[-2].c);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	double d = 0.0;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	List_Add(yyval.l, &d);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	for(int i = 0; i < List_Nbr(pSymbol->val); i++)
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	  List_Add(yyval.l, (double*)List_Pointer_Fast(pSymbol->val, i));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Free(yyvsp[-2].c);
    ;
    break;}
case 333:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3304 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = List_Create(2, 1, sizeof(double));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Symbol TheSymbol;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      TheSymbol.Name = yyvsp[-5].c;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Symbol *pSymbol;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!(pSymbol = (Symbol*)Tree_PQuery(Symbol_T, &TheSymbol))) {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yymsg(GERROR, "Unknown variable '%s'", yyvsp[-5].c);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	double d = 0.0;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	List_Add(yyval.l, &d);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	for(int i = 0; i < List_Nbr(yyvsp[-2].l); i++){
	  int j = (int)(*(double*)List_Pointer_Fast(yyvsp[-2].l, i));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	  double *pd;
	  if((pd = (double*)List_Pointer_Test(pSymbol->val, j)))
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	    List_Add(yyval.l, pd);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	    yymsg(GERROR, "Uninitialized variable '%s[%d]'", yyvsp[-5].c, j);	  
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Free(yyvsp[-5].c);
      List_Delete(yyvsp[-2].l);
    ;
    break;}
case 334:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3331 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = List_Create(2, 1, sizeof(double));
      List_Add(yyval.l, &(yyvsp[0].d));
    ;
    break;}
case 335:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3336 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = yyvsp[0].l;
    ;
    break;}
case 336:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3340 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      List_Add(yyval.l, &(yyvsp[0].d));
    ;
    break;}
case 337:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3344 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      for(int i = 0; i < List_Nbr(yyvsp[0].l); i++){
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	double d;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	List_Read(yyvsp[0].l, i, &d);
	List_Add(yyval.l, &d);
      }
      List_Delete(yyvsp[0].l);
    ;
    break;}
case 338:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3357 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.u = CTX.PACK_COLOR((int)yyvsp[-7].d, (int)yyvsp[-5].d, (int)yyvsp[-3].d, (int)yyvsp[-1].d);
    ;
    break;}
case 339:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3361 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.u = CTX.PACK_COLOR((int)yyvsp[-5].d, (int)yyvsp[-3].d, (int)yyvsp[-1].d, 255);
    ;
    break;}
case 340:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3373 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      yyval.u = Get_ColorForString(ColorString, -1, yyvsp[0].c, &flag);
      if(flag) yymsg(GERROR, "Unknown color '%s'", yyvsp[0].c);
      Free(yyvsp[0].c);
    ;
    break;}
case 341:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3380 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      unsigned int (*pColOpt)(int num, int action, unsigned int value);
      StringXColor *pColCat;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!(pColCat = Get_ColorOptionCategory(yyvsp[-4].c))){
	yymsg(GERROR, "Unknown color option class '%s'", yyvsp[-4].c);
	yyval.u = 0;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	if(!(pColOpt =  (unsigned int (*) (int, int, unsigned int))Get_ColorOption(yyvsp[0].c, pColCat))){
	  yymsg(GERROR, "Unknown color option '%s.Color.%s'", yyvsp[-4].c, yyvsp[0].c);
	  yyval.u = 0;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	  yyval.u = pColOpt(0, GMSH_GET, 0);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Free(yyvsp[-4].c); Free(yyvsp[0].c);
    ;
    break;}
case 342:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3402 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = yyvsp[-1].l;
    ;
    break;}
case 343:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3406 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = List_Create(256, 10, sizeof(unsigned int));
      GmshColorTable *ct = Get_ColorTable((int)yyvsp[-3].d);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yymsg(GERROR, "View[%d] does not exist", (int)yyvsp[-3].d);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	for(int i = 0; i < ct->size; i++) 
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	  List_Add(yyval.l, &ct->table[i]);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Free(yyvsp[-5].c);
    ;
    break;}
case 344:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3421 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.l = List_Create(256, 10, sizeof(unsigned int));
      List_Add(yyval.l, &(yyvsp[0].u));
    ;
    break;}
case 345:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3426 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      List_Add(yyval.l, &(yyvsp[0].u));
    ;
    break;}
case 346:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3433 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.c = yyvsp[0].c;
    ;
    break;}
case 347:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3437 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Msg(WARNING, "Named string expressions not implemented yet");
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    ;
    break;}
case 348:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3444 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.c = yyvsp[0].c;
    ;
    break;}
case 349:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3448 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.c = (char *)Malloc(32*sizeof(char));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      time_t now;
      time(&now);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      strcpy(yyval.c, ctime(&now));
      yyval.c[strlen(yyval.c) - 1] = '\0';
    ;
    break;}
case 350:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3456 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.c = (char *)Malloc((strlen(yyvsp[-3].c)+strlen(yyvsp[-1].c)+1)*sizeof(char));
      strcpy(yyval.c, yyvsp[-3].c);
      strcat(yyval.c, yyvsp[-1].c);
      Free(yyvsp[-3].c);
      Free(yyvsp[-1].c);
    ;
    break;}
case 351:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3464 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.c = (char *)Malloc((strlen(yyvsp[-1].c)+1)*sizeof(char));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      int i;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      for(i = strlen(yyvsp[-1].c)-1; i >= 0; i--){
	if(yyvsp[-1].c[i] == '.'){
	  strncpy(yyval.c, yyvsp[-1].c, i);
	  yyval.c[i]='\0';
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(i <= 0) strcpy(yyval.c, yyvsp[-1].c);
      Free(yyvsp[-1].c);
    ;
    break;}
case 352:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3478 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.c = (char *)Malloc((strlen(yyvsp[-1].c)+1)*sizeof(char));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      int i;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      for(i = strlen(yyvsp[-1].c)-1; i >= 0; i--){
	if(yyvsp[-1].c[i] == '/' || yyvsp[-1].c[i] == '\\')
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	  break;
      }
      if(i <= 0)
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	strcpy(yyval.c, yyvsp[-1].c);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      else
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	strcpy(yyval.c, &yyvsp[-1].c[i+1]);
      Free(yyvsp[-1].c);
    ;
    break;}
case 353:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3492 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
      yyval.c = yyvsp[-1].c;
    ;
    break;}
case 354:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3496 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      char tmpstring[1024];
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      int i = PrintListOfDouble(yyvsp[-3].c, yyvsp[-1].l, tmpstring);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(i < 0){
	yymsg(GERROR, "Too few arguments in Sprintf");
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yyval.c = yyvsp[-3].c;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      else if(i > 0){
	yymsg(GERROR, "%d extra argument%s in Sprintf", i, (i>1)?"s":"");
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yyval.c = yyvsp[-3].c;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yyval.c = (char*)Malloc((strlen(tmpstring)+1)*sizeof(char));
	strcpy(yyval.c, tmpstring);
	Free(yyvsp[-3].c);
      }
      List_Delete(yyvsp[-1].l);
    ;
    break;}
case 355:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3515 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ 
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      char* (*pStrOpt)(int num, int action, char *value);
      StringXString *pStrCat;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!(pStrCat = Get_StringOptionCategory(yyvsp[-3].c))){
	yymsg(GERROR, "Unknown string option class '%s'", yyvsp[-3].c);
	yyval.c = (char*)Malloc(sizeof(char));
	yyval.c[0] = '\0';
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      }
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	if(!(pStrOpt = (char *(*) (int, int, char *))Get_StringOption(yyvsp[-1].c, pStrCat))){
	  yymsg(GERROR, "Unknown string option '%s.%s'", yyvsp[-3].c, yyvsp[-1].c);
	  yyval.c = (char*)Malloc(sizeof(char));
	  yyval.c[0] = '\0';
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	}
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	  char *str = pStrOpt(0, GMSH_GET, NULL);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	  yyval.c = (char*)Malloc((strlen(str)+1)*sizeof(char));
	  strcpy(yyval.c, str);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    ;
    break;}
case 356:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 3537 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{ 
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      char* (*pStrOpt)(int num, int action, char *value);
      StringXString *pStrCat;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!(pStrCat = Get_StringOptionCategory(yyvsp[-6].c))){
	yymsg(GERROR, "Unknown string option class '%s'", yyvsp[-6].c);
	yyval.c = (char*)Malloc(sizeof(char));
	yyval.c[0] = '\0';
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      }
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	if(!(pStrOpt = (char *(*) (int, int, char *))Get_StringOption(yyvsp[-1].c, pStrCat))){
	  yymsg(GERROR, "Unknown string option '%s[%d].%s'", yyvsp[-6].c, (int)yyvsp[-4].d, yyvsp[-1].c);
	  yyval.c = (char*)Malloc(sizeof(char));
	  yyval.c[0] = '\0';
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	}
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	  char *str = pStrOpt((int)yyvsp[-4].d, GMSH_GET, NULL);
	  yyval.c = (char*)Malloc((strlen(str)+1)*sizeof(char));
	  strcpy(yyval.c, str);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    ;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
#line 543 "/usr/share/bison.simple"

  yyvsp -= yylen;
  yyssp -= yylen;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#ifdef YYLSP_NEEDED
  yylsp -= yylen;
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#ifdef YYLSP_NEEDED
  yylsp++;
  if (yylen == 0)
    {
      yylsp->first_line = yylloc.first_line;
      yylsp->first_column = yylloc.first_column;
      yylsp->last_line = (yylsp-1)->last_line;
      yylsp->last_column = (yylsp-1)->last_column;
      yylsp->text = 0;
    }
  else
    {
      yylsp->last_line = (yylsp+yylen-1)->last_line;
      yylsp->last_column = (yylsp+yylen-1)->last_column;
    }
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  /* Now "shift" the result of the reduction.
     Determine what state that goes to,
     based on the state we popped back to
     and the rule number reduced by.  */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    yystate = yydefgoto[yyn - YYNTBASE];
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
yyerrlab:   /* here on detecting error */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  if (! yyerrstatus)
    /* If not already recovering from an error, report this error.  */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

#ifdef YYERROR_VERBOSE
      yyn = yypact[yystate];
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if (yyn > YYFLAG && yyn < YYLAST)
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	  int size = 0;
	  char *msg;
	  int x, count;

	  count = 0;
	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
	  for (x = (yyn < 0 ? -yyn : 0);
	       x < (sizeof(yytname) / sizeof(char *)); x++)
	    if (yycheck[x + yyn] == x)
	      size += strlen(yytname[x]) + 15, count++;
	  msg = (char *) malloc(size + 15);
	  if (msg != 0)
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	      strcpy(msg, "parse error");
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	      if (count < 5)
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
		  count = 0;
		  for (x = (yyn < 0 ? -yyn : 0);
		       x < (sizeof(yytname) / sizeof(char *)); x++)
		    if (yycheck[x + yyn] == x)
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
			strcat(msg, count == 0 ? ", expecting `" : " or `");
			strcat(msg, yytname[x]);
			strcat(msg, "'");
			count++;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	      yyerror(msg);
	      free(msg);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	    yyerror ("parse error; also virtual memory exceeded");
	}
      else
#endif /* YYERROR_VERBOSE */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
	yyerror("parse error");
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  goto yyerrlab1;
yyerrlab1:   /* here on error raised explicitly by an action */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      /* if just tried and failed to reuse lookahead token after an error, discard it.  */

      /* return failure if at end of input */
      if (yychar == YYEOF)
	YYABORT;

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif

      yychar = YYEMPTY;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  /* Else will try to reuse lookahead token
     after shifting the error token.  */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  yyerrstatus = 3;		/* Each real token shifted decrements this */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  goto yyerrhandle;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
yyerrdefault:  /* current state does not do anything special for the error token. */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#if 0
  /* This is wrong; only states that explicitly want error tokens
     should shift them.  */
  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  if (yyn) goto yydefault;
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
yyerrpop:   /* pop the current state because it cannot handle the error token */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  if (yyssp == yyss) YYABORT;
  yyvsp--;
  yystate = *--yyssp;
#ifdef YYLSP_NEEDED
  yylsp--;
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#if YYDEBUG != 0
  if (yydebug)
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      short *ssp1 = yyss - 1;
      fprintf (stderr, "Error: state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
yyerrhandle:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yyerrdefault;

  yyn += YYTERROR;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
    goto yyerrdefault;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  yyn = yytable[yyn];
  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrpop;
      yyn = -yyn;
      goto yyreduce;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  else if (yyn == 0)
    goto yyerrpop;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting error token, ");
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif