Newer
Older

Christophe Geuzaine
committed
case 263:
#line 2861 "Gmsh.y"
{ (yyval.d) = sqrt((yyvsp[(3) - (6)].d)*(yyvsp[(3) - (6)].d)+(yyvsp[(5) - (6)].d)*(yyvsp[(5) - (6)].d)); ;}

Christophe Geuzaine
committed
case 264:
#line 2862 "Gmsh.y"
{ (yyval.d) = (yyvsp[(3) - (4)].d)*(double)rand()/(double)RAND_MAX; ;}

Christophe Geuzaine
committed
case 265:
#line 2864 "Gmsh.y"

Christophe Geuzaine
committed
case 266:
#line 2865 "Gmsh.y"

Christophe Geuzaine
committed
case 267:
#line 2866 "Gmsh.y"

Christophe Geuzaine
committed
case 268:
#line 2867 "Gmsh.y"

Christophe Geuzaine
committed
case 269:
#line 2868 "Gmsh.y"

Christophe Geuzaine
committed
case 270:
#line 2869 "Gmsh.y"

Christophe Geuzaine
committed
case 271:
#line 2870 "Gmsh.y"

Christophe Geuzaine
committed
case 272:
#line 2871 "Gmsh.y"

Christophe Geuzaine
committed
case 273:
#line 2872 "Gmsh.y"

Christophe Geuzaine
committed
case 274:
#line 2873 "Gmsh.y"

Christophe Geuzaine
committed
case 275:
#line 2874 "Gmsh.y"
{ (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;}

Christophe Geuzaine
committed
case 276:
#line 2875 "Gmsh.y"

Christophe Geuzaine
committed
case 277:
#line 2876 "Gmsh.y"

Christophe Geuzaine
committed
case 278:
#line 2877 "Gmsh.y"

Christophe Geuzaine
committed
case 279:
#line 2878 "Gmsh.y"

Christophe Geuzaine
committed
case 280:
#line 2879 "Gmsh.y"

Christophe Geuzaine
committed
case 281:
#line 2880 "Gmsh.y"

Christophe Geuzaine
committed
case 282:
#line 2881 "Gmsh.y"
{ (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
break;

Christophe Geuzaine
committed
case 283:
#line 2882 "Gmsh.y"
{ (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}

Christophe Geuzaine
committed
case 284:
#line 2883 "Gmsh.y"
{ (yyval.d) = sqrt((yyvsp[(3) - (6)].d)*(yyvsp[(3) - (6)].d)+(yyvsp[(5) - (6)].d)*(yyvsp[(5) - (6)].d)); ;}

Christophe Geuzaine
committed
case 285:
#line 2884 "Gmsh.y"
{ (yyval.d) = (yyvsp[(3) - (4)].d)*(double)rand()/(double)RAND_MAX; ;}

Christophe Geuzaine
committed
case 286:
#line 2893 "Gmsh.y"

Christophe Geuzaine
committed
case 287:
#line 2894 "Gmsh.y"

Christophe Geuzaine
committed
case 288:
#line 2895 "Gmsh.y"
{ (yyval.d) = Msg::GetCommRank(); ;}

Christophe Geuzaine
committed
case 289:
#line 2896 "Gmsh.y"
{ (yyval.d) = Msg::GetCommSize(); ;}

Christophe Geuzaine
committed
case 290:
#line 2897 "Gmsh.y"

Christophe Geuzaine
committed
case 291:
#line 2898 "Gmsh.y"

Christophe Geuzaine
committed
case 292:
#line 2899 "Gmsh.y"

Christophe Geuzaine
committed
case 293:
#line 2904 "Gmsh.y"
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (1)].c));

Christophe Geuzaine
committed
else
(yyval.d) = *(double*)List_Pointer_Fast(pSymbol->val, 0);
Free((yyvsp[(1) - (1)].c));
;}
break;

Christophe Geuzaine
committed
case 294:
#line 2920 "Gmsh.y"
sprintf(tmpstring, "%s_%d", (yyvsp[(1) - (5)].c), (int)(yyvsp[(4) - (5)].d)) ;
Symbol TheSymbol;
TheSymbol.Name = tmpstring;
Symbol *pSymbol;
if(!(pSymbol = (Symbol*)Tree_PQuery(Symbol_T, &TheSymbol))) {
yymsg(0, "Unknown variable '%s'", tmpstring);
(yyval.d) = *(double*)List_Pointer_Fast(pSymbol->val, 0);
Free((yyvsp[(1) - (5)].c));
;}
break;

