mirror of
https://github.com/reactos/reactos.git
synced 2025-03-30 17:10:22 +00:00
Sync to Wine-20050628:
Mike McCormack <mike@codeweavers.com> - Move function prototypes to header. Eric Pouech <pouech-eric@wanadoo.fr> - Const correctness fixes. svn path=/trunk/; revision=16469
This commit is contained in:
parent
40c9cd2c5d
commit
28277f305b
6 changed files with 143 additions and 121 deletions
|
@ -2571,7 +2571,7 @@ static stringtable_t *find_stringtable(lvc_t *lvc)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* qsort sorting function for string table entries */
|
/* qsort sorting function for string table entries */
|
||||||
#define STE(p) ((stt_entry_t *)(p))
|
#define STE(p) ((const stt_entry_t *)(p))
|
||||||
static int sort_stt_entry(const void *e1, const void *e2)
|
static int sort_stt_entry(const void *e1, const void *e2)
|
||||||
{
|
{
|
||||||
return STE(e1)->id - STE(e2)->id;
|
return STE(e1)->id - STE(e2)->id;
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "dumpres.h"
|
#include "dumpres.h"
|
||||||
|
#include "wrc.h"
|
||||||
|
|
||||||
#define MASTER_LANGUAGE LANG_ENGLISH
|
#define MASTER_LANGUAGE LANG_ENGLISH
|
||||||
#define NB_LANG 0x94
|
#define NB_LANG 0x94
|
||||||
|
|
|
@ -106,12 +106,6 @@ static const char version_string[] = "Wine Resource Compiler Version " WRC_FULLV
|
||||||
"Copyright 1998-2000 Bertho A. Stultiens\n"
|
"Copyright 1998-2000 Bertho A. Stultiens\n"
|
||||||
" 1994 Martin von Loewis\n";
|
" 1994 Martin von Loewis\n";
|
||||||
|
|
||||||
/*
|
|
||||||
* External functions
|
|
||||||
*/
|
|
||||||
void write_resfile(char *outname, resource_t *top);
|
|
||||||
void verify_translations(resource_t *top);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set if compiling in 32bit mode (default).
|
* Set if compiling in 32bit mode (default).
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -66,4 +66,7 @@ extern int char_number;
|
||||||
extern resource_t *resource_top;
|
extern resource_t *resource_top;
|
||||||
extern language_t *currentlanguage;
|
extern language_t *currentlanguage;
|
||||||
|
|
||||||
|
void verify_translations(resource_t *top);
|
||||||
|
void write_resfile(char *outname, resource_t *top);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* A Bison parser, made by GNU Bison 1.875. */
|
/* A Bison parser, made by GNU Bison 1.875c. */
|
||||||
|
|
||||||
/* Skeleton parser for Yacc-like parsing with Bison,
|
/* Skeleton parser for Yacc-like parsing with Bison,
|
||||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
|
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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -523,7 +523,7 @@ typedef union YYSTYPE {
|
||||||
ani_any_t *ani;
|
ani_any_t *ani;
|
||||||
} YYSTYPE;
|
} YYSTYPE;
|
||||||
/* Line 191 of yacc.c. */
|
/* Line 191 of yacc.c. */
|
||||||
#line 526 "y.tab.c"
|
#line 527 "parser.tab.c"
|
||||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||||
# define YYSTYPE_IS_DECLARED 1
|
# define YYSTYPE_IS_DECLARED 1
|
||||||
# define YYSTYPE_IS_TRIVIAL 1
|
# define YYSTYPE_IS_TRIVIAL 1
|
||||||
|
@ -535,22 +535,29 @@ typedef union YYSTYPE {
|
||||||
|
|
||||||
|
|
||||||
/* Line 214 of yacc.c. */
|
/* Line 214 of yacc.c. */
|
||||||
#line 538 "y.tab.c"
|
#line 539 "parser.tab.c"
|
||||||
|
|
||||||
#if ! defined (yyoverflow) || YYERROR_VERBOSE
|
#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. */
|
/* The parser invokes alloca or malloc; define the necessary symbols. */
|
||||||
|
|
||||||
# if YYSTACK_USE_ALLOCA
|
# ifdef YYSTACK_USE_ALLOCA
|
||||||
# define YYSTACK_ALLOC alloca
|
# if YYSTACK_USE_ALLOCA
|
||||||
|
# define YYSTACK_ALLOC alloca
|
||||||
|
# endif
|
||||||
# else
|
# else
|
||||||
# ifndef YYSTACK_USE_ALLOCA
|
# if defined (alloca) || defined (_ALLOCA_H)
|
||||||
# if defined (alloca) || defined (_ALLOCA_H)
|
# define YYSTACK_ALLOC alloca
|
||||||
# define YYSTACK_ALLOC alloca
|
# else
|
||||||
# else
|
# ifdef __GNUC__
|
||||||
# ifdef __GNUC__
|
# define YYSTACK_ALLOC __builtin_alloca
|
||||||
# define YYSTACK_ALLOC __builtin_alloca
|
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
@ -563,15 +570,15 @@ typedef union YYSTYPE {
|
||||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||||
# define YYSIZE_T size_t
|
# define YYSIZE_T size_t
|
||||||
# endif
|
# endif
|
||||||
# define YYSTACK_ALLOC malloc
|
# define YYSTACK_ALLOC YYMALLOC
|
||||||
# define YYSTACK_FREE free
|
# define YYSTACK_FREE YYFREE
|
||||||
# endif
|
# endif
|
||||||
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
|
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
|
||||||
|
|
||||||
|
|
||||||
#if (! defined (yyoverflow) \
|
#if (! defined (yyoverflow) \
|
||||||
&& (! defined (__cplusplus) \
|
&& (! defined (__cplusplus) \
|
||||||
|| (YYSTYPE_IS_TRIVIAL)))
|
|| (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
|
||||||
|
|
||||||
/* A type that is properly aligned for any stack member. */
|
/* A type that is properly aligned for any stack member. */
|
||||||
union yyalloc
|
union yyalloc
|
||||||
|
@ -592,7 +599,7 @@ union yyalloc
|
||||||
/* Copy COUNT objects from FROM to TO. The source and destination do
|
/* Copy COUNT objects from FROM to TO. The source and destination do
|
||||||
not overlap. */
|
not overlap. */
|
||||||
# ifndef YYCOPY
|
# ifndef YYCOPY
|
||||||
# if 1 < __GNUC__
|
# if defined (__GNUC__) && 1 < __GNUC__
|
||||||
# define YYCOPY(To, From, Count) \
|
# define YYCOPY(To, From, Count) \
|
||||||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||||||
# else
|
# else
|
||||||
|
@ -866,38 +873,38 @@ static const unsigned short yyrline[] =
|
||||||
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
|
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
|
||||||
static const char *const yytname[] =
|
static const char *const yytname[] =
|
||||||
{
|
{
|
||||||
"$end", "error", "$undefined", "tNL", "tNUMBER", "tLNUMBER", "tSTRING",
|
"$end", "error", "$undefined", "tNL", "tNUMBER", "tLNUMBER", "tSTRING",
|
||||||
"tIDENT", "tFILENAME", "tRAWDATA", "tACCELERATORS", "tBITMAP",
|
"tIDENT", "tFILENAME", "tRAWDATA", "tACCELERATORS", "tBITMAP", "tCURSOR",
|
||||||
"tCURSOR", "tDIALOG", "tDIALOGEX", "tMENU", "tMENUEX", "tMESSAGETABLE",
|
"tDIALOG", "tDIALOGEX", "tMENU", "tMENUEX", "tMESSAGETABLE", "tRCDATA",
|
||||||
"tRCDATA", "tVERSIONINFO", "tSTRINGTABLE", "tFONT", "tFONTDIR", "tICON",
|
"tVERSIONINFO", "tSTRINGTABLE", "tFONT", "tFONTDIR", "tICON",
|
||||||
"tAUTO3STATE", "tAUTOCHECKBOX", "tAUTORADIOBUTTON", "tCHECKBOX",
|
"tAUTO3STATE", "tAUTOCHECKBOX", "tAUTORADIOBUTTON", "tCHECKBOX",
|
||||||
"tDEFPUSHBUTTON", "tPUSHBUTTON", "tRADIOBUTTON", "tSTATE3", "tGROUPBOX",
|
"tDEFPUSHBUTTON", "tPUSHBUTTON", "tRADIOBUTTON", "tSTATE3", "tGROUPBOX",
|
||||||
"tCOMBOBOX", "tLISTBOX", "tSCROLLBAR", "tCONTROL", "tEDITTEXT",
|
"tCOMBOBOX", "tLISTBOX", "tSCROLLBAR", "tCONTROL", "tEDITTEXT", "tRTEXT",
|
||||||
"tRTEXT", "tCTEXT", "tLTEXT", "tBLOCK", "tVALUE", "tSHIFT", "tALT",
|
"tCTEXT", "tLTEXT", "tBLOCK", "tVALUE", "tSHIFT", "tALT", "tASCII",
|
||||||
"tASCII", "tVIRTKEY", "tGRAYED", "tCHECKED", "tINACTIVE", "tNOINVERT",
|
"tVIRTKEY", "tGRAYED", "tCHECKED", "tINACTIVE", "tNOINVERT", "tPURE",
|
||||||
"tPURE", "tIMPURE", "tDISCARDABLE", "tLOADONCALL", "tPRELOAD", "tFIXED",
|
"tIMPURE", "tDISCARDABLE", "tLOADONCALL", "tPRELOAD", "tFIXED",
|
||||||
"tMOVEABLE", "tCLASS", "tCAPTION", "tCHARACTERISTICS", "tEXSTYLE",
|
"tMOVEABLE", "tCLASS", "tCAPTION", "tCHARACTERISTICS", "tEXSTYLE",
|
||||||
"tSTYLE", "tVERSION", "tLANGUAGE", "tFILEVERSION", "tPRODUCTVERSION",
|
"tSTYLE", "tVERSION", "tLANGUAGE", "tFILEVERSION", "tPRODUCTVERSION",
|
||||||
"tFILEFLAGSMASK", "tFILEOS", "tFILETYPE", "tFILEFLAGS", "tFILESUBTYPE",
|
"tFILEFLAGSMASK", "tFILEOS", "tFILETYPE", "tFILEFLAGS", "tFILESUBTYPE",
|
||||||
"tMENUBARBREAK", "tMENUBREAK", "tMENUITEM", "tPOPUP", "tSEPARATOR",
|
"tMENUBARBREAK", "tMENUBREAK", "tMENUITEM", "tPOPUP", "tSEPARATOR",
|
||||||
"tHELP", "tTOOLBAR", "tBUTTON", "tBEGIN", "tEND", "tDLGINIT", "'|'",
|
"tHELP", "tTOOLBAR", "tBUTTON", "tBEGIN", "tEND", "tDLGINIT", "'|'",
|
||||||
"'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'~'", "tNOT", "pUPM", "','",
|
"'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'~'", "tNOT", "pUPM", "','",
|
||||||
"'('", "')'", "$accept", "resource_file", "resources", "resource", "@1",
|
"'('", "')'", "$accept", "resource_file", "resources", "resource", "@1",
|
||||||
"usrcvt", "nameid", "nameid_s", "resource_definition", "filename",
|
"usrcvt", "nameid", "nameid_s", "resource_definition", "filename",
|
||||||
"bitmap", "cursor", "icon", "font", "fontdir", "messagetable", "rcdata",
|
"bitmap", "cursor", "icon", "font", "fontdir", "messagetable", "rcdata",
|
||||||
"dlginit", "userres", "usertype", "accelerators", "events", "acc_opt",
|
"dlginit", "userres", "usertype", "accelerators", "events", "acc_opt",
|
||||||
"accs", "acc", "dialog", "dlg_attributes", "ctrls", "lab_ctrl",
|
"accs", "acc", "dialog", "dlg_attributes", "ctrls", "lab_ctrl",
|
||||||
"ctrl_desc", "iconinfo", "gen_ctrl", "opt_font", "optional_style_pair",
|
"ctrl_desc", "iconinfo", "gen_ctrl", "opt_font", "optional_style_pair",
|
||||||
"style", "ctlclass", "dialogex", "dlgex_attribs", "exctrls",
|
"style", "ctlclass", "dialogex", "dlgex_attribs", "exctrls",
|
||||||
"gen_exctrl", "lab_exctrl", "exctrl_desc", "opt_data", "helpid",
|
"gen_exctrl", "lab_exctrl", "exctrl_desc", "opt_data", "helpid",
|
||||||
"opt_exfont", "opt_expr", "menu", "menu_body", "item_definitions",
|
"opt_exfont", "opt_expr", "menu", "menu_body", "item_definitions",
|
||||||
"item_options", "menuex", "menuex_body", "itemex_definitions",
|
"item_options", "menuex", "menuex_body", "itemex_definitions",
|
||||||
"itemex_options", "itemex_p_options", "stringtable", "stt_head",
|
"itemex_options", "itemex_p_options", "stringtable", "stt_head",
|
||||||
"strings", "opt_comma", "versioninfo", "fix_version", "ver_blocks",
|
"strings", "opt_comma", "versioninfo", "fix_version", "ver_blocks",
|
||||||
"ver_block", "ver_values", "ver_value", "ver_words", "toolbar",
|
"ver_block", "ver_values", "ver_value", "ver_words", "toolbar",
|
||||||
"toolbar_items", "loadmemopts", "lamo", "lama", "opt_lvc",
|
"toolbar_items", "loadmemopts", "lamo", "lama", "opt_lvc",
|
||||||
"opt_language", "opt_characts", "opt_version", "raw_data",
|
"opt_language", "opt_characts", "opt_version", "raw_data",
|
||||||
"raw_elements", "file_raw", "e_expr", "expr", "xpr_no_not", "xpr",
|
"raw_elements", "file_raw", "e_expr", "expr", "xpr_no_not", "xpr",
|
||||||
"any_num", 0
|
"any_num", 0
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -1388,7 +1395,8 @@ static const unsigned char yystos[] =
|
||||||
|
|
||||||
#define YYACCEPT goto yyacceptlab
|
#define YYACCEPT goto yyacceptlab
|
||||||
#define YYABORT goto yyabortlab
|
#define YYABORT goto yyabortlab
|
||||||
#define YYERROR goto yyerrlab1
|
#define YYERROR goto yyerrorlab
|
||||||
|
|
||||||
|
|
||||||
/* Like YYERROR except do call yyerror. This remains here temporarily
|
/* Like YYERROR except do call yyerror. This remains here temporarily
|
||||||
to ease the transition to the new meaning of YYERROR, for GCC.
|
to ease the transition to the new meaning of YYERROR, for GCC.
|
||||||
|
@ -1422,11 +1430,11 @@ while (0)
|
||||||
are run). */
|
are run). */
|
||||||
|
|
||||||
#ifndef YYLLOC_DEFAULT
|
#ifndef YYLLOC_DEFAULT
|
||||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||||
Current.first_line = Rhs[1].first_line; \
|
((Current).first_line = (Rhs)[1].first_line, \
|
||||||
Current.first_column = Rhs[1].first_column; \
|
(Current).first_column = (Rhs)[1].first_column, \
|
||||||
Current.last_line = Rhs[N].last_line; \
|
(Current).last_line = (Rhs)[N].last_line, \
|
||||||
Current.last_column = Rhs[N].last_column;
|
(Current).last_column = (Rhs)[N].last_column)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* YYLEX -- calling `yylex' with the right arguments. */
|
/* YYLEX -- calling `yylex' with the right arguments. */
|
||||||
|
@ -1470,7 +1478,7 @@ do { \
|
||||||
|
|
||||||
/*------------------------------------------------------------------.
|
/*------------------------------------------------------------------.
|
||||||
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
|
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
|
||||||
| TOP (cinluded). |
|
| TOP (included). |
|
||||||
`------------------------------------------------------------------*/
|
`------------------------------------------------------------------*/
|
||||||
|
|
||||||
#if defined (__STDC__) || defined (__cplusplus)
|
#if defined (__STDC__) || defined (__cplusplus)
|
||||||
|
@ -1510,9 +1518,9 @@ yy_reduce_print (yyrule)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
int yyi;
|
int yyi;
|
||||||
unsigned int yylineno = yyrline[yyrule];
|
unsigned int yylno = yyrline[yyrule];
|
||||||
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
|
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
|
||||||
yyrule - 1, yylineno);
|
yyrule - 1, yylno);
|
||||||
/* Print the symbols being reduced, and their result. */
|
/* Print the symbols being reduced, and their result. */
|
||||||
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
|
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
|
||||||
YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
|
YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
|
||||||
|
@ -1549,7 +1557,7 @@ int yydebug;
|
||||||
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
|
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
|
||||||
evaluated with infinite-precision integer arithmetic. */
|
evaluated with infinite-precision integer arithmetic. */
|
||||||
|
|
||||||
#if YYMAXDEPTH == 0
|
#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
|
||||||
# undef YYMAXDEPTH
|
# undef YYMAXDEPTH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -4146,8 +4154,8 @@ yyreduce:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Line 991 of yacc.c. */
|
/* Line 1000 of yacc.c. */
|
||||||
#line 4150 "y.tab.c"
|
#line 4159 "parser.tab.c"
|
||||||
|
|
||||||
yyvsp -= yylen;
|
yyvsp -= yylen;
|
||||||
yyssp -= yylen;
|
yyssp -= yylen;
|
||||||
|
@ -4188,18 +4196,33 @@ yyerrlab:
|
||||||
{
|
{
|
||||||
YYSIZE_T yysize = 0;
|
YYSIZE_T yysize = 0;
|
||||||
int yytype = YYTRANSLATE (yychar);
|
int yytype = YYTRANSLATE (yychar);
|
||||||
|
const char* yyprefix;
|
||||||
char *yymsg;
|
char *yymsg;
|
||||||
int yyx, yycount;
|
int yyx;
|
||||||
|
|
||||||
yycount = 0;
|
|
||||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||||
YYCHECK. */
|
YYCHECK. */
|
||||||
for (yyx = yyn < 0 ? -yyn : 0;
|
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||||
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
|
|
||||||
|
/* Stay within bounds of both yycheck and yytname. */
|
||||||
|
int yychecklim = YYLAST - yyn;
|
||||||
|
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
||||||
|
int yycount = 0;
|
||||||
|
|
||||||
|
yyprefix = ", expecting ";
|
||||||
|
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
||||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
||||||
yysize += yystrlen (yytname[yyx]) + 15, yycount++;
|
{
|
||||||
yysize += yystrlen ("syntax error, unexpected ") + 1;
|
yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
|
||||||
yysize += yystrlen (yytname[yytype]);
|
yycount += 1;
|
||||||
|
if (yycount == 5)
|
||||||
|
{
|
||||||
|
yysize = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
yysize += (sizeof ("syntax error, unexpected ")
|
||||||
|
+ yystrlen (yytname[yytype]));
|
||||||
yymsg = (char *) YYSTACK_ALLOC (yysize);
|
yymsg = (char *) YYSTACK_ALLOC (yysize);
|
||||||
if (yymsg != 0)
|
if (yymsg != 0)
|
||||||
{
|
{
|
||||||
|
@ -4208,16 +4231,13 @@ yyerrlab:
|
||||||
|
|
||||||
if (yycount < 5)
|
if (yycount < 5)
|
||||||
{
|
{
|
||||||
yycount = 0;
|
yyprefix = ", expecting ";
|
||||||
for (yyx = yyn < 0 ? -yyn : 0;
|
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
||||||
yyx < (int) (sizeof (yytname) / sizeof (char *));
|
|
||||||
yyx++)
|
|
||||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
||||||
{
|
{
|
||||||
const char *yyq = ! yycount ? ", expecting " : " or ";
|
yyp = yystpcpy (yyp, yyprefix);
|
||||||
yyp = yystpcpy (yyp, yyq);
|
|
||||||
yyp = yystpcpy (yyp, yytname[yyx]);
|
yyp = yystpcpy (yyp, yytname[yyx]);
|
||||||
yycount++;
|
yyprefix = " or ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
yyerror (yymsg);
|
yyerror (yymsg);
|
||||||
|
@ -4238,51 +4258,56 @@ yyerrlab:
|
||||||
/* If just tried and failed to reuse lookahead token after an
|
/* If just tried and failed to reuse lookahead token after an
|
||||||
error, discard it. */
|
error, discard it. */
|
||||||
|
|
||||||
/* Return failure if at end of input. */
|
if (yychar <= YYEOF)
|
||||||
if (yychar == YYEOF)
|
|
||||||
{
|
{
|
||||||
/* Pop the error token. */
|
/* If at end of input, pop the error token,
|
||||||
YYPOPSTACK;
|
then the rest of the stack, then return failure. */
|
||||||
/* Pop the rest of the stack. */
|
if (yychar == YYEOF)
|
||||||
while (yyss < yyssp)
|
for (;;)
|
||||||
{
|
{
|
||||||
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
|
YYPOPSTACK;
|
||||||
yydestruct (yystos[*yyssp], yyvsp);
|
if (yyssp == yyss)
|
||||||
YYPOPSTACK;
|
YYABORT;
|
||||||
}
|
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
|
||||||
YYABORT;
|
yydestruct (yystos[*yyssp], yyvsp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
|
||||||
|
yydestruct (yytoken, &yylval);
|
||||||
|
yychar = YYEMPTY;
|
||||||
|
|
||||||
YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
|
}
|
||||||
yydestruct (yytoken, &yylval);
|
|
||||||
yychar = YYEMPTY;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Else will try to reuse lookahead token after shifting the error
|
/* Else will try to reuse lookahead token after shifting the error
|
||||||
token. */
|
token. */
|
||||||
goto yyerrlab2;
|
goto yyerrlab1;
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------.
|
/*---------------------------------------------------.
|
||||||
| yyerrlab1 -- error raised explicitly by an action. |
|
| yyerrorlab -- error raised explicitly by YYERROR. |
|
||||||
`----------------------------------------------------*/
|
`---------------------------------------------------*/
|
||||||
yyerrlab1:
|
yyerrorlab:
|
||||||
|
|
||||||
/* Suppress GCC warning that yyerrlab1 is unused when no action
|
#ifdef __GNUC__
|
||||||
invokes YYERROR. */
|
/* Pacify GCC when the user code never invokes YYERROR and the label
|
||||||
#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
|
yyerrorlab therefore never appears in user code. */
|
||||||
__attribute__ ((__unused__))
|
if (0)
|
||||||
|
goto yyerrorlab;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
yyvsp -= yylen;
|
||||||
goto yyerrlab2;
|
yyssp -= yylen;
|
||||||
|
yystate = *yyssp;
|
||||||
|
goto yyerrlab1;
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------.
|
/*-------------------------------------------------------------.
|
||||||
| yyerrlab2 -- pop states until the error token can be shifted. |
|
| yyerrlab1 -- common code for both syntax error and YYERROR. |
|
||||||
`---------------------------------------------------------------*/
|
`-------------------------------------------------------------*/
|
||||||
yyerrlab2:
|
yyerrlab1:
|
||||||
yyerrstatus = 3; /* Each real token shifted decrements this. */
|
yyerrstatus = 3; /* Each real token shifted decrements this. */
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
|
@ -4305,9 +4330,8 @@ yyerrlab2:
|
||||||
|
|
||||||
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
|
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
|
||||||
yydestruct (yystos[yystate], yyvsp);
|
yydestruct (yystos[yystate], yyvsp);
|
||||||
yyvsp--;
|
YYPOPSTACK;
|
||||||
yystate = *--yyssp;
|
yystate = *yyssp;
|
||||||
|
|
||||||
YY_STACK_PRINT (yyss, yyssp);
|
YY_STACK_PRINT (yyss, yyssp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5082,7 +5106,7 @@ static stringtable_t *find_stringtable(lvc_t *lvc)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* qsort sorting function for string table entries */
|
/* qsort sorting function for string table entries */
|
||||||
#define STE(p) ((stt_entry_t *)(p))
|
#define STE(p) ((const stt_entry_t *)(p))
|
||||||
static int sort_stt_entry(const void *e1, const void *e2)
|
static int sort_stt_entry(const void *e1, const void *e2)
|
||||||
{
|
{
|
||||||
return STE(e1)->id - STE(e2)->id;
|
return STE(e1)->id - STE(e2)->id;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* A Bison parser, made by GNU Bison 1.875. */
|
/* A Bison parser, made by GNU Bison 1.875c. */
|
||||||
|
|
||||||
/* Skeleton parser for Yacc-like parsing with Bison,
|
/* Skeleton parser for Yacc-like parsing with Bison,
|
||||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
|
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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -243,8 +243,8 @@ typedef union YYSTYPE {
|
||||||
style_t *style;
|
style_t *style;
|
||||||
ani_any_t *ani;
|
ani_any_t *ani;
|
||||||
} YYSTYPE;
|
} YYSTYPE;
|
||||||
/* Line 1248 of yacc.c. */
|
/* Line 1275 of yacc.c. */
|
||||||
#line 247 "y.tab.h"
|
#line 248 "parser.tab.h"
|
||||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||||
# define YYSTYPE_IS_DECLARED 1
|
# define YYSTYPE_IS_DECLARED 1
|
||||||
# define YYSTYPE_IS_TRIVIAL 1
|
# define YYSTYPE_IS_TRIVIAL 1
|
||||||
|
|
Loading…
Reference in a new issue