comparison mc-parse.c @ 559:c55b51d51f8f

*** empty log message ***
author kono
date Sat, 07 Jan 2006 13:09:45 +0900
parents 528fed826f17
children d6ff45d719a5
comparison
equal deleted inserted replaced
558:528fed826f17 559:c55b51d51f8f
303 case OPTION: // "Illegal option" : 303 case OPTION: // "Illegal option" :
304 case INERR: // "bad initialization" : 304 case INERR: // "bad initialization" :
305 case AGERR: // "wrong number of arguments" : 305 case AGERR: // "wrong number of arguments" :
306 case CODE_ERR: // "goto is necessary" : 306 case CODE_ERR: // "goto is necessary" :
307 case ILERR: // "inline error" : 307 case ILERR: // "inline error" :
308 case SIERR: // "non brace in struct init error" :
308 return 0; 309 return 0;
309 } 310 }
310 return 1; 311 return 1;
311 } 312 }
312 313
364 (n==REG_ERR) ? "illegal register var" : 365 (n==REG_ERR) ? "illegal register var" :
365 (n==INERR) ? "bad initialization" : 366 (n==INERR) ? "bad initialization" :
366 (n==AGERR) ? "wrong number of arguments" : 367 (n==AGERR) ? "wrong number of arguments" :
367 (n==CODE_ERR) ? "goto is necessary" : 368 (n==CODE_ERR) ? "goto is necessary" :
368 (n==ILERR) ? "inline error" : 369 (n==ILERR) ? "inline error" :
370 (n==SIERR) ? "warning: missing braces around initializer" :
369 (n==CSERR) ? "no excutable code in switch" : 371 (n==CSERR) ? "no excutable code in switch" :
370 "Bug of compiler"); 372 "Bug of compiler");
371 errmsg(); 373 errmsg();
372 if (serious(n)) 374 if (serious(n))
373 exit(1); 375 exit(1);
1384 // Do it more upper syntactical node; 1386 // Do it more upper syntactical node;
1385 if ((offset = decl_data_1(type,n,offset))) { 1387 if ((offset = decl_data_1(type,n,offset))) {
1386 return offset; 1388 return offset;
1387 } 1389 }
1388 checksym(RPAR); 1390 checksym(RPAR);
1391 } else {
1392 error(SIERR);
1389 } 1393 }
1390 mode=SFDINIT; 1394 mode=SFDINIT;
1391 while(1) { 1395 while(1) {
1392 if (sym==PERIOD) { /* struct/union field initializaer */ 1396 if (sym==PERIOD) { /* struct/union field initializaer */
1393 period=1; 1397 period=1;
1570 // decl_data_field(t,n,offset) is called inside; 1574 // decl_data_field(t,n,offset) is called inside;
1571 } else 1575 } else
1572 #endif 1576 #endif
1573 offset=decl_data_field(t,n,offset); 1577 offset=decl_data_field(t,n,offset);
1574 conv->decl_data_end_(); conv->rc_(); 1578 conv->decl_data_end_(); conv->rc_();
1575 if (lc) checksym(RC); 1579 if (lc) {
1580 while (sym==COMMA) getsym(0);
1581 checksym(RC);
1582 }
1576 return offset; 1583 return offset;
1577 } 1584 }
1578 mode = mode_save; 1585 mode = mode_save;
1579 error(TYERR); /* should be initialization error */ 1586 error(TYERR); /* should be initialization error */
1580 return offset; /* not reached */ 1587 return offset; /* not reached */