Christophe Geuzaine
committed
case 295:
#line 2935 "Gmsh.y"
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (4)].c));
if((pd = (double*)List_Pointer_Test(pSymbol->val, (int)(yyvsp[(3) - (4)].d))))
(yyval.d) = *pd;
yymsg(0, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (4)].c), (int)(yyvsp[(3) - (4)].d));

Christophe Geuzaine
committed
case 296:
#line 2955 "Gmsh.y"
yymsg(0, "Unknown variable '%s'", (yyvsp[(2) - (4)].c));
(yyval.d) = List_Nbr(pSymbol->val);
Free((yyvsp[(2) - (4)].c));
;}
break;

Christophe Geuzaine
committed
case 297:
#line 2968 "Gmsh.y"
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (2)].c));

Christophe Geuzaine
committed
else
(yyval.d) = (*(double*)List_Pointer_Fast(pSymbol->val, 0) += (yyvsp[(2) - (2)].i));
Free((yyvsp[(1) - (2)].c));
;}
break;

Christophe Geuzaine
committed
case 298:
#line 2981 "Gmsh.y"
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (5)].c));
if((pd = (double*)List_Pointer_Test(pSymbol->val, (int)(yyvsp[(3) - (5)].d))))
(yyval.d) = (*pd += (yyvsp[(5) - (5)].i));
yymsg(0, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (5)].c), (int)(yyvsp[(3) - (5)].d));

Christophe Geuzaine
committed
case 299:
#line 3004 "Gmsh.y"
double (*pNumOpt)(int num, int action, double value);
StringXNumber *pNumCat;
yymsg(0, "Unknown numeric option class '%s'", (yyvsp[(1) - (3)].c));
if(!(pNumOpt = (double (*) (int, int, double))Get_NumberOption((yyvsp[(3) - (3)].c), pNumCat))){
yymsg(0, "Unknown numeric option '%s.%s'", (yyvsp[(1) - (3)].c), (yyvsp[(3) - (3)].c));

Christophe Geuzaine
committed
else
Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c));
;}
break;

Christophe Geuzaine
committed
case 300:
#line 3022 "Gmsh.y"
double (*pNumOpt)(int num, int action, double value);
StringXNumber *pNumCat;
yymsg(0, "Unknown numeric option class '%s'", (yyvsp[(1) - (6)].c));
if(!(pNumOpt = (double (*) (int, int, double))Get_NumberOption((yyvsp[(6) - (6)].c), pNumCat))){
yymsg(0, "Unknown numeric option '%s[%d].%s'", (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c));

Christophe Geuzaine
committed
else
Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c));
;}
break;

Christophe Geuzaine
committed
case 301:
#line 3040 "Gmsh.y"
double (*pNumOpt)(int num, int action, double value);
StringXNumber *pNumCat;
yymsg(0, "Unknown numeric option class '%s'", (yyvsp[(1) - (4)].c));
if(!(pNumOpt = (double (*) (int, int, double))Get_NumberOption((yyvsp[(3) - (4)].c), pNumCat))){
yymsg(0, "Unknown numeric option '%s.%s'", (yyvsp[(1) - (4)].c), (yyvsp[(3) - (4)].c));

Christophe Geuzaine
committed
else
(yyval.d) = pNumOpt(0, GMSH_SET|GMSH_GUI, pNumOpt(0, GMSH_GET, 0)+(yyvsp[(4) - (4)].i));
Free((yyvsp[(1) - (4)].c)); Free((yyvsp[(3) - (4)].c));
;}
break;

Christophe Geuzaine
committed
case 302:
#line 3058 "Gmsh.y"
double (*pNumOpt)(int num, int action, double value);
StringXNumber *pNumCat;
yymsg(0, "Unknown numeric option class '%s'", (yyvsp[(1) - (7)].c));
if(!(pNumOpt = (double (*) (int, int, double))Get_NumberOption((yyvsp[(6) - (7)].c), pNumCat))){
yymsg(0, "Unknown numeric option '%s[%d].%s'", (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c));

Christophe Geuzaine
committed
else
(yyval.d) = pNumOpt((int)(yyvsp[(3) - (7)].d), GMSH_SET|GMSH_GUI, pNumOpt((int)(yyvsp[(3) - (7)].d), GMSH_GET, 0)+(yyvsp[(7) - (7)].i));
Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(6) - (7)].c));
;}
break;

