Newer
Older
font = drawContext::global()->getFontIndex(val.c_str());
else if(key == "FontSize")
fontsize = atoi(val.c_str());
else if(key == "Align")
align = drawContext::global()->getFontAlign(val.c_str());
#endif
}
}
List_Delete((yyvsp[(3) - (4)].l));
(yyval.d) = (double)((align<<16)|(font<<8)|(fontsize));
#line 4362 "Gmsh.y"
memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double));
#line 4366 "Gmsh.y"
for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i];
#line 4370 "Gmsh.y"
for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i];
#line 4374 "Gmsh.y"
for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i];
#line 4378 "Gmsh.y"
for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i];
#line 4385 "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);
#line 4389 "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;
#line 4393 "Gmsh.y"
Matti Pellika
committed
{
(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;
Matti Pellika
committed
break;
Matti Pellika
committed
#line 4397 "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;
#line 4404 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(List_T*));
List_Add((yyval.l), &((yyvsp[(1) - (1)].l)));
#line 4409 "Gmsh.y"
#line 4416 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
#line 4421 "Gmsh.y"
#line 4425 "Gmsh.y"
#line 4430 "Gmsh.y"
#line 4434 "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);
#line 4442 "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);
#line 4453 "Gmsh.y"
break;
#line 4457 "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;
#line 4469 "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);
#line 4477 "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);
#line 4485 "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);
#line 4492 "Gmsh.y"
Matti Pellika
committed
if(!(yyvsp[(5) - (5)].d)){ //|| ($1 < $3 && $5 < 0) || ($1 > $3 && $5 > 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);
#line 4502 "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
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);

Christophe Geuzaine
committed
break;
#line 4522 "Gmsh.y"

Christophe Geuzaine
committed
{
Matti Pellika
committed
(yyval.l) = GetAllEntityNumbers(0);

Christophe Geuzaine
committed
break;
#line 4526 "Gmsh.y"

Christophe Geuzaine
committed
{
Matti Pellika
committed
(yyval.l) = GetAllEntityNumbers(1);

Christophe Geuzaine
committed
break;
#line 4530 "Gmsh.y"
Matti Pellika
committed
(yyval.l) = GetAllEntityNumbers(2);
#line 4534 "Gmsh.y"
Matti Pellika
committed
{
(yyval.l) = GetAllEntityNumbers(3);
Matti Pellika
committed
break;
Matti Pellika
committed
#line 4538 "Gmsh.y"
{
(yyval.l) = List_Create(10, 1, sizeof(double));
for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
double num;
List_Read((yyvsp[(4) - (5)].l), i, &num);
PhysicalGroup *p = FindPhysicalGroup((int)num, MSH_PHYSICAL_POINT);
if(p){
for(int j = 0; j < List_Nbr(p->Entities); j++){
int nume;
List_Read(p->Entities, j, &nume);
double d = nume;
List_Add((yyval.l), &d);
}
}
else{
std::map<int, std::vector<GEntity*> > groups[4];
GModel::current()->getPhysicalGroups(groups);
std::map<int, std::vector<GEntity*> >::iterator it = groups[0].find((int)num);
if(it != groups[0].end()){
for(unsigned j = 0; j < it->second.size(); j++){
double d = it->second[j]->tag();
List_Add((yyval.l), &d);
}
}
}
}
List_Delete((yyvsp[(4) - (5)].l));
#line 4567 "Gmsh.y"
{
(yyval.l) = List_Create(10, 1, sizeof(double));
for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
double num;
List_Read((yyvsp[(4) - (5)].l), i, &num);
PhysicalGroup *p = FindPhysicalGroup((int)num, MSH_PHYSICAL_LINE);
if(p){
for(int j = 0; j < List_Nbr(p->Entities); j++){
int nume;
List_Read(p->Entities, j, &nume);
double d = nume;
List_Add((yyval.l), &d);
}
}
else{
std::map<int, std::vector<GEntity*> > groups[4];
GModel::current()->getPhysicalGroups(groups);
std::map<int, std::vector<GEntity*> >::iterator it = groups[1].find((int)num);
if(it != groups[1].end()){
for(unsigned j = 0; j < it->second.size(); j++){
double d = it->second[j]->tag();
List_Add((yyval.l), &d);
}
}
}
}
List_Delete((yyvsp[(4) - (5)].l));
#line 4596 "Gmsh.y"
{
(yyval.l) = List_Create(10, 1, sizeof(double));
for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
double num;
List_Read((yyvsp[(4) - (5)].l), i, &num);
PhysicalGroup *p = FindPhysicalGroup((int)num, MSH_PHYSICAL_SURFACE);
if(p){
for(int j = 0; j < List_Nbr(p->Entities); j++){
int nume;
List_Read(p->Entities, j, &nume);
double d = nume;
List_Add((yyval.l), &d);
}
}
else{
std::map<int, std::vector<GEntity*> > groups[4];
GModel::current()->getPhysicalGroups(groups);
std::map<int, std::vector<GEntity*> >::iterator it = groups[2].find((int)num);
if(it != groups[2].end()){
for(unsigned j = 0; j < it->second.size(); j++){
double d = it->second[j]->tag();
List_Add((yyval.l), &d);
}
}
}
}
List_Delete((yyvsp[(4) - (5)].l));
#line 4625 "Gmsh.y"
{
(yyval.l) = List_Create(10, 1, sizeof(double));
for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
double num;
List_Read((yyvsp[(4) - (5)].l), i, &num);
PhysicalGroup *p = FindPhysicalGroup((int)num, MSH_PHYSICAL_VOLUME);
if(p){
for(int j = 0; j < List_Nbr(p->Entities); j++){
int nume;
List_Read(p->Entities, j, &nume);
double d = nume;
List_Add((yyval.l), &d);
}
}
else{
std::map<int, std::vector<GEntity*> > groups[4];
GModel::current()->getPhysicalGroups(groups);
std::map<int, std::vector<GEntity*> >::iterator it = groups[3].find((int)num);
if(it != groups[3].end()){
for(unsigned j = 0; j < it->second.size(); j++){
double d = it->second[j]->tag();
List_Add((yyval.l), &d);
}
}
}
}
List_Delete((yyvsp[(4) - (5)].l));
#line 4654 "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);
#line 4664 "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);
#line 4674 "Gmsh.y"
if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (3)].c));
else{
gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(1) - (3)].c)]);
for(unsigned int i = 0; i < s.value.size(); i++)
List_Add((yyval.l), &s.value[i]);
}
#line 4687 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (3)].c));
else{
gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(1) - (3)].c)]);
for(unsigned int i = 0; i < s.value.size(); i++)
List_Add((yyval.l), &s.value[i]);
}
Free((yyvsp[(1) - (3)].c));
#line 4699 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
if(!gmsh_yysymbols.count((yyvsp[(3) - (4)].c)))
yymsg(0, "Unknown variable '%s'", (yyvsp[(3) - (4)].c));
else{
gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(3) - (4)].c)]);
for(unsigned int i = 0; i < s.value.size(); i++)
List_Add((yyval.l), &s.value[i]);
}
Free((yyvsp[(3) - (4)].c));
#line 4711 "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));
yymsg(0, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (6)].c), index);
else
Free((yyvsp[(1) - (6)].c));
List_Delete((yyvsp[(4) - (6)].l));
#line 4730 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (6)].c));
else{
gmsh_yysymbol &s(gmsh_yysymbols[(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)s.value.size() < index + 1)
yymsg(0, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (6)].c), index);
else
List_Add((yyval.l), &s.value[index]);
}
}
Free((yyvsp[(1) - (6)].c));
List_Delete((yyvsp[(4) - (6)].l));
#line 4751 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
#line 4756 "Gmsh.y"
#line 4760 "Gmsh.y"
#line 4764 "Gmsh.y"
{
for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){
double d;
List_Read((yyvsp[(3) - (3)].l), i, &d);
List_Add((yyval.l), &d);
#line 4776 "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));
#line 4780 "Gmsh.y"
(yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255);
#line 4792 "Gmsh.y"
(yyval.u) = GetColorForString(-1, (yyvsp[(1) - (1)].c), &flag);
if(flag) yymsg(0, "Unknown color '%s'", (yyvsp[(1) - (1)].c));
#line 4799 "Gmsh.y"
unsigned int val = 0;
ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val);
(yyval.u) = val;
#line 4809 "Gmsh.y"
#line 4813 "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));
List_Add((yyval.l), &ct->table[i]);
#line 4828 "Gmsh.y"
{
(yyval.l) = List_Create(256, 10, sizeof(unsigned int));
List_Add((yyval.l), &((yyvsp[(1) - (1)].u)));
#line 4833 "Gmsh.y"
#line 4840 "Gmsh.y"
#line 4844 "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));
#line 4857 "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));
#line 4865 "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));
#line 4876 "Gmsh.y"
#line 4880 "Gmsh.y"
(yyval.c) = (char *)Malloc(32 * sizeof(char));
strcpy((yyval.c), ctime(&now));
(yyval.c)[strlen((yyval.c)) - 1] = '\0';
#line 4888 "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));
#line 4896 "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));
#line 4904 "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));
#line 4912 "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));
#line 4926 "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]);
#line 4940 "Gmsh.y"
#line 4945 "Gmsh.y"
{
(yyval.c) = (yyvsp[(3) - (4)].c);
;}
break;
case 448:
/* Line 1464 of yacc.c */
#line 4949 "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));
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
case 449:
/* Line 1464 of yacc.c */
#line 4969 "Gmsh.y"
{
char tmpstring[5000];
int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring);
if(i < 0){
yymsg(0, "Too few arguments in Sprintf");
(yyval.c) = (yyvsp[(3) - (6)].c);
}
else if(i > 0){
yymsg(0, "%d extra argument%s in Sprintf", i, (i > 1) ? "s" : "");
(yyval.c) = (yyvsp[(3) - (6)].c);
}
else{
(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;
case 450:
{
(yyval.l) = List_Create(20,20,sizeof(char*));
List_Add((yyval.l), &((yyvsp[(1) - (1)].c)));
{ List_Add((yyval.l), &((yyvsp[(3) - (3)].c))); ;}
#line 10946 "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;
#if ! YYERROR_VERBOSE
yyerror (YY_("syntax error"));
#else
{
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
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;
}
}