diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-03-23 17:46:23 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-03-25 08:52:54 +0100 |
commit | c940e3d8b3895c550fb37e0e9acbd19b4bb3515e (patch) | |
tree | 2f81616dd623b764057c63914f678f54ae70389d | |
parent | 9e2de8007067928b426088c4c1a16b5f07959332 (diff) |
Remove unused macros from checked-in Flex/Bison output
...(for which the source is no longer available), to silence -Wunused-macros.
Change-Id: If4676ead42e0fb8bd3ff3d07c27aa83fd204167e
-rw-r--r-- | hwpfilter/source/grammar.cxx | 55 | ||||
-rw-r--r-- | hwpfilter/source/lexer.cxx | 91 |
2 files changed, 1 insertions, 145 deletions
diff --git a/hwpfilter/source/grammar.cxx b/hwpfilter/source/grammar.cxx index 9f315d310c07..af263883b025 100644 --- a/hwpfilter/source/grammar.cxx +++ b/hwpfilter/source/grammar.cxx @@ -21,8 +21,6 @@ /* A Bison parser, made from grammar.y by GNU Bison version 1.28 */ -#define YYBISON 1 /* Identify Bison output. */ - #ifndef YYDEBUG #define YYDEBUG 0 #endif @@ -30,36 +28,6 @@ #define YYMAXDEPTH 0 #endif -#define ACCENT 257 -#define SMALL_GREEK 258 -#define CAPITAL_GREEK 259 -#define BINARY_OPERATOR 260 -#define RELATION_OPERATOR 261 -#define ARROW 262 -#define GENERAL_IDEN 263 -#define GENERAL_OPER 264 -#define BIG_SYMBOL 265 -#define FUNCTION 266 -#define ROOT 267 -#define FRACTION 268 -#define SUBSUP 269 -#define EQOVER 270 -#define DELIMETER 271 -#define LARGE_DELIM 272 -#define DECORATION 273 -#define SPACE_SYMBOL 274 -#define CHARACTER 275 -#define STRING 276 -#define OPERATOR 277 -#define EQBEGIN 278 -#define EQEND 279 -#define EQLEFT 280 -#define EQRIGHT 281 -#define NEWLINE 282 -#define LEFT_DELIM 283 -#define RIGHT_DELIM 284 -#define DIGIT 285 - #include <list> #include <stdlib.h> #include <string.h> @@ -434,33 +402,12 @@ static const short yycheck[] = { 11, It is replaced by the list of actions, each action as one case of the switch. */ -#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 yyerrlab1 -/* 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); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { yyerror ("syntax error: cannot back up"); YYERROR; } \ -while (0) #define YYTERROR 1 -#define YYERRCODE 256 #ifndef YYPURE #define YYLEX yylex() @@ -616,8 +563,6 @@ yyparse(YYPARSE_PARAM_ARG) YYLTYPE *yylsp; #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) -#else -#define YYPOPSTACK (yyvsp--, yyssp--) #endif int yystacksize = YYINITDEPTH; diff --git a/hwpfilter/source/lexer.cxx b/hwpfilter/source/lexer.cxx index 4ebf4333e686..3b08915f2bc8 100644 --- a/hwpfilter/source/lexer.cxx +++ b/hwpfilter/source/lexer.cxx @@ -34,10 +34,6 @@ #define YY_MAIN 0 #endif -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 - #include <stdio.h> @@ -98,18 +94,10 @@ */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yy_start = 1 + 2 * - /* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. + * to BEGIN to return to the state. */ #define YY_START ((yy_start - 1) / 2) -#define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) @@ -131,33 +119,6 @@ extern FILE *yyin, *yyout; #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - //#define unput(c) yyunput( c, yytext_ptr ) /* The following is because we cannot portably get our hands on size_t @@ -259,7 +220,6 @@ YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); -#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); @@ -269,24 +229,6 @@ static void *yy_flex_alloc YY_PROTO(( yy_size_t )); static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); static void yy_flex_free YY_PROTO(( void * )); -#define yy_new_buffer yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) - typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; @@ -308,7 +250,6 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 45 #define YY_END_OF_BUFFER 46 static yyconst short int yy_accept[994] = { 0, @@ -1011,11 +952,6 @@ static yyconst short int yy_chk[1389] = static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; @@ -1030,10 +966,6 @@ char *yytext; #define isatty _isatty #endif -/* enlarge token buffer to tokenize whole strings */ -#undef YYLMAX -#define YYLMAX 64000 - #ifdef __cplusplus extern "C" { #endif @@ -1155,11 +1087,6 @@ YY_MALLOC_DECL #define yyterminate() return YY_NULL #endif -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) @@ -2125,22 +2052,6 @@ char msg[]; -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ - } \ - while ( 0 ) - - /* Internal utility routines. */ #ifndef yytext_ptr |