Christophe Geuzaine
committed
case 303:
#line 3076 "Gmsh.y"
(yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d));

Christophe Geuzaine
committed
case 304:
#line 3084 "Gmsh.y"
{
memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double));
;}
break;

Christophe Geuzaine
committed
case 305:
#line 3088 "Gmsh.y"
{
for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i];
;}
break;

Christophe Geuzaine
committed
case 306:
#line 3092 "Gmsh.y"
{
for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i];
;}
break;

Christophe Geuzaine
committed
case 307:
#line 3096 "Gmsh.y"
{
for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i];
;}
break;

Christophe Geuzaine
committed
case 308:
#line 3100 "Gmsh.y"
{
for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i];
;}
break;

Christophe Geuzaine
committed
case 309:
#line 3107 "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;

Christophe Geuzaine
committed
case 310:
#line 3111 "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;

Christophe Geuzaine
committed
case 311:
#line 3115 "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;

Christophe Geuzaine
committed
case 312:
#line 3119 "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;

Christophe Geuzaine
committed
case 313:
#line 3126 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(List_T*));
List_Add((yyval.l), &((yyvsp[(1) - (1)].l)));
;}
break;

Christophe Geuzaine
committed
case 314:
#line 3131 "Gmsh.y"
{
List_Add((yyval.l), &((yyvsp[(3) - (3)].l)));
;}
break;

Christophe Geuzaine
committed
case 315:
#line 3139 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
;}
break;

Christophe Geuzaine
committed
case 316:
#line 3144 "Gmsh.y"
{
(yyval.l) = (yyvsp[(1) - (1)].l);
;}
break;

Christophe Geuzaine
committed
case 317:
#line 3148 "Gmsh.y"
(yyval.l) = List_Create(2, 1, sizeof(double));
;}
break;

Christophe Geuzaine
committed
case 318:
#line 3153 "Gmsh.y"
{
(yyval.l) = (yyvsp[(2) - (3)].l);
;}
break;

Christophe Geuzaine
committed
case 319:
#line 3157 "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);

Christophe Geuzaine
committed
case 320:
#line 3165 "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;

Christophe Geuzaine
committed
case 321:
#line 3176 "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);

Christophe Geuzaine
committed
case 322:
#line 3184 "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;

Christophe Geuzaine
committed
case 323:
#line 3192 "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;

Christophe Geuzaine
committed
case 324:
#line 3198 "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)){
yymsg(0, "Wrong increment in '%g:%g:%g'", (yyvsp[(1) - (5)].d), (yyvsp[(3) - (5)].d), (yyvsp[(5) - (5)].d));
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;

Christophe Geuzaine
committed
case 325:
#line 3209 "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
// always conserved
Vertex *v = FindPoint((int)(yyvsp[(3) - (4)].d));
(yyval.l) = List_Create(3, 1, sizeof(double));
yymsg(0, "Unknown point '%d'", (int)(yyvsp[(3) - (4)].d));
List_Add((yyval.l), &d);
List_Add((yyval.l), &d);
List_Add((yyval.l), &d);
List_Add((yyval.l), &v->Pos.X);
List_Add((yyval.l), &v->Pos.Y);
List_Add((yyval.l), &v->Pos.Z);

Christophe Geuzaine
committed
case 326:
#line 3229 "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++){
Shape *s = (Shape*) List_Pointer((yyvsp[(1) - (1)].l), i);

Christophe Geuzaine
committed
case 327:
#line 3239 "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++){
Shape *s = (Shape*) List_Pointer((yyvsp[(1) - (1)].l), i);
double d = s->Num;

Christophe Geuzaine
committed
case 328:
#line 3249 "Gmsh.y"
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (3)].c));
List_Add((yyval.l), (double*)List_Pointer_Fast(pSymbol->val, i));

Christophe Geuzaine
committed
case 329:
#line 3266 "Gmsh.y"
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (6)].c));
for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
int j = (int)(*(double*)List_Pointer_Fast((yyvsp[(4) - (6)].l), i));
if((pd = (double*)List_Pointer_Test(pSymbol->val, j)))
yymsg(0, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (6)].c), j);
Free((yyvsp[(1) - (6)].c));
List_Delete((yyvsp[(4) - (6)].l));
;}
break;

Christophe Geuzaine
committed
case 330:
#line 3293 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
;}
break;

Christophe Geuzaine
committed
case 331:
#line 3298 "Gmsh.y"
{
(yyval.l) = (yyvsp[(1) - (1)].l);
;}
break;

Christophe Geuzaine
committed
case 332:
#line 3302 "Gmsh.y"
{
List_Add((yyval.l), &((yyvsp[(3) - (3)].d)));
;}
break;

Christophe Geuzaine
committed
case 333:
#line 3306 "Gmsh.y"
List_Read((yyvsp[(3) - (3)].l), i, &d);
List_Add((yyval.l), &d);

Christophe Geuzaine
committed
case 334:
#line 3319 "Gmsh.y"
{
(yyval.u) = CTX.PACK_COLOR((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d));
;}
break;

Christophe Geuzaine
committed
case 335:
#line 3323 "Gmsh.y"
{
(yyval.u) = CTX.PACK_COLOR((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255);
;}
break;

Christophe Geuzaine
committed
case 336:
#line 3335 "Gmsh.y"
(yyval.u) = Get_ColorForString(ColorString, -1, (yyvsp[(1) - (1)].c), &flag);
if(flag) yymsg(0, "Unknown color '%s'", (yyvsp[(1) - (1)].c));

Christophe Geuzaine
committed
case 337:
#line 3342 "Gmsh.y"
unsigned int (*pColOpt)(int num, int action, unsigned int value);
StringXColor *pColCat;
yymsg(0, "Unknown color option class '%s'", (yyvsp[(1) - (5)].c));
if(!(pColOpt = (unsigned int (*) (int, int, unsigned int))Get_ColorOption((yyvsp[(5) - (5)].c), pColCat))){
yymsg(0, "Unknown color option '%s.Color.%s'", (yyvsp[(1) - (5)].c), (yyvsp[(5) - (5)].c));
Free((yyvsp[(1) - (5)].c)); Free((yyvsp[(5) - (5)].c));
;}
break;

Christophe Geuzaine
committed
case 338:
#line 3363 "Gmsh.y"
{
(yyval.l) = (yyvsp[(2) - (3)].l);
;}
break;

Christophe Geuzaine
committed
case 339:
#line 3367 "Gmsh.y"
{
(yyval.l) = List_Create(256, 10, sizeof(unsigned int));
GmshColorTable *ct = Get_ColorTable((int)(yyvsp[(3) - (6)].d));

Christophe Geuzaine
committed
if(!ct)
yymsg(0, "View[%d] does not exist", (int)(yyvsp[(3) - (6)].d));

Christophe Geuzaine
committed
case 340:
#line 3382 "Gmsh.y"
{
(yyval.l) = List_Create(256, 10, sizeof(unsigned int));
List_Add((yyval.l), &((yyvsp[(1) - (1)].u)));
;}
break;

Christophe Geuzaine
committed
case 341:
#line 3387 "Gmsh.y"
{
List_Add((yyval.l), &((yyvsp[(3) - (3)].u)));
;}
break;

Christophe Geuzaine
committed
case 342:
#line 3394 "Gmsh.y"
{
(yyval.c) = (yyvsp[(1) - (1)].c);
;}
break;

Christophe Geuzaine
committed
case 343:
#line 3398 "Gmsh.y"
Msg::Warning("Named string expressions not implemented yet");

Christophe Geuzaine
committed
case 344:
#line 3405 "Gmsh.y"
{
(yyval.c) = (yyvsp[(1) - (1)].c);
;}
break;

Christophe Geuzaine
committed
case 345:
#line 3409 "Gmsh.y"
strcpy((yyval.c), ctime(&now));
(yyval.c)[strlen((yyval.c)) - 1] = '\0';
;}
break;

Christophe Geuzaine
committed
case 346:
#line 3417 "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;

Christophe Geuzaine
committed
case 347:
#line 3425 "Gmsh.y"
{
(yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c))+1)*sizeof(char));
for(i = strlen((yyvsp[(3) - (4)].c))-1; i >= 0; i--){
if((yyvsp[(3) - (4)].c)[i] == '.'){
strncpy((yyval.c), (yyvsp[(3) - (4)].c), i);
(yyval.c)[i]='\0';
if(i <= 0) strcpy((yyval.c), (yyvsp[(3) - (4)].c));
Free((yyvsp[(3) - (4)].c));
;}
break;

Christophe Geuzaine
committed
case 348:
#line 3439 "Gmsh.y"
{
(yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c))+1)*sizeof(char));
for(i = strlen((yyvsp[(3) - (4)].c))-1; i >= 0; i--){
if((yyvsp[(3) - (4)].c)[i] == '/' || (yyvsp[(3) - (4)].c)[i] == '\\')
strcpy((yyval.c), &(yyvsp[(3) - (4)].c)[i+1]);
Free((yyvsp[(3) - (4)].c));
;}
break;

Christophe Geuzaine
committed
case 349:
#line 3453 "Gmsh.y"
{
(yyval.c) = (yyvsp[(3) - (4)].c);
;}
break;

Christophe Geuzaine
committed
case 350:
#line 3457 "Gmsh.y"
int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring);
yymsg(0, "Too few arguments in Sprintf");
yymsg(0, "%d extra argument%s in Sprintf", i, (i>1)?"s":"");
(yyval.c) = (char*)Malloc((strlen(tmpstring)+1)*sizeof(char));
strcpy((yyval.c), tmpstring);
Free((yyvsp[(3) - (6)].c));
}
List_Delete((yyvsp[(5) - (6)].l));
;}
break;

Christophe Geuzaine
committed
case 351:
#line 3476 "Gmsh.y"
const char* (*pStrOpt)(int num, int action, const char *value);
yymsg(0, "Unknown string option class '%s'", (yyvsp[(3) - (6)].c));
(yyval.c) = (char*)Malloc(sizeof(char));
(yyval.c)[0] = '\0';
if(!(pStrOpt = (const char *(*) (int, int, const char *))
Get_StringOption((yyvsp[(5) - (6)].c), pStrCat))){
yymsg(0, "Unknown string option '%s.%s'", (yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c));
(yyval.c) = (char*)Malloc(sizeof(char));
(yyval.c)[0] = '\0';
const char *str = pStrOpt(0, GMSH_GET, NULL);
(yyval.c) = (char*)Malloc((strlen(str)+1)*sizeof(char));
strcpy((yyval.c), str);

Christophe Geuzaine
committed
case 352:
#line 3499 "Gmsh.y"
const char* (*pStrOpt)(int num, int action, const char *value);
yymsg(0, "Unknown string option class '%s'", (yyvsp[(3) - (9)].c));
(yyval.c) = (char*)Malloc(sizeof(char));
(yyval.c)[0] = '\0';
if(!(pStrOpt = (const char *(*) (int, int, const char *))
Get_StringOption((yyvsp[(8) - (9)].c), pStrCat))){
yymsg(0, "Unknown string option '%s[%d].%s'", (yyvsp[(3) - (9)].c), (int)(yyvsp[(5) - (9)].d), (yyvsp[(8) - (9)].c));
(yyval.c) = (char*)Malloc(sizeof(char));
(yyval.c)[0] = '\0';
const char *str = pStrOpt((int)(yyvsp[(5) - (9)].d), GMSH_GET, NULL);
(yyval.c) = (char*)Malloc((strlen(str)+1)*sizeof(char));
strcpy((yyval.c), str);
#line 7903 "Gmsh.tab.cpp"
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
/* 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. */
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
goto yynewstate;
/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
#if ! YYERROR_VERBOSE
yyerror (YY_("syntax error"));
#else
{
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;
}
}
#endif
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse look-ahead token after an
error, discard it. */
if (yychar <= YYEOF)
{
/* Return failure if at end of input. */
if (yychar == YYEOF)
YYABORT;
}
else
{
yydestruct ("Error: discarding",
yytoken, &yylval);
yychar = YYEMPTY;
}
/* Else will try to reuse look-ahead token after shifting the error
token. */
goto yyerrlab1;