Newer
Older
if(!gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){
yymsg(0, "Unknown variable '%s'", (yyvsp[(2) - (4)].c));
(yyval.d) = 0.;
(yyval.d) = gmsh_yysymbols[(yyvsp[(2) - (4)].c)].size();
Emilie Marchandise
committed
case 337:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3795 "Gmsh.y"
if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (2)].c));
(yyval.d) = 0.;

Christophe Geuzaine
committed
else{
if(gmsh_yysymbols[(yyvsp[(1) - (2)].c)].empty()){
yymsg(0, "Uninitialized variable '%s'", (yyvsp[(1) - (2)].c));
(yyval.d) = 0.;
}
else
(yyval.d) = (gmsh_yysymbols[(yyvsp[(1) - (2)].c)][0] += (yyvsp[(2) - (2)].i));
}
Emilie Marchandise
committed
case 338:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3811 "Gmsh.y"
int index = (int)(yyvsp[(3) - (5)].d);
if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (5)].c));
(yyval.d) = 0.;
else if((int)gmsh_yysymbols[(yyvsp[(1) - (5)].c)].size() < index + 1){
yymsg(0, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (5)].c), index);
(yyval.d) = 0.;
(yyval.d) = (gmsh_yysymbols[(yyvsp[(1) - (5)].c)][index] += (yyvsp[(5) - (5)].i));
Emilie Marchandise
committed
case 339:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3829 "Gmsh.y"
NumberOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), (yyval.d));
Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c));
;}
break;
Emilie Marchandise
committed
case 340:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3834 "Gmsh.y"
NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), (yyval.d));
Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c));
;}
break;
Emilie Marchandise
committed
case 341:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3839 "Gmsh.y"
double d = 0.;
if(NumberOption(GMSH_GET, (yyvsp[(1) - (4)].c), 0, (yyvsp[(3) - (4)].c), d)){
d += (yyvsp[(4) - (4)].i);
NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (4)].c), 0, (yyvsp[(3) - (4)].c), d);
(yyval.d) = d;
Free((yyvsp[(1) - (4)].c)); Free((yyvsp[(3) - (4)].c));
;}
break;
Emilie Marchandise
committed
case 342:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3849 "Gmsh.y"
double d = 0.;
if(NumberOption(GMSH_GET, (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c), d)){
d += (yyvsp[(7) - (7)].i);
NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c), d);
(yyval.d) = d;
Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(6) - (7)].c));
;}
break;
Emilie Marchandise
committed
case 343:

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

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

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

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

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

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

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3890 "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;
Emilie Marchandise
committed
case 350:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3894 "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;
Emilie Marchandise
committed
case 351:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3898 "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;
Emilie Marchandise
committed
case 352:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3902 "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;
Emilie Marchandise
committed
case 353:

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

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

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

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

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

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

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3939 "Gmsh.y"
{
(yyval.l) = (yyvsp[(3) - (4)].l);
for(int i = 0; i < List_Nbr((yyval.l)); i++){
double *pd = (double*)List_Pointer((yyval.l), i);
(*pd) = - (*pd);
Emilie Marchandise
committed
case 360:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3947 "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);
Emilie Marchandise
committed
case 361:

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

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3962 "Gmsh.y"
{
if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all"))
(yyval.l) = 0;
else{
yyerror("Unknown special string for list replacement");
(yyval.l) = List_Create(2, 1, sizeof(double));
}
;}
break;
Emilie Marchandise
committed
case 363:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3974 "Gmsh.y"
{
(yyval.l) = (yyvsp[(2) - (2)].l);
for(int i = 0; i < List_Nbr((yyval.l)); i++){
double *pd = (double*)List_Pointer((yyval.l), i);
(*pd) = - (*pd);
Emilie Marchandise
committed
case 364:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3982 "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);
Emilie Marchandise
committed
case 365:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3990 "Gmsh.y"
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);
Emilie Marchandise
committed
case 366:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 3997 "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));
List_Add((yyval.l), &((yyvsp[(1) - (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);
Emilie Marchandise
committed
case 367:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4008 "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));
double d = 0.0;
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);
Emilie Marchandise
committed
case 368:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4028 "Gmsh.y"

Christophe Geuzaine
committed
{
(yyval.l) = GetAllEntityNumbers(0);
;}
break;
Emilie Marchandise
committed
case 369:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4032 "Gmsh.y"

Christophe Geuzaine
committed
{
(yyval.l) = GetAllEntityNumbers(1);
;}
break;
Emilie Marchandise
committed
case 370:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4036 "Gmsh.y"

Christophe Geuzaine
committed
{
(yyval.l) = GetAllEntityNumbers(2);
;}
break;
Emilie Marchandise
committed
case 371:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4040 "Gmsh.y"

Christophe Geuzaine
committed
{
(yyval.l) = GetAllEntityNumbers(3);
;}
break;
Emilie Marchandise
committed
case 372:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4044 "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;
List_Add((yyval.l), &d);
Emilie Marchandise
committed
case 373:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4054 "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;
List_Add((yyval.l), &d);
Emilie Marchandise
committed
case 374:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4064 "Gmsh.y"
if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (3)].c));
for(unsigned int i = 0; i < gmsh_yysymbols[(yyvsp[(1) - (3)].c)].size(); i++)
List_Add((yyval.l), &gmsh_yysymbols[(yyvsp[(1) - (3)].c)][i]);
Emilie Marchandise
committed
case 375:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4074 "Gmsh.y"
if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (6)].c));
for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
int index = (int)(*(double*)List_Pointer_Fast((yyvsp[(4) - (6)].l), i));
if((int)gmsh_yysymbols[(yyvsp[(1) - (6)].c)].size() < index + 1)
yymsg(0, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (6)].c), index);
else
List_Add((yyval.l), &gmsh_yysymbols[(yyvsp[(1) - (6)].c)][index]);
}
Free((yyvsp[(1) - (6)].c));
List_Delete((yyvsp[(4) - (6)].l));
;}
break;
Emilie Marchandise
committed
case 376:

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

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

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

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4107 "Gmsh.y"
double d;
List_Read((yyvsp[(3) - (3)].l), i, &d);
List_Add((yyval.l), &d);
Emilie Marchandise
committed
case 380:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4119 "Gmsh.y"
(yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d));
Emilie Marchandise
committed
case 381:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4123 "Gmsh.y"
(yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255);
Emilie Marchandise
committed
case 382:

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

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4142 "Gmsh.y"
unsigned int val = 0;
ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val);
(yyval.u) = val;
Free((yyvsp[(1) - (5)].c)); Free((yyvsp[(5) - (5)].c));
;}
break;
Emilie Marchandise
committed
case 384:

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

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4156 "Gmsh.y"
GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (6)].d));

Christophe Geuzaine
committed
if(!ct)
yymsg(0, "View[%d] does not exist", (int)(yyvsp[(3) - (6)].d));
for(int i = 0; i < ct->size; i++)
List_Add((yyval.l), &ct->table[i]);
Emilie Marchandise
committed
case 386:

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

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

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

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4187 "Gmsh.y"
if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){
yymsg(0, "Unknown string variable '%s'", (yyvsp[(1) - (1)].c));
(yyval.c) = (yyvsp[(1) - (1)].c);
std::string val = gmsh_yystringsymbols[(yyvsp[(1) - (1)].c)];
(yyval.c) = (char *)Malloc((val.size() + 1) * sizeof(char));
strcpy((yyval.c), val.c_str());
Free((yyvsp[(1) - (1)].c));
Emilie Marchandise
committed
case 390:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4200 "Gmsh.y"
StringOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), out);
(yyval.c) = (char*)Malloc((out.size() + 1) * sizeof(char));
strcpy((yyval.c), out.c_str());
Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c));
;}
break;
Emilie Marchandise
committed
case 391:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4208 "Gmsh.y"
StringOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), out);
(yyval.c) = (char*)Malloc((out.size() + 1) * sizeof(char));
strcpy((yyval.c), out.c_str());
Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c));
;}
break;
Emilie Marchandise
committed
case 392:

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

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4223 "Gmsh.y"
(yyval.c) = (char *)Malloc(32 * sizeof(char));
strcpy((yyval.c), ctime(&now));
(yyval.c)[strlen((yyval.c)) - 1] = '\0';
;}
break;
Emilie Marchandise
committed
case 394:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4231 "Gmsh.y"
const char *env = GetEnvironmentVar((yyvsp[(3) - (4)].c));
if(!env) env = "";
(yyval.c) = (char *)Malloc((sizeof(env) + 1) * sizeof(char));
strcpy((yyval.c), env);
Free((yyvsp[(3) - (4)].c));
;}
break;
Emilie Marchandise
committed
case 395:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4239 "Gmsh.y"
{
std::string s = Msg::GetString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c));
(yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char));
strcpy((yyval.c), s.c_str());
Free((yyvsp[(3) - (6)].c));
Free((yyvsp[(5) - (6)].c));
;}
break;
Emilie Marchandise
committed
case 396:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4247 "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;
Emilie Marchandise
committed
case 397:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4255 "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';
break;
}
if(i <= 0) strcpy((yyval.c), (yyvsp[(3) - (4)].c));
Free((yyvsp[(3) - (4)].c));
;}
break;
Emilie Marchandise
committed
case 398:

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4269 "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] == '\\')
break;
strcpy((yyval.c), (yyvsp[(3) - (4)].c));
strcpy((yyval.c), &(yyvsp[(3) - (4)].c)[i+1]);
Emilie Marchandise
committed
case 399:

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

Christophe Geuzaine
committed
Emilie Marchandise
committed
#line 4287 "Gmsh.y"
int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring);
yymsg(0, "Too few arguments in Sprintf");
(yyval.c) = (yyvsp[(3) - (6)].c);
yymsg(0, "%d extra argument%s in Sprintf", i, (i > 1) ? "s" : "");
(yyval.c) = (yyvsp[(3) - (6)].c);
(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
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;
#if ! YYERROR_VERBOSE
yyerror (YY_("syntax error"));
#else
{
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
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;
}
if (yyerrstatus == 3)
{

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;
}
{
yydestruct ("Error: discarding",
yytoken, &yylval);
yychar = YYEMPTY;
}

Christophe Geuzaine
committed
/* Else will try to reuse lookahead token after shifting the error
/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
yyerrorlab:
/* Pacify compilers like GCC when the user code never invokes
YYERROR and the label yyerrorlab therefore never appears in user
code. */
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
/* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
yystate = *yyssp;
goto yyerrlab1;
/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
{
yyn = yytable[yyn];
if (0 < yyn)
break;
}
}
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
yystos[yystate], yyvsp);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
/* Shift the error token. */
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here. |
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
goto yyreturn;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
yyresult = 1;
goto yyreturn;

Christophe Geuzaine
committed
#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
yyexhaustedlab:
yyerror (YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */

Christophe Geuzaine
committed
if (yychar != YYEMPTY)
/* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
yystos[*yyssp], yyvsp);