Changeset 4617 for trunk/tools
- Timestamp:
- Nov 19, 2000, 9:24:49 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/wrc/y.tab.c
r3426 r4617 1 1 2 2 /* A Bison parser, made from parser.y 3 by GNU Bison version 1.25 4 */ 3 by GNU Bison version 1.28 */ 5 4 6 5 #define YYBISON 1 /* Identify Bison output. */ 7 6 8 #define tIF 25 89 #define tIFDEF 25 910 #define tIFNDEF 2 6011 #define tELSE 26 112 #define tELIF 26 213 #define tENDIF 26 314 #define tDEFINED 26 415 #define tNL 26 516 #define tTYPEDEF 26 617 #define tEXTERN 26 718 #define NUMBER 26 819 #define LNUMBER 26 920 #define tSTRING 2 7021 #define IDENT 27 122 #define FILENAME 27 223 #define RAWDATA 27 324 #define ACCELERATORS 27 425 #define tBITMAP 27 526 #define CURSOR 27 627 #define DIALOG 27 728 #define DIALOGEX 27 829 #define MENU 27 930 #define MENUEX 2 8031 #define MESSAGETABLE 28 132 #define RCDATA 28 233 #define VERSIONINFO 28 334 #define STRINGTABLE 28 435 #define FONT 28 536 #define ICON 28 637 #define AUTO3STATE 28 738 #define AUTOCHECKBOX 28 839 #define AUTORADIOBUTTON 28 940 #define CHECKBOX 2 9041 #define DEFPUSHBUTTON 29 142 #define PUSHBUTTON 29 243 #define RADIOBUTTON 29 344 #define STATE3 29 445 #define GROUPBOX 29 546 #define COMBOBOX 29 647 #define LISTBOX 29 748 #define SCROLLBAR 29 849 #define CONTROL 29 950 #define EDITTEXT 30051 #define RTEXT 30 152 #define CTEXT 30 253 #define LTEXT 30 354 #define BLOCK 30 455 #define VALUE 30 556 #define SHIFT 30 657 #define ALT 30 758 #define ASCII 30 859 #define VIRTKEY 30 960 #define GRAYED 3 1061 #define CHECKED 31 162 #define INACTIVE 31 263 #define NOINVERT 31 364 #define tPURE 31 465 #define IMPURE 31 566 #define DISCARDABLE 31 667 #define LOADONCALL 31 768 #define PRELOAD 31 869 #define tFIXED 31 970 #define MOVEABLE 3 2071 #define CLASS 32 172 #define CAPTION 32 273 #define CHARACTERISTICS 32 374 #define EXSTYLE 32 475 #define STYLE 32 576 #define VERSION 32 677 #define LANGUAGE 32 778 #define FILEVERSION 32 879 #define PRODUCTVERSION 32 980 #define FILEFLAGSMASK 3 3081 #define FILEOS 33 182 #define FILETYPE 33 283 #define FILEFLAGS 33 384 #define FILESUBTYPE 33 485 #define MENUBARBREAK 33 586 #define MENUBREAK 33 687 #define MENUITEM 33 788 #define POPUP 33 889 #define SEPARATOR 33 990 #define HELP 3 4091 #define TOOLBAR 34 192 #define BUTTON 34 293 #define tBEGIN 34 394 #define tEND 34 495 #define DLGINIT 34 596 #define LOGOR 34 697 #define LOGAND 34 798 #define EQ 34 899 #define NE 34 9100 #define LTE 3 50101 #define GTE 35 1102 #define NOT 35 27 #define tIF 257 8 #define tIFDEF 258 9 #define tIFNDEF 259 10 #define tELSE 260 11 #define tELIF 261 12 #define tENDIF 262 13 #define tDEFINED 263 14 #define tNL 264 15 #define tTYPEDEF 265 16 #define tEXTERN 266 17 #define NUMBER 267 18 #define LNUMBER 268 19 #define tSTRING 269 20 #define IDENT 270 21 #define FILENAME 271 22 #define RAWDATA 272 23 #define ACCELERATORS 273 24 #define tBITMAP 274 25 #define CURSOR 275 26 #define DIALOG 276 27 #define DIALOGEX 277 28 #define MENU 278 29 #define MENUEX 279 30 #define MESSAGETABLE 280 31 #define RCDATA 281 32 #define VERSIONINFO 282 33 #define STRINGTABLE 283 34 #define FONT 284 35 #define ICON 285 36 #define AUTO3STATE 286 37 #define AUTOCHECKBOX 287 38 #define AUTORADIOBUTTON 288 39 #define CHECKBOX 289 40 #define DEFPUSHBUTTON 290 41 #define PUSHBUTTON 291 42 #define RADIOBUTTON 292 43 #define STATE3 293 44 #define GROUPBOX 294 45 #define COMBOBOX 295 46 #define LISTBOX 296 47 #define SCROLLBAR 297 48 #define CONTROL 298 49 #define EDITTEXT 299 50 #define RTEXT 300 51 #define CTEXT 301 52 #define LTEXT 302 53 #define BLOCK 303 54 #define VALUE 304 55 #define SHIFT 305 56 #define ALT 306 57 #define ASCII 307 58 #define VIRTKEY 308 59 #define GRAYED 309 60 #define CHECKED 310 61 #define INACTIVE 311 62 #define NOINVERT 312 63 #define tPURE 313 64 #define IMPURE 314 65 #define DISCARDABLE 315 66 #define LOADONCALL 316 67 #define PRELOAD 317 68 #define tFIXED 318 69 #define MOVEABLE 319 70 #define CLASS 320 71 #define CAPTION 321 72 #define CHARACTERISTICS 322 73 #define EXSTYLE 323 74 #define STYLE 324 75 #define VERSION 325 76 #define LANGUAGE 326 77 #define FILEVERSION 327 78 #define PRODUCTVERSION 328 79 #define FILEFLAGSMASK 329 80 #define FILEOS 330 81 #define FILETYPE 331 82 #define FILEFLAGS 332 83 #define FILESUBTYPE 333 84 #define MENUBARBREAK 334 85 #define MENUBREAK 335 86 #define MENUITEM 336 87 #define POPUP 337 88 #define SEPARATOR 338 89 #define HELP 339 90 #define TOOLBAR 340 91 #define BUTTON 341 92 #define tBEGIN 342 93 #define tEND 343 94 #define DLGINIT 344 95 #define LOGOR 345 96 #define LOGAND 346 97 #define EQ 347 98 #define NE 348 99 #define LTE 349 100 #define GTE 350 101 #define NOT 351 103 102 104 103 #line 1 "parser.y" … … 110 109 * 111 110 * 6-Nov-1999 JS - see CHANGES 112 * 111 * 113 112 * 29-Dec-1998 AdH - Grammar and function extensions. 114 * grammar: TOOLBAR resources, Named ICONs in 113 * grammar: TOOLBAR resources, Named ICONs in 115 114 * DIALOGS 116 * functions: semantic actions for the grammar 115 * functions: semantic actions for the grammar 117 116 * changes, resource files can now be anywhere 118 117 * on the include path instead of just in the … … 214 213 #include "wingdi.h" 215 214 #include "winuser.h" 215 /* kso Sun 19.11.2000 */ 216 #undef strcasecmp 217 #define strcasecmp stricmp 216 218 217 219 #ifdef __BORLANDC__ … … 347 349 #define YYNTBASE 112 348 350 349 #define YYTRANSLATE(x) ((unsigned)(x) <= 35 2? yytranslate[x] : 191)351 #define YYTRANSLATE(x) ((unsigned)(x) <= 351 ? yytranslate[x] : 191) 350 352 351 353 static const char yytranslate[] = { 0, … … 375 377 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 376 378 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 377 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,378 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,379 1 6, 17, 18, 19, 20, 21, 22, 23, 24, 25,380 2 6, 27, 28, 29, 30, 31, 32, 33, 34, 35,381 3 6, 37, 38, 39, 40, 41, 42, 43, 44, 45,382 4 6, 47, 48, 49, 50, 51, 52, 53, 54, 55,383 5 6, 57, 58, 59, 60, 61, 62, 63, 64, 65,384 6 6, 67, 68, 69, 70, 71, 72, 73, 74, 75,385 7 6, 77, 78, 79, 80, 81, 82, 83, 84, 85,386 8 6, 87, 88, 89, 90, 91, 92, 96, 97, 99,387 10 1, 108379 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 380 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 381 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 382 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 383 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 384 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 385 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 386 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 387 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 388 87, 88, 89, 90, 91, 92, 96, 97, 99, 101, 389 108 388 390 }; 389 391 … … 982 984 }; 983 985 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ 984 #line 3 "bison.simple" 986 #line 3 "/emx/share/bison.simple" 987 /* This file comes from bison-1.28. */ 985 988 986 989 /* Skeleton output parser for bison, … … 999 1002 You should have received a copy of the GNU General Public License 1000 1003 along with this program; if not, write to the Free Software 1001 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 1004 Foundation, Inc., 59 Temple Place - Suite 330, 1005 Boston, MA 02111-1307, USA. */ 1002 1006 1003 1007 /* As a special exception, when this file is copied by Bison into a … … 1006 1010 in version 1.24 of Bison. */ 1007 1011 1008 #ifndef alloca1009 #ifdef __GNUC__1010 #define alloca __builtin_alloca1011 #else /* not GNU C. */1012 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)1013 #include <alloca.h>1014 #else /* not sparc */1015 #if defined (MSDOS) && !defined (__TURBOC__)1016 #include <malloc.h>1017 #else /* not MSDOS, or __TURBOC__ */1018 #if defined(_AIX)1019 #include <malloc.h>1020 #pragma alloca1021 #else /* not MSDOS, __TURBOC__, or _AIX */1022 #ifdef __hpux1023 #ifdef __cplusplus1024 extern "C" {1025 void *alloca (unsigned int);1026 };1027 #else /* not __cplusplus */1028 void *alloca ();1029 #endif /* not __cplusplus */1030 #endif /* __hpux */1031 #endif /* not _AIX */1032 #endif /* not MSDOS, or __TURBOC__ */1033 #endif /* not sparc. */1034 #endif /* not GNU C. */1035 #endif /* alloca not defined. */1036 1037 1012 /* This is the parser code that is written into each bison parser 1038 1013 when the %semantic_parser declaration is not specified in the grammar. … … 1040 1015 used when %semantic_parser is specified. */ 1041 1016 1017 #ifndef YYSTACK_USE_ALLOCA 1018 #ifdef alloca 1019 #define YYSTACK_USE_ALLOCA 1020 #else /* alloca not defined */ 1021 #ifdef __GNUC__ 1022 #define YYSTACK_USE_ALLOCA 1023 #define alloca __builtin_alloca 1024 #else /* not GNU C. */ 1025 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) 1026 #define YYSTACK_USE_ALLOCA 1027 #include <alloca.h> 1028 #else /* not sparc */ 1029 /* We think this test detects Watcom and Microsoft C. */ 1030 /* This used to test MSDOS, but that is a bad idea 1031 since that symbol is in the user namespace. */ 1032 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) 1033 #if 0 /* No need for malloc.h, which pollutes the namespace; 1034 instead, just don't use alloca. */ 1035 #include <malloc.h> 1036 #endif 1037 #else /* not MSDOS, or __TURBOC__ */ 1038 #if defined(_AIX) 1039 /* I don't know what this was needed for, but it pollutes the namespace. 1040 So I turned it off. rms, 2 May 1997. */ 1041 /* #include <malloc.h> */ 1042 #pragma alloca 1043 #define YYSTACK_USE_ALLOCA 1044 #else /* not MSDOS, or __TURBOC__, or _AIX */ 1045 #if 0 1046 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, 1047 and on HPUX 10. Eventually we can turn this on. */ 1048 #define YYSTACK_USE_ALLOCA 1049 #define alloca __builtin_alloca 1050 #endif /* __hpux */ 1051 #endif 1052 #endif /* not _AIX */ 1053 #endif /* not MSDOS, or __TURBOC__ */ 1054 #endif /* not sparc */ 1055 #endif /* not GNU C */ 1056 #endif /* alloca not defined */ 1057 #endif /* YYSTACK_USE_ALLOCA not defined */ 1058 1059 #ifdef YYSTACK_USE_ALLOCA 1060 #define YYSTACK_ALLOC alloca 1061 #else 1062 #define YYSTACK_ALLOC malloc 1063 #endif 1064 1042 1065 /* Note: there must be only one dollar sign in this file. 1043 1066 It is replaced by the list of actions, each action … … 1048 1071 #define YYEMPTY -2 1049 1072 #define YYEOF 0 1050 #define YYACCEPT return(0)1051 #define YYABORT return(1)1073 #define YYACCEPT goto yyacceptlab 1074 #define YYABORT goto yyabortlab 1052 1075 #define YYERROR goto yyerrlab1 1053 1076 /* Like YYERROR except do call yyerror. … … 1131 1154 #endif 1132 1155 1133 /* Prevent warning if -Wstrict-prototypes. */ 1134 #ifdef __GNUC__ 1135 int yyparse (void); 1136 #endif 1137 1156 1157 /* Define __yy_memcpy. Note that the size argument 1158 should be passed with type unsigned int, because that is what the non-GCC 1159 definitions require. With GCC, __builtin_memcpy takes an arg 1160 of type size_t, but it can handle unsigned int. */ 1138 1161 1139 1162 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ … … 1148 1171 char *to; 1149 1172 char *from; 1150 int count;1173 unsigned int count; 1151 1174 { 1152 1175 register char *f = from; … … 1163 1186 in available built-in functions on various systems. */ 1164 1187 static void 1165 __yy_memcpy (char *to, char *from, int count) 1166 { 1188 __yy_memcpy (char *to, char *from, unsigned int count) 1189 { 1190 register char *t = to; 1167 1191 register char *f = from; 1168 register char *t = to;1169 1192 register int i = count; 1170 1193 … … 1177 1200 1178 1201 1179 #line 196 "bison.simple"1202 #line 217 "/emx/share/bison.simple" 1180 1203 1181 1204 /* The user can define YYPARSE_PARAM as the name of an argument to be passed … … 1198 1221 #endif /* not YYPARSE_PARAM */ 1199 1222 1223 /* Prevent warning if -Wstrict-prototypes. */ 1224 #ifdef __GNUC__ 1225 #ifdef YYPARSE_PARAM 1226 int yyparse (void *); 1227 #else 1228 int yyparse (void); 1229 #endif 1230 #endif 1231 1200 1232 int 1201 1233 yyparse(YYPARSE_PARAM_ARG) … … 1226 1258 1227 1259 int yystacksize = YYINITDEPTH; 1260 int yyfree_stacks = 0; 1228 1261 1229 1262 #ifdef YYPURE … … 1310 1343 { 1311 1344 yyerror("parser stack overflow"); 1345 if (yyfree_stacks) 1346 { 1347 free (yyss); 1348 free (yyvs); 1349 #ifdef YYLSP_NEEDED 1350 free (yyls); 1351 #endif 1352 } 1312 1353 return 2; 1313 1354 } … … 1315 1356 if (yystacksize > YYMAXDEPTH) 1316 1357 yystacksize = YYMAXDEPTH; 1317 yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); 1318 __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); 1319 yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); 1320 __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); 1358 #ifndef YYSTACK_USE_ALLOCA 1359 yyfree_stacks = 1; 1360 #endif 1361 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); 1362 __yy_memcpy ((char *)yyss, (char *)yyss1, 1363 size * (unsigned int) sizeof (*yyssp)); 1364 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); 1365 __yy_memcpy ((char *)yyvs, (char *)yyvs1, 1366 size * (unsigned int) sizeof (*yyvsp)); 1321 1367 #ifdef YYLSP_NEEDED 1322 yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); 1323 __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp)); 1368 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); 1369 __yy_memcpy ((char *)yyls, (char *)yyls1, 1370 size * (unsigned int) sizeof (*yylsp)); 1324 1371 #endif 1325 1372 #endif /* no yyoverflow */ … … 3098 3145 { 3099 3146 yyval.tlbar->memopt = *(yyvsp[-7].iptr); 3100 free(yyvsp[-7].iptr); 3147 free(yyvsp[-7].iptr); 3101 3148 } 3102 3149 else … … 3121 3168 case 232: 3122 3169 #line 1513 "parser.y" 3123 { 3170 { 3124 3171 toolbar_item_t *idrec = new_toolbar_item(); 3125 3172 idrec->id = yyvsp[0].num; 3126 yyval.tlbarItems = ins_tlbr_button(yyvsp[-2].tlbarItems, idrec); 3173 yyval.tlbarItems = ins_tlbr_button(yyvsp[-2].tlbarItems, idrec); 3127 3174 ; 3128 3175 break;} 3129 3176 case 233: 3130 3177 #line 1518 "parser.y" 3131 { 3178 { 3132 3179 toolbar_item_t *idrec = new_toolbar_item(); 3133 3180 idrec->id = 0; 3134 yyval.tlbarItems = ins_tlbr_button(yyvsp[-1].tlbarItems, idrec); 3181 yyval.tlbarItems = ins_tlbr_button(yyvsp[-1].tlbarItems, idrec); 3135 3182 ; 3136 3183 break;} … … 3347 3394 } 3348 3395 /* the action file gets copied in in place of this dollarsign */ 3349 #line 498 "bison.simple"3396 #line 543 "/emx/share/bison.simple" 3350 3397 3351 3398 … … 3543 3590 yystate = yyn; 3544 3591 goto yynewstate; 3592 3593 yyacceptlab: 3594 /* YYACCEPT comes here. */ 3595 if (yyfree_stacks) 3596 { 3597 free (yyss); 3598 free (yyvs); 3599 #ifdef YYLSP_NEEDED 3600 free (yyls); 3601 #endif 3602 } 3603 return 0; 3604 3605 yyabortlab: 3606 /* YYABORT comes here. */ 3607 if (yyfree_stacks) 3608 { 3609 free (yyss); 3610 free (yyvs); 3611 #ifdef YYLSP_NEEDED 3612 free (yyls); 3613 #endif 3614 } 3615 return 1; 3545 3616 } 3546 3617 #line 1647 "parser.y" … … 3999 4070 if(name->type != str_char) 4000 4071 yyerror("Filename must be ASCII string"); 4001 4072 4002 4073 fp = open_include(name->str.cstr, 1); 4003 4074 if(!fp) … … 4463 4534 *nitems = 0; 4464 4535 return NULL; 4465 } 4536 } 4466 4537 4467 4538 *nitems = 1;
Note:
See TracChangeset
for help on using the changeset viewer.