rcparse.c
来自「基于4个mips核的noc设计」· C语言 代码 · 共 1,757 行 · 第 1/5 页
C
1,757 行
/* A Bison parser, made from rcparse.y by GNU Bison version 1.28 */#define YYBISON 1 /* Identify Bison output. */#define BEG 257#define END 258#define ACCELERATORS 259#define VIRTKEY 260#define ASCII 261#define NOINVERT 262#define SHIFT 263#define CONTROL 264#define ALT 265#define BITMAP 266#define CURSOR 267#define DIALOG 268#define DIALOGEX 269#define EXSTYLE 270#define CAPTION 271#define CLASS 272#define STYLE 273#define AUTO3STATE 274#define AUTOCHECKBOX 275#define AUTORADIOBUTTON 276#define CHECKBOX 277#define COMBOBOX 278#define CTEXT 279#define DEFPUSHBUTTON 280#define EDITTEXT 281#define GROUPBOX 282#define LISTBOX 283#define LTEXT 284#define PUSHBOX 285#define PUSHBUTTON 286#define RADIOBUTTON 287#define RTEXT 288#define SCROLLBAR 289#define STATE3 290#define USERBUTTON 291#define BEDIT 292#define HEDIT 293#define IEDIT 294#define FONT 295#define ICON 296#define LANGUAGE 297#define CHARACTERISTICS 298#define VERSIONK 299#define MENU 300#define MENUEX 301#define MENUITEM 302#define SEPARATOR 303#define POPUP 304#define CHECKED 305#define GRAYED 306#define HELP 307#define INACTIVE 308#define MENUBARBREAK 309#define MENUBREAK 310#define MESSAGETABLE 311#define RCDATA 312#define STRINGTABLE 313#define VERSIONINFO 314#define FILEVERSION 315#define PRODUCTVERSION 316#define FILEFLAGSMASK 317#define FILEFLAGS 318#define FILEOS 319#define FILETYPE 320#define FILESUBTYPE 321#define BLOCKSTRINGFILEINFO 322#define BLOCKVARFILEINFO 323#define VALUE 324#define BLOCK 325#define MOVEABLE 326#define FIXED 327#define PURE 328#define IMPURE 329#define PRELOAD 330#define LOADONCALL 331#define DISCARDABLE 332#define NOT 333#define QUOTEDSTRING 334#define STRING 335#define NUMBER 336#define SIZEDSTRING 337#define IGNORED_TOKEN 338#define NEG 339#line 1 "rcparse.y" /* rcparse.y -- parser for Windows rc files Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *//* This is a parser for Windows rc files. It is based on the parser by Gunther Ebert <gunther.ebert@ixos-leipzig.de>. */#include "bfd.h"#include "bucomm.h"#include "libiberty.h"#include "windres.h"#include <ctype.h>/* The current language. */static unsigned short language;/* The resource information during a sub statement. */static struct res_res_info sub_res_info;/* Dialog information. This is built by the nonterminals styles and controls. */static struct dialog dialog;/* This is used when building a style. It is modified by the nonterminal styleexpr. */static unsigned long style;/* These are used when building a control. They are set before using control_params. */static unsigned long base_style;static unsigned long default_style;static unsigned long class;#line 59 "rcparse.y"typedef union{ struct accelerator acc; struct accelerator *pacc; struct dialog_control *dialog_control; struct menuitem *menuitem; struct { struct rcdata_item *first; struct rcdata_item *last; } rcdata; struct rcdata_item *rcdata_item; struct stringtable_data *stringtable; struct fixed_versioninfo *fixver; struct ver_info *verinfo; struct ver_stringinfo *verstring; struct ver_varinfo *vervar; struct res_id id; struct res_res_info res_info; struct { unsigned short on; unsigned short off; } memflags; struct { unsigned long val; /* Nonzero if this number was explicitly specified as long. */ int dword; } i; unsigned long il; unsigned short is; const char *s; struct { unsigned long length; const char *s; } ss;} YYSTYPE;#include <stdio.h>#ifndef __cplusplus#ifndef __STDC__#define const#endif#endif#define YYFINAL 483#define YYFLAG -32768#define YYNTBASE 99#define YYTRANSLATE(x) ((unsigned)(x) <= 339 ? yytranslate[x] : 191)static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 92, 87, 2, 97, 98, 90, 88, 95, 89, 2, 91, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 96, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 86, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 85, 2, 93, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 94};#if YYDEBUG != 0static const short yyprhs[] = { 0, 0, 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61, 62, 69, 70, 73, 76, 81, 83, 85, 87, 91, 94, 96, 98, 100, 102, 104, 106, 111, 116, 117, 131, 132, 146, 147, 162, 163, 167, 168, 172, 176, 177, 182, 186, 192, 200, 204, 208, 213, 217, 218, 221, 222, 226, 227, 231, 232, 236, 237, 241, 242, 246, 247, 251, 263, 276, 289, 303, 304, 308, 309, 313, 314, 318, 319, 323, 324, 328, 335, 344, 355, 367, 368, 372, 373, 377, 378, 382, 383, 387, 388, 392, 393, 397, 398, 402, 403, 407, 408, 412, 413, 430, 438, 448, 459, 460, 462, 465, 466, 470, 471, 475, 476, 480, 481, 485, 490, 495, 499, 506, 507, 510, 515, 518, 525, 526, 530, 533, 535, 537, 539, 541, 543, 545, 552, 553, 556, 559, 563, 569, 572, 578, 585, 593, 603, 608, 615, 616, 619, 620, 622, 624, 626, 630, 634, 635, 642, 643, 647, 652, 659, 664, 671, 672, 679, 686, 690, 694, 698, 702, 706, 707, 716, 724, 725, 731, 732, 736, 738, 740, 742, 745, 748, 751, 753, 754, 757, 761, 766, 770, 771, 774, 775, 778, 780, 782, 784, 786, 788, 790, 792, 794, 796, 798, 801, 805, 810, 812, 816, 817, 819, 822, 824, 826, 830, 833, 836, 840, 844, 848, 852, 856, 860, 864, 868, 871, 873, 875, 879, 882, 886, 890, 894, 898, 902, 906, 910};static const short yyrhs[] = { -1, 99, 100, 101, 0, 99, 100, 107, 0, 99, 100, 108, 0, 99, 100, 109, 0, 99, 100, 148, 0, 99, 100, 149, 0, 99, 100, 150, 0, 99, 100, 151, 0, 99, 100, 156, 0, 99, 100, 159, 0, 99, 100, 160, 0, 99, 100, 165, 0, 99, 100, 168, 0, 99, 100, 169, 0, 99, 100, 84, 0, 0, 174, 5, 177, 3, 102, 4, 0, 0, 102, 103, 0, 104, 188, 0, 104, 188, 95, 105, 0, 80, 0, 189, 0, 106, 0, 105, 95, 106, 0, 105, 106, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 174, 12, 179, 181, 0, 174, 13, 178, 181, 0, 0, 174, 14, 179, 113, 189, 185, 185, 185, 110, 114, 3, 116, 4, 0, 0, 174, 15, 179, 113, 189, 185, 185, 185, 111, 114, 3, 116, 4, 0, 0, 174, 15, 179, 113, 189, 185, 185, 185, 185, 112, 114, 3, 116, 4, 0, 0, 16, 96, 186, 0, 0, 114, 17, 80, 0, 114, 18, 174, 0, 0, 114, 19, 115, 182, 0, 114, 16, 186, 0, 114, 41, 186, 95, 80, 0, 114, 41, 186, 95, 80, 185, 185, 0, 114, 46, 174, 0, 114, 44, 186, 0, 114, 43, 186, 185, 0, 114, 45, 186, 0, 0, 116, 117, 0, 0, 20, 118, 139, 0, 0, 21, 119, 139, 0, 0, 22, 120, 139, 0, 0, 38, 121, 139, 0, 0, 23, 122, 139, 0, 0, 24, 123, 139, 0, 10, 140, 186, 185, 142, 185, 185, 185, 185, 184, 141, 0, 10, 140, 186, 185, 142, 185, 185, 185, 185, 185, 185, 141, 0, 10, 140, 186, 95, 80, 142, 185, 185, 185, 185, 184, 141, 0, 10, 140, 186, 95, 80, 142, 185, 185, 185, 185, 185, 185, 141, 0, 0, 25, 124, 139, 0, 0, 26, 125, 139, 0, 0, 27, 126, 139, 0, 0, 28, 127, 139, 0, 0, 39, 128, 139, 0, 42, 176, 186, 185, 185, 141, 0, 42, 176, 186, 185, 185, 185, 185, 141, 0, 42, 176, 186, 185, 185, 185, 185, 144, 184, 141, 0, 42, 176, 186, 185, 185, 185, 185, 144, 185, 185, 141, 0, 0, 40, 129, 139, 0, 0, 29, 130, 139, 0, 0, 30, 131, 139, 0, 0, 31, 132, 139, 0, 0, 32, 133, 139, 0, 0, 33, 134, 139, 0, 0, 34, 135, 139, 0, 0, 35, 136, 139, 0, 0, 36, 137, 139, 0, 0, 37, 80, 95, 186, 95, 186, 95, 186, 95, 186, 95, 186, 95, 138, 182, 184, 0, 140, 186, 185, 185, 185, 185, 141, 0, 140, 186, 185, 185, 185, 185, 146, 184, 141, 0, 140, 186, 185, 185, 185, 185, 146, 185, 185, 141, 0, 0, 80, 0, 80, 95, 0, 0, 3, 161, 4, 0, 0, 95, 143, 182, 0, 0, 95, 145, 182, 0, 0, 95, 147, 182, 0, 174, 41, 178, 181, 0, 174, 42, 178, 181, 0, 43, 186, 185, 0, 174, 46, 177, 3, 152, 4, 0, 0, 152, 153, 0, 48, 80, 185, 154, 0, 48, 49, 0, 50, 80, 154, 3, 152, 4, 0, 0, 154, 95, 155, 0, 154, 155, 0, 51, 0, 52, 0, 53, 0, 54, 0, 55, 0, 56, 0, 174, 47, 177, 3, 157, 4, 0, 0, 157, 158, 0, 48, 80, 0, 48, 80, 185, 0, 48, 80, 185, 185, 184, 0, 48, 49, 0, 50, 80, 3, 157, 4, 0, 50, 80, 185, 3, 157, 4, 0, 50, 80, 185, 185, 3, 157, 4, 0, 50, 80, 185, 185, 185, 184, 3, 157, 4, 0, 174, 57, 179, 181, 0, 174, 58, 177, 3, 161, 4, 0, 0, 162, 163, 0, 0, 164, 0, 83, 0, 187, 0, 164, 95, 83, 0, 164, 95, 187, 0, 0, 59, 177, 3, 166, 167, 4, 0, 0, 167, 186, 80, 0, 167, 186, 95, 80, 0, 174, 174, 177, 3, 161, 4, 0, 174, 174, 177, 181, 0, 174, 60, 170, 3, 171, 4, 0, 0, 170, 61, 186, 185, 185, 185, 0, 170, 62, 186, 185, 185, 185, 0, 170, 63, 186, 0, 170, 64, 186, 0, 170, 65, 186, 0, 170, 66, 186, 0, 170, 67, 186, 0, 0, 171, 68, 3, 71, 3, 172, 4, 4, 0, 171, 69, 3, 70, 80, 173, 4, 0, 0, 172, 70, 80, 95, 80, 0, 0, 173, 185, 185, 0, 189, 0, 81, 0, 80, 0, 80, 95, 0, 81, 95, 0, 189, 95, 0, 175, 0, 0, 177, 180, 0, 177, 44, 186, 0, 177, 43, 186, 185, 0, 177, 45, 186, 0, 0, 178, 180, 0, 0, 179, 180, 0, 72, 0, 73, 0, 74, 0, 75, 0, 76, 0, 77, 0, 78, 0, 80, 0, 81, 0, 183, 0, 79, 183, 0, 182, 85, 183, 0, 182, 85, 79, 183, 0, 82,
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?