kdecore: regen and make the kiotrader lexer compatible with Bison 3.x

This commit is contained in:
Ivailo Monev 2015-02-28 02:02:04 +00:00
parent b58af18570
commit f2ee459f5e
3 changed files with 568 additions and 735 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 2.7.12-4996. */ /* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C /* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. Copyright (C) 1984, 1989-1990, 2000-2015 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
@ -32,7 +32,7 @@
#ifndef YY_KIOTRADER_YACC_H_INCLUDED #ifndef YY_KIOTRADER_YACC_H_INCLUDED
# define YY_KIOTRADER_YACC_H_INCLUDED # define YY_KIOTRADER_YACC_H_INCLUDED
/* Enabling traces. */ /* Debug traces. */
#ifndef YYDEBUG #ifndef YYDEBUG
# define YYDEBUG 0 # define YYDEBUG 0
#endif #endif
@ -40,12 +40,11 @@
extern int kiotraderdebug; extern int kiotraderdebug;
#endif #endif
/* Tokens. */ /* Token type. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers enum yytokentype
know about them. */ {
enum yytokentype {
NOT = 258, NOT = 258,
EQ = 259, EQ = 259,
EQI = 260, EQI = 260,
@ -73,12 +72,12 @@ extern int kiotraderdebug;
}; };
#endif #endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
union YYSTYPE
{ {
/* Line 2053 of yacc.c */ #line 20 "yacc.y" /* yacc.c:1909 */
#line 22 "yacc.y"
char valb; char valb;
int vali; int vali;
@ -86,16 +85,16 @@ typedef union YYSTYPE
char *name; char *name;
void *ptr; void *ptr;
#line 89 "yacc.h" /* yacc.c:1909 */
};
/* Line 2053 of yacc.c */ typedef union YYSTYPE YYSTYPE;
#line 92 "yacc.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
#endif #endif
int kiotraderparse (void *_scanner);
#endif /* !YY_KIOTRADER_YACC_H_INCLUDED */ #endif /* !YY_KIOTRADER_YACC_H_INCLUDED */

View file

@ -6,10 +6,8 @@
#define YYLTYPE_IS_TRIVIAL 0 #define YYLTYPE_IS_TRIVIAL 0
#define YYENABLE_NLS 0 #define YYENABLE_NLS 0
#define YYLEX_PARAM _scanner
#define YYPARSE_PARAM _scanner
typedef void* yyscan_t; typedef void* yyscan_t;
void yyerror(const char *s); void yyerror(void *_scanner, const char *s);
int kiotraderlex(YYSTYPE * yylval, yyscan_t scanner); int kiotraderlex(YYSTYPE * yylval, yyscan_t scanner);
int kiotraderlex_init (yyscan_t* scanner); int kiotraderlex_init (yyscan_t* scanner);
int kiotraderlex_destroy(yyscan_t scanner); int kiotraderlex_destroy(yyscan_t scanner);
@ -27,6 +25,9 @@ void KTraderParse_initFlex( const char *s, yyscan_t _scanner );
void *ptr; void *ptr;
} }
%lex-param { void *_scanner }
%parse-param { void *_scanner }
%token NOT %token NOT
%token EQ %token EQ
%token EQI %token EQI
@ -147,7 +148,7 @@ factor: '(' bool_or ')' { $$ = KTraderParse_newBRACKETS( $<ptr>2 ); }
%% %%
void yyerror ( const char *s ) /* Called by yyparse on error */ void yyerror ( void *_scanner, const char *s ) /* Called by yyparse on error */
{ {
KTraderParse_error( s ); KTraderParse_error( s );
} }