Re-import wmc from Wine Modified: trunk/reactos/Makefile Modified: trunk/reactos/media/doc/README.WINE Added: trunk/reactos/tools/wmc/ Deleted: trunk/reactos/tools/wmc/Makefile.in Added: trunk/reactos/tools/wmc/mcy.tab.c Added: trunk/reactos/tools/wmc/mcy.tab.h Added: trunk/reactos/tools/wmc/wmc.mak Deleted: trunk/reactos/tools/wmc/wmc.man.in _____
Modified: trunk/reactos/Makefile --- trunk/reactos/Makefile 2005-11-28 22:01:21 UTC (rev 19727) +++ trunk/reactos/Makefile 2005-11-28 22:03:22 UTC (rev 19728) @@ -364,7 +364,7 @@
$(ERRCODES_H) $(ERRCODES_RC): $(WMC_TARGET) $(KERNEL32_MC) $(ECHO_WMC) - $(Q)$(WMC_TARGET) -i -H $(ERRCODES_H) -o $(ERRCODES_RC) $(KERNEL32_MC) + $(Q)$(WMC_TARGET) -i -U -H $(ERRCODES_H) -o $(ERRCODES_RC) $(KERNEL32_MC)
.PHONY: msvc6 msvc6: $(RBUILD_TARGET) _____
Modified: trunk/reactos/media/doc/README.WINE --- trunk/reactos/media/doc/README.WINE 2005-11-28 22:01:21 UTC (rev 19727) +++ trunk/reactos/media/doc/README.WINE 2005-11-28 22:03:22 UTC (rev 19728) @@ -30,7 +30,7 @@
reactos/tools/wpp # Synced to Wine-0_9_2 reactos/tools/bin2res # Resource to binary converter reactos/tools/winebuild # Synced to Wine-0_9_2 -reactos/tools/wmc # Wine Message Compiler +reactos/tools/wmc # Synced to Wine-0_9_2 reactos/tools/wrc # Synced to Wine-0_9_2 reactos/tools/widl # Forked at Wine-20050930
_____
Copied: trunk/reactos/tools/wmc (from rev 19727, vendor/wine/tools/wmc/current) _____
Deleted: trunk/reactos/tools/wmc/Makefile.in --- vendor/wine/tools/wmc/current/Makefile.in 2005-11-28 22:01:21 UTC (rev 19727) +++ trunk/reactos/tools/wmc/Makefile.in 2005-11-28 22:03:22 UTC (rev 19728) @@ -1,45 +0,0 @@
-TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = ../.. -SRCDIR = @srcdir@ -VPATH = @srcdir@ -EXEEXT = @EXEEXT@ - -PROGRAMS = wmc$(EXEEXT) -MANPAGES = wmc.man -MODULE = none - -C_SRCS = \ - lang.c \ - mcl.c \ - utils.c \ - wmc.c \ - write.c - -EXTRA_SRCS = mcy.y -EXTRA_OBJS = mcy.tab.o - -all: $(PROGRAMS) $(MANPAGES) - -mcl.o: mcy.tab.h - -@MAKE_RULES@ - -wmc$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBUNICODE) $(LIBPORT) $(LEXLIB) $(LDFLAGS) - -mcy.tab.c mcy.tab.h: mcy.y - $(BISON) -d -t $(SRCDIR)/mcy.y -o mcy.tab.c - -# hack to allow parallel make -mcy.tab.h: mcy.tab.c -mcy.tab.o: mcy.tab.h - -install:: $(PROGRAMS) $(MANPAGES) - $(MKINSTALLDIRS) $(bindir) $(mandir)/man$(prog_manext) - $(INSTALL_DATA) wmc.man $(mandir)/man$(prog_manext)/wmc.$(prog_manext) - $(INSTALL_PROGRAM) wmc$(EXEEXT) $(bindir)/wmc$(EXEEXT) - -uninstall:: - $(RM) $(bindir)/wmc$(EXEEXT) $(mandir)/man$(prog_manext)/wmc.$(prog_manext) - -### Dependencies: _____
Added: trunk/reactos/tools/wmc/mcy.tab.c --- vendor/wine/tools/wmc/current/mcy.tab.c 2005-11-28 22:01:21 UTC (rev 19727) +++ trunk/reactos/tools/wmc/mcy.tab.c 2005-11-28 22:03:22 UTC (rev 19728) @@ -0,0 +1,2266 @@
+/* A Bison parser, made by GNU Bison 1.875c. */ + +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + + 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, 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. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Written by Richard Stallman by simplifying the original so called + ``semantic'' parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + tSEVNAMES = 258, + tFACNAMES = 259, + tLANNAMES = 260, + tBASE = 261, + tCODEPAGE = 262, + tTYPEDEF = 263, + tNL = 264, + tSYMNAME = 265, + tMSGEND = 266, + tSEVERITY = 267, + tFACILITY = 268, + tLANGUAGE = 269, + tMSGID = 270, + tIDENT = 271, + tLINE = 272, + tFILE = 273, + tCOMMENT = 274, + tNUMBER = 275, + tTOKEN = 276 + }; +#endif +#define tSEVNAMES 258 +#define tFACNAMES 259 +#define tLANNAMES 260 +#define tBASE 261 +#define tCODEPAGE 262 +#define tTYPEDEF 263 +#define tNL 264 +#define tSYMNAME 265 +#define tMSGEND 266 +#define tSEVERITY 267 +#define tFACILITY 268 +#define tLANGUAGE 269 +#define tMSGID 270 +#define tIDENT 271 +#define tLINE 272 +#define tFILE 273 +#define tCOMMENT 274 +#define tNUMBER 275 +#define tTOKEN 276 + + + + +/* Copy the first part of user declarations. */ +#line 39 "tools/wmc/mcy.y" + + +#include "config.h" + +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> + +#include "utils.h" +#include "wmc.h" +#include "lang.h" + +static const char err_syntax[] = "Syntax error"; +static const char err_number[] = "Number expected"; +static const char err_ident[] = "Identifier expected"; +static const char err_assign[] = "'=' expected"; +static const char err_popen[] = "'(' expected"; +static const char err_pclose[] = "')' expected"; +static const char err_colon[] = "':' expected"; +static const char err_msg[] = "Message expected"; + +/* Scanner switches */ +int want_nl = 0; /* Request next newlinw */ +int want_line = 0; /* Request next complete line */ +int want_file = 0; /* Request next ident as filename */ + +node_t *nodehead = NULL; /* The list of all parsed elements */ +static node_t *nodetail = NULL; +lan_blk_t *lanblockhead; /* List of parsed elements transposed */ + +static int base = 16; /* Current printout base to use (8, 10 or 16) */ +static WCHAR *cast = NULL; /* Current typecast to use */ + +static int last_id = 0; /* The last message ID parsed */ +static int last_sev = 0; /* Last severity code parsed */ +static int last_fac = 0; /* Last facility code parsed */ +static WCHAR *last_sym = NULL;/* Last alias symbol parsed */ +static int have_sev; /* Set if severity parsed for current message */ +static int have_fac; /* Set if facility parsed for current message */ +static int have_sym; /* Set is symbol parsed for current message */ + +static cp_xlat_t *cpxlattab = NULL; /* Codepage translation table */ +static int ncpxlattab = 0; + +/* Prototypes */ +static WCHAR *merge(WCHAR *s1, WCHAR *s2); +static lanmsg_t *new_lanmsg(lan_cp_t *lcp, WCHAR *msg); +static msg_t *add_lanmsg(msg_t *msg, lanmsg_t *lanmsg); +static msg_t *complete_msg(msg_t *msg, int id); +static void add_node(node_e type, void *p); +static void do_add_token(tok_e type, token_t *tok, const char *code); +static void test_id(int id); +static int check_languages(node_t *head); +static lan_blk_t *block_messages(node_t *head); +static void add_cpxlat(int lan, int cpin, int cpout); +static cp_xlat_t *find_cpxlat(int lan); + + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#line 99 "tools/wmc/mcy.y" +typedef union YYSTYPE { + WCHAR *str; + unsigned num; + token_t *tok; + lanmsg_t *lmp; + msg_t *msg; + lan_cp_t lcp; +} YYSTYPE; +/* Line 191 of yacc.c. */ +#line 186 "tools/wmc/mcy.tab.c" +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 214 of yacc.c. */ +#line 198 "tools/wmc/mcy.tab.c" + +#if ! defined (yyoverflow) || YYERROR_VERBOSE + +# ifndef YYFREE +# define YYFREE free +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# endif + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# define YYSTACK_ALLOC alloca +# endif +# else +# if defined (alloca) || defined (_ALLOCA_H) +# define YYSTACK_ALLOC alloca +# else +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# else +# if defined (__STDC__) || defined (__cplusplus) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# endif +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ + + +#if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + short yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined (__GNUC__) && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined (__STDC__) || defined (__cplusplus) + typedef signed char yysigned_char; +#else + typedef short yysigned_char; +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 30 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 165 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 27 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 32 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 104 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 155 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 276 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const unsigned 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, 2, 2, 2, + 23, 24, 2, 26, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 25, 2, + 2, 22, 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, 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, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const unsigned short yyprhs[] = +{ + 0, 0, 3, 5, 7, 10, 12, 14, 16, 18, + 24, 30, 34, 37, 43, 49, 53, 56, 62, 68, + 72, 75, 81, 87, 91, 94, 98, 102, 105, 109, + 113, 116, 118, 121, 123, 128, 132, 135, 137, 140, + 142, 147, 151, 154, 155, 158, 161, 163, 166, 168, + 176, 183, 188, 192, 195, 196, 199, 202, 204, 207, + 209, 215, 221, 226, 230, 233, 235, 237, 238, 243, + 247, 250, 251, 253, 256, 259, 260, 263, 266, 269, + 273, 277, 280, 284, 288, 291, 295, 299, 302, 304, + 307, 309, 314, 320, 326, 331, 334, 336, 339, 341, + 344, 346, 348, 349, 350 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yysigned_char yyrhs[] = +{ + 28, 0, -1, 29, -1, 30, -1, 29, 30, -1, + 31, -1, 43, -1, 19, -1, 1, -1, 3, 22, + 23, 32, 24, -1, 3, 22, 23, 32, 1, -1, + 3, 22, 1, -1, 3, 1, -1, 4, 22, 23, + 34, 24, -1, 4, 22, 23, 34, 1, -1, 4, + 22, 1, -1, 4, 1, -1, 5, 22, 23, 37, + 24, -1, 5, 22, 23, 37, 1, -1, 5, 22, + 1, -1, 5, 1, -1, 7, 22, 23, 40, 24, + -1, 7, 22, 23, 40, 1, -1, 7, 22, 1, + -1, 7, 1, -1, 8, 22, 16, -1, 8, 22, + 1, -1, 8, 1, -1, 6, 22, 20, -1, 6, + 22, 1, -1, 6, 1, -1, 33, -1, 32, 33, + -1, 1, -1, 55, 22, 20, 36, -1, 55, 22, + 1, -1, 55, 1, -1, 35, -1, 34, 35, -1, + 1, -1, 55, 22, 20, 36, -1, 55, 22, 1, + -1, 55, 1, -1, -1, 25, 16, -1, 25, 1, + -1, 38, -1, 37, 38, -1, 1, -1, 55, 22, + 20, 58, 25, 18, 39, -1, 55, 22, 20, 58, + 25, 1, -1, 55, 22, 20, 1, -1, 55, 22, + 1, -1, 55, 1, -1, -1, 25, 20, -1, 25, + 1, -1, 41, -1, 40, 41, -1, 1, -1, 42, + 22, 20, 25, 20, -1, 42, 22, 20, 25, 1, + -1, 42, 22, 20, 1, -1, 42, 22, 1, -1, + 42, 1, -1, 20, -1, 21, -1, -1, 45, 47, + 44, 51, -1, 15, 22, 46, -1, 15, 1, -1, + -1, 20, -1, 26, 20, -1, 26, 1, -1, -1, + 47, 49, -1, 47, 50, -1, 47, 48, -1, 10, + 22, 16, -1, 10, 22, 1, -1, 10, 1, -1, + 12, 22, 55, -1, 12, 22, 1, -1, 12, 1, + -1, 13, 22, 55, -1, 13, 22, 1, -1, 13, + 1, -1, 52, -1, 51, 52, -1, 1, -1, 53, + 57, 54, 11, -1, 14, 56, 22, 55, 9, -1, + 14, 56, 22, 55, 1, -1, 14, 56, 22, 1, + -1, 14, 1, -1, 17, -1, 54, 17, -1, 1, + -1, 54, 1, -1, 16, -1, 21, -1, -1, -1, + -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const unsigned short yyrline[] = +{ + 0, 124, 124, 131, 132, 135, 136, 137, 138, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 172, + 173, 179, 180, 181, 184, 191, 192, 198, 199, 200, + 203, 210, 211, 214, 215, 216, 222, 223, 224, 227, + 235, 236, 237, 238, 241, 242, 243, 249, 250, 251, + 254, 264, 265, 266, 267, 270, 271, 281, 281, 284, + 289, 292, 293, 294, 295, 298, 299, 300, 301, 304, + 305, 306, 309, 317, 318, 321, 329, 330, 336, 337, + 338, 341, 349, 378, 379, 380, 383, 384, 385, 386, + 392, 393, 396, 399, 402 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE +/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "tSEVNAMES", "tFACNAMES", "tLANNAMES", + "tBASE", "tCODEPAGE", "tTYPEDEF", "tNL", "tSYMNAME", "tMSGEND", + "tSEVERITY", "tFACILITY", "tLANGUAGE", "tMSGID", "tIDENT", "tLINE", + "tFILE", "tCOMMENT", "tNUMBER", "tTOKEN", "'='", "'('", "')'", "':'", + "'+'", "$accept", "file", "items", "decl", "global", "smaps", "smap", + "fmaps", "fmap", "alias", "lmaps", "lmap", "optcp", "cmaps", "cmap", + "clan", "msg", "@1", "msgid", "id", "sevfacsym", "sym", "sev", "fac", + "bodies", "body", "lang", "lines", "token", "setnl", "setline", + "setfile", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const unsigned short yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 61, 40, 41, 58, 43 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const unsigned char yyr1[] = +{ + 0, 27, 28, 29, 29, 30, 30, 30, 30, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 31, 32, 32, 32, 33, 33, 33, 34, 34, 34, + 35, 35, 35, 36, 36, 36, 37, 37, 37, 38, + 38, 38, 38, 38, 39, 39, 39, 40, 40, 40, + 41, 41, 41, 41, 41, 42, 42, 44, 43, 45, + 45, 46, 46, 46, 46, 47, 47, 47, 47, 48, + 48, 48, 49, 49, 49, 50, 50, 50, 51, 51, + 51, 52, 53, 53, 53, 53, 54, 54, 54, 54, + 55, 55, 56, 57, 58 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const unsigned char yyr2[] = +{ + 0, 2, 1, 1, 2, 1, 1, 1, 1, 5, + 5, 3, 2, 5, 5, 3, 2, 5, 5, 3, + 2, 5, 5, 3, 2, 3, 3, 2, 3, 3, + 2, 1, 2, 1, 4, 3, 2, 1, 2, 1, + 4, 3, 2, 0, 2, 2, 1, 2, 1, 7, + 6, 4, 3, 2, 0, 2, 2, 1, 2, 1, + 5, 5, 4, 3, 2, 1, 1, 0, 4, 3, + 2, 0, 1, 2, 2, 0, 2, 2, 2, 3, + 3, 2, 3, 3, 2, 3, 3, 2, 1, 2, + 1, 4, 5, 5, 4, 2, 1, 2, 1, 2, + 1, 1, 0, 0, 0 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const unsigned char yydefact[] = +{ + 0, 8, 0, 0, 0, 0, 0, 0, 0, 7, + 0, 0, 3, 5, 6, 75, 12, 0, 16, 0, + 20, 0, 30, 0, 24, 0, 27, 0, 70, 71, + 1, 4, 67, 11, 0, 15, 0, 19, 0, 29, + 28, 23, 0, 26, 25, 72, 0, 69, 0, 0, + 0, 0, 78, 76, 77, 33, 100, 101, 0, 31, + 0, 39, 0, 37, 0, 48, 0, 46, 0, 59, + 65, 66, 0, 57, 0, 74, 73, 81, 0, 84, + 0, 87, 0, 90, 0, 68, 88, 103, 10, 9, + 32, 36, 0, 14, 13, 38, 42, 0, 18, 17, + 47, 53, 0, 22, 21, 58, 64, 0, 80, 79, + 83, 82, 86, 85, 95, 0, 89, 0, 35, 43, + 41, 43, 52, 0, 63, 0, 0, 98, 96, 0, + 0, 34, 40, 51, 0, 62, 0, 94, 0, 99, + 91, 97, 45, 44, 0, 61, 60, 93, 92, 50, + 54, 0, 49, 56, 55 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const short yydefgoto[] = +{ + -1, 10, 11, 12, 13, 58, 59, 62, 63, 131, + 66, 67, 152, 72, 73, 74, 14, 51, 15, 47, + 32, 52, 53, 54, 85, 86, 87, 129, 60, 115, + 117, 134 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -37 +static const short yypact[] = +{ + 132, -37, 18, 44, 46, 47, 48, 49, 50, -37, + 10, 113, -37, -37, -37, -37, -37, 11, -37, 14, + -37, 19, -37, 85, -37, 20, -37, 147, -37, -13, + -37, -37, 87, -37, 66, -37, 80, -37, 82, -37, + -37, -37, 64, -37, -37, -37, 107, -37, 51, 52, + 53, 3, -37, -37, -37, -37, -37, -37, 7, -37, + 54, -37, 8, -37, 55, -37, 17, -37, 56, -37, + -37, -37, 15, -37, 57, -37, -37, -37, 148, -37, + 88, -37, 90, -37, 58, -3, -37, -37, -37, -37, + -37, -37, 109, -37, -37, -37, -37, 114, -37, -37, + -37, -37, 121, -37, -37, -37, -37, 122, -37, -37, + -37, -37, -37, -37, -37, 38, -37, 129, -37, 36, + -37, 36, -37, 0, -37, 2, 91, -37, -37, 144, + 149, -37, -37, -37, 37, -37, 123, -37, 5, -37, + -37, -37, -37, -37, 4, -37, -37, -37, -37, -37, + 39, 124, -37, -37, -37 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yysigned_char yypgoto[] = +{ + -37, -37, -37, 77, -37, -37, 35, -37, 1, -27, + -37, 29, -37, -37, 30, -37, -37, -37, -37, -37, + -37, -37, -37, -37, -37, 41, -37, -37, -36, -37, + -37, -37 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -105 +static const short yytable[] = +{ + 64, 133, 68, 135, 83, 149, 147, 45, 88, 93, + 30, 84, 33, 46, 148, 35, 103, 84, 98, 16, + 37, 41, 150, 56, 56, -104, 64, 136, 57, 57, + 68, 89, 94, 56, 34, 70, 71, 36, 57, 104, + 17, 99, 38, 42, 111, 18, 113, 20, 22, 24, + 26, 28, 77, 79, 81, 91, 96, 101, 106, 114, + 126, 130, 144, 95, 151, 69, 19, 55, 21, 23, + 25, 27, 29, 78, 80, 82, 92, 97, 102, 107, + -102, 61, 56, 65, 70, 71, 39, 57, 31, 110, + 138, 112, 137, 90, 132, 100, 56, 48, 56, 49, + 50, 57, 105, 57, 56, 40, 56, 56, 75, 57, + 118, 57, 57, -2, 1, 120, 2, 3, 4, 5, + 6, 7, 122, 124, 145, 153, 116, 76, 8, 119, + 127, 0, 9, 1, 121, 2, 3, 4, 5, 6, + 7, 123, 125, 146, 154, 139, 128, 8, 43, 108, + 142, 9, 0, 0, 0, 140, 0, 0, 0, 0, + 0, 141, 0, 44, 109, 143 +}; + +static const yysigned_char yycheck[] = +{ + 36, 1, 38, 1, 1, 1, 1, 20, 1, 1, + 0, 14, 1, 26, 9, 1, 1, 14, 1, 1, + 1, 1, 18, 16, 16, 25, 62, 25, 21, 21, + 66, 24, 24, 16, 23, 20, 21, 23, 21, 24, + 22, 24, 23, 23, 80, 1, 82, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 22, 25, 25, 62, 25, 1, 22, 1, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 1, 16, 1, 20, 21, 1, 21, 11, 1, + 126, 1, 1, 58, 121, 66, 16, 10, 16, 12, + 13, 21, 72, 21, 16, 20, 16, 16, 1, 21, + 1, 21, 21, 0, 1, 1, 3, 4, 5, 6, + 7, 8, 1, 1, 1, 1, 85, 20, 15, 20, + 1, -1, 19, 1, 20, 3, 4, 5, 6, 7, + 8, 20, 20, 20, 20, 1, 17, 15, 1, 1, + 1, 19, -1, -1, -1, 11, -1, -1, -1, -1, + -1, 17, -1, 16, 16, 16 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const unsigned char yystos[] = +{ + 0, 1, 3, 4, 5, 6, 7, 8, 15, 19, + 28, 29, 30, 31, 43, 45, 1, 22, 1, 22, + 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, + 0, 30, 47, 1, 23, 1, 23, 1, 23, 1, + 20, 1, 23, 1, 16, 20, 26, 46, 10, 12, + 13, 44, 48, 49, 50, 1, 16, 21, 32, 33, + 55, 1, 34, 35, 55, 1, 37, 38, 55, 1, + 20, 21, 40, 41, 42, 1, 20, 1, 22, 1, + 22, 1, 22, 1, 14, 51, 52, 53, 1, 24, + 33, 1, 22, 1, 24, 35, 1, 22, 1, 24, + 38, 1, 22, 1, 24, 41, 1, 22, 1, 16, + 1, 55, 1, 55, 1, 56, 52, 57, 1, 20, + 1, 20, 1, 20, 1, 20, 22, 1, 17, 54, + 25, 36, 36, 1, 58, 1, 25, 1, 55, 1, + 11, 17, 1, 16, 25, 1, 20, 1, 9, 1, + 18, 25, 39, 1, 20 +}; + +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ +#endif +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) +# if defined (__STDC__) || defined (__cplusplus) +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +#endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int +#endif + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror ("syntax error: cannot back up");\ + YYERROR; \ + } \ +while (0) + +#define YYTERROR 1 +#define YYERRCODE 256 + +/* YYLLOC_DEFAULT -- Compute the default location (before the actions + are run). */ + +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + ((Current).first_line = (Rhs)[1].first_line, \ + (Current).first_column = (Rhs)[1].first_column, \ + (Current).last_line = (Rhs)[N].last_line, \ + (Current).last_column = (Rhs)[N].last_column) +#endif + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +# define YYDSYMPRINT(Args) \ +do { \ + if (yydebug) \ + yysymprint Args; \ +} while (0) + +# define YYDSYMPRINTF(Title, Token, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yysymprint (stderr, \ + Token, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_stack_print (short *bottom, short *top) +#else +static void +yy_stack_print (bottom, top) + short *bottom; + short *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (/* Nothing. */; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_reduce_print (int yyrule) +#else +static void +yy_reduce_print (yyrule) + int yyrule; +#endif +{ + int yyi; + unsigned int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", + yyrule - 1, yylno); + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) + YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); + YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (Rule); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YYDSYMPRINT(Args) +# define YYDSYMPRINTF(Title, Token, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 +# undef YYMAXDEPTH +#endif + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined (__GLIBC__) && defined (_STRING_H) +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +# if defined (__STDC__) || defined (__cplusplus) +yystrlen (const char *yystr) +# else +yystrlen (yystr) + const char *yystr; +# endif +{ + register const char *yys = yystr; + + while (*yys++ != '\0') + continue; + + return yys - yystr - 1; +} +# endif +# endif + +# ifndef yystpcpy +# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +# if defined (__STDC__) || defined (__cplusplus) +yystpcpy (char *yydest, const char *yysrc) +# else +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +# endif +{ + register char *yyd = yydest; + register const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +#endif /* !YYERROR_VERBOSE */ + + + +#if YYDEBUG +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) +#else +static void +yysymprint (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + if (yytype < YYNTOKENS) + { + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); +# ifdef YYPRINT + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + } + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + switch (yytype) + { + default: + break; + } + YYFPRINTF (yyoutput, ")"); +} + +#endif /* ! YYDEBUG */ +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yydestruct (int yytype, YYSTYPE *yyvaluep) +#else [truncated at 1000 lines; 1658 more skipped]