Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 511560
Collapse All | Expand All

(-)file_not_specified_in_diff (-12 / +14 lines)
Line  Link Here
YYPARSE_PARAM was deprecated in Bison 1.875 and removed in Bison 3;
YYPARSE_PARAM was deprecated in Bison 1.875 and removed in Bison 3;
1
%parse-param can be used instead. Also fix a warning about %pure_parser
1
%parse-param can be used instead. Also fix a warning about %pure_parser
2
-- a/src/resParser.y
2
++ b/src/resParser.y
Lines 39-50 Link Here
39
39
40
// The parser input is the resources object to fill in.
40
// The parser input is the resources object to fill in.
41
#define RESOURCES  ( static_cast<XxResources*>(resources) )
41
#define RESOURCES  ( static_cast<XxResources*>(resources) )
42
#define YYPARSE_PARAM resources
43
42
44
// Declare lexer from other compilation unit.
43
// Declare lexer from other compilation unit.
45
int resParserlex( YYSTYPE* yylval );
44
int resParserlex( YYSTYPE* yylval );
46
45
47
void resParsererror( const char* msg );
46
void resParsererror( void *resources, const char* msg );
48
47
49
// Declare some parser functions and data defined in resParser.cpp
48
// Declare some parser functions and data defined in resParser.cpp
50
namespace XxResParserNS {
49
namespace XxResParserNS {
Lines 58-63 Link Here
58
57
59
%}
58
%}
60
59
60
/* The parser input is the resources object to fill in. */
61
%parse-param { void *resources }
62
61
/* generate header file */
63
/* generate header file */
62
%defines
64
%defines
63
65
Lines 144-150 Link Here
144
%type <num> boolkwd
146
%type <num> boolkwd
145
147
146
%start xxdiffrc
148
%start xxdiffrc
147
%pure_parser
149
%pure-parser
148
150
149
%%
151
%%
150
xxdiffrc	: stmts
152
xxdiffrc	: stmts
Lines 188-194 Link Here
188
                      RESOURCES->setPreferredGeometry( geometry );
190
                      RESOURCES->setPreferredGeometry( geometry );
189
                   }
191
                   }
190
                   else {
192
                   else {
191
                      yyerror( "Bad geometry specification." );
193
                      yyerror( resources, "Bad geometry specification." );
192
                      // Should never happen, the lexer regexp should be tough
194
                      // Should never happen, the lexer regexp should be tough
193
                      // enough.
195
                      // enough.
194
                   }
196
                   }
Lines 212-218 Link Here
212
                      QString err = QString( "Requested style key does not exist." );
214
                      QString err = QString( "Requested style key does not exist." );
213
                      err += QString( "\nValid styles are: " );
215
                      err += QString( "\nValid styles are: " );
214
                      err += styles.join( ", " );
216
                      err += styles.join( ", " );
215
                      yyerror( err.toLatin1().constData() );
217
                      yyerror( resources, err.toLatin1().constData() );
216
                   }
218
                   }
217
                }
219
                }
218
                ;
220
                ;
Lines 224-230 Link Here
224
                      char buf[2048];
226
                      char buf[2048];
225
                      ::snprintf( buf, 2048,
227
                      ::snprintf( buf, 2048,
226
                                  "Unrecognized accelerator: %s\n", $5 );
228
                                  "Unrecognized accelerator: %s\n", $5 );
227
                      yyerror( buf );
229
                      yyerror( resources, buf );
228
                   }
230
                   }
229
                }
231
                }
230
		;
232
		;
231
-- a/src/resParser.l
233
++ b/src/resParser.l
Lines 298-304 Link Here
298
                     QString os;
298
                     QString os;
299
                     QTextOStream oss( &os );
299
                     QTextOStream oss( &os );
300
                     oss << "ignoring char: " << yytext << flush;
300
                     oss << "ignoring char: " << yytext << flush;
301
                     yyerror( os.latin1() );
301
                     yyerror( resources, os.latin1() );
302
                     */
302
                     */
303
                  }
303
                  }
304
                }
304
                }
305
-- a/src/resParser.cpp
305
++ b/src/resParser.cpp
Lines 73-79 Link Here
73
73
74
//------------------------------------------------------------------------------
74
//------------------------------------------------------------------------------
75
//
75
//
76
void resParsererror( const char* msg )
76
void resParsererror( void* resources __attribute__((__unused__)), const char* msg )
77
{
77
{
78
   // Send errors to stdout so we can filter out the debug info shmeglu while
78
   // Send errors to stdout so we can filter out the debug info shmeglu while
79
   // debugging parser.
79
   // debugging parser.
Lines 794-800 Link Here
794
      QString os;
794
      QString os;
795
      QTextStream oss( &os );
795
      QTextStream oss( &os );
796
      oss << "Unknown " << errmsg << ": " << name << flush;
796
      oss << "Unknown " << errmsg << ": " << name << flush;
797
      resParsererror( os.toLatin1().constData() );
797
      resParsererror( NULL, os.toLatin1().constData() );
798
   }
798
   }
799
   num = ERROR_TOKEN;
799
   num = ERROR_TOKEN;
800
   return ERROR_TOKEN;
800
   return ERROR_TOKEN;

Return to bug 511560