"README.txt" did not exist on "47753698f1a834e89e71af00cdf9af512525660a"
Newer
Older

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown string option class '%s'", yyvsp[-3].c);
else{
if(!(pStrOpt = (char *(*) (int, int, char *))Get_StringOption(yyvsp[-1].c, pStrCat)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown string option '%s.%s'", yyvsp[-3].c, yyvsp[-1].c);
else{
str = pStrOpt(0,GMSH_GET,NULL) ;
yyval.c = (char*)Malloc((strlen(str)+1)*sizeof(char));
strcpy(yyval.c, str);
}
}

Christophe Geuzaine
committed
}
break;
case 449:
#line 3131 "Gmsh.y"

Christophe Geuzaine
committed
{
if(!(pStrCat = Get_StringOptionCategory(yyvsp[-6].c)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown string option class '%s'", yyvsp[-6].c);
else{
if(!(pStrOpt = (char *(*) (int, int, char *))Get_StringOption(yyvsp[-1].c, pStrCat)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown string option '%s[%d].%s'", yyvsp[-6].c, (int)yyvsp[-4].d, yyvsp[-1].c);
else{
str = pStrOpt((int)yyvsp[-4].d,GMSH_GET,NULL) ;
yyval.c = (char*)Malloc((strlen(str)+1)*sizeof(char));
strcpy(yyval.c, str);
}
}

Christophe Geuzaine
committed
}
break;

Christophe Geuzaine
committed
}

Christophe Geuzaine
committed
/* Line 1016 of /usr/share/bison/yacc.c. */
#line 9036 "Gmsh.tab.cpp"
yyvsp -= yylen;
yyssp -= yylen;

Christophe Geuzaine
committed
if (yydebug)
{
short *yyssp1 = yyss - 1;
YYFPRINTF (stderr, "state stack now");
while (yyssp1 != yyssp)
YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF (stderr, "\n");
}
#endif
*++yyvsp = yyval;

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. */
yyn = yyr1[yyn];

Christophe Geuzaine
committed
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else

Christophe Geuzaine
committed
yystate = yydefgoto[yyn - YYNTOKENS];
goto yynewstate;
/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;

Christophe Geuzaine
committed
#if YYERROR_VERBOSE
yyn = yypact[yystate];

Christophe Geuzaine
committed
if (YYPACT_NINF < yyn && yyn < YYLAST)
{
YYSIZE_T yysize = 0;

Christophe Geuzaine
committed
int yytype = YYTRANSLATE (yychar);
char *yymsg;
int yyx, yycount;
yycount = 0;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
for (yyx = yyn < 0 ? -yyn : 0;
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)

Christophe Geuzaine
committed
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
yysize += yystrlen (yytname[yyx]) + 15, yycount++;
yysize += yystrlen ("parse error, unexpected ") + 1;

Christophe Geuzaine
committed
yysize += yystrlen (yytname[yytype]);
yymsg = (char *) YYSTACK_ALLOC (yysize);
if (yymsg != 0)
{
char *yyp = yystpcpy (yymsg, "parse error, unexpected ");

Christophe Geuzaine
committed
yyp = yystpcpy (yyp, yytname[yytype]);
if (yycount < 5)
{
yycount = 0;
for (yyx = yyn < 0 ? -yyn : 0;
yyx < (int) (sizeof (yytname) / sizeof (char *));
yyx++)

Christophe Geuzaine
committed
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
const char *yyq = ! yycount ? ", expecting " : " or ";
yyp = yystpcpy (yyp, yyq);
yyp = yystpcpy (yyp, yytname[yyx]);
yycount++;
}
}
yyerror (yymsg);
YYSTACK_FREE (yymsg);
}
else
yyerror ("parse error; also virtual memory exhausted");
}
else

Christophe Geuzaine
committed
#endif /* YYERROR_VERBOSE */
yyerror ("parse error");
}

Christophe Geuzaine
committed
goto yyerrlab1;

Christophe Geuzaine
committed
/*----------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action. |
`----------------------------------------------------*/
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
error, discard it. */

Christophe Geuzaine
committed
/* Return failure if at end of input. */
if (yychar == YYEOF)

Christophe Geuzaine
committed
{
/* Pop the error token. */
YYPOPSTACK;
/* Pop the rest of the stack. */
while (yyssp > yyss)
{
YYDPRINTF ((stderr, "Error: popping "));
YYDSYMPRINT ((stderr,
yystos[*yyssp],
*yyvsp));
YYDPRINTF ((stderr, "\n"));
yydestruct (yystos[*yyssp], *yyvsp);
YYPOPSTACK;
}
YYABORT;
}
YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
yychar, yytname[yychar1]));

Christophe Geuzaine
committed
yydestruct (yychar1, yylval);
yychar = YYEMPTY;
}
/* Else will try to reuse lookahead token after shifting the error
token. */

Christophe Geuzaine
committed
yyerrstatus = 3; /* Each real token shifted decrements this. */

Christophe Geuzaine
committed
for (;;)
{
yyn = yypact[yystate];
if (yyn != YYPACT_NINF)
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
{
yyn = yytable[yyn];
if (0 < yyn)
break;
}
}

Christophe Geuzaine
committed
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
YYABORT;

Christophe Geuzaine
committed
YYDPRINTF ((stderr, "Error: popping "));
YYDSYMPRINT ((stderr,
yystos[*yyssp], *yyvsp));
YYDPRINTF ((stderr, "\n"));

Christophe Geuzaine
committed
yydestruct (yystos[yystate], *yyvsp);
yyvsp--;
yystate = *--yyssp;

Christophe Geuzaine
committed
if (yydebug)
{
short *yyssp1 = yyss - 1;
YYFPRINTF (stderr, "Error: state stack now");
while (yyssp1 != yyssp)
YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF (stderr, "\n");
}
#endif
}
if (yyn == YYFINAL)
YYACCEPT;
YYDPRINTF ((stderr, "Shifting error token, "));
*++yyvsp = yylval;

Christophe Geuzaine
committed
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
#ifndef yyoverflow
/*----------------------------------------------.
| yyoverflowlab -- parser overflow comes here. |
`----------------------------------------------*/
yyoverflowlab:
yyerror ("parser stack overflow");
yyresult = 2;
/* Fall through. */

Christophe Geuzaine
committed
#endif
yyreturn:
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
return yyresult;
}

Christophe Geuzaine
committed
#line 3146 "Gmsh.y"
void InitSymbols(void){
if(!Symbol_L)
Symbol_L = List_Create(50,10,sizeof(Symbol));
else
List_Reset(Symbol_L);
}
void DeleteSymbols(void){
int i;
for(i = 0 ; i < List_Nbr(Symbol_L) ; i++)
List_Delete(((Symbol*)List_Pointer_Fast(Symbol_L,i))->val);
List_Delete(Symbol_L);
}
int CompareSymbols (const void *a, const void *b){
return(strcmp(((Symbol*)a)->Name,((Symbol*)b)->Name));
}
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
int PrintListOfDouble(char *format, List_T *list, char *buffer){
int i, j, k;
char tmp1[256], tmp2[256];
j=0;
while(format[j]!='%') j++;
strncpy(buffer, format, j);
buffer[j]='\0';
for(i = 0 ; i<List_Nbr(list) ; i++){
k = j;
j++;
if(j<(int)strlen(format)){
if(format[j]=='%'){
strcat(buffer, "%");
j++;
}
while(format[j]!='%' && j<(int)strlen(format)) j++;
if(k != j){
strncpy(tmp1, &(format[k]),j-k);
tmp1[j-k]='\0';
sprintf(tmp2, tmp1, *(double*)List_Pointer(list,i));
strcat(buffer, tmp2);
}
}
else{
return List_Nbr(list)-i;
break ;
}
}
if(j != (int)strlen(format))
return -1;
return 0;
}

Christophe Geuzaine
committed
void yyerror(char *s){

Christophe Geuzaine
committed
Msg(GERROR, "'%s', line %d : %s (%s)",yyname,yylineno-1,s,yytext);
yyerrorstate=1;
}

Christophe Geuzaine
committed
void yymsg(int type, char *fmt, ...){
va_list args;
va_start (args, fmt);
vsprintf (tmp, fmt, args);
va_end (args);

Christophe Geuzaine
committed
Msg(type, "'%s', line %d : %s", yyname, yylineno-1, tmp);
if(type == GERROR) yyerrorstate=1;
}