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
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
it under the terms of the GNU General Public License as published by
@ -32,7 +32,7 @@
#ifndef YY_KIOTRADER_YACC_H_INCLUDED
# define YY_KIOTRADER_YACC_H_INCLUDED
/* Enabling traces. */
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
@ -40,12 +40,11 @@
extern int kiotraderdebug;
#endif
/* Tokens. */
/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
enum yytokentype
{
NOT = 258,
EQ = 259,
EQI = 260,
@ -73,12 +72,12 @@ extern int kiotraderdebug;
};
#endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
union YYSTYPE
{
/* Line 2053 of yacc.c */
#line 22 "yacc.y"
#line 20 "yacc.y" /* yacc.c:1909 */
char valb;
int vali;
@ -86,16 +85,16 @@ typedef union YYSTYPE
char *name;
void *ptr;
#line 89 "yacc.h" /* yacc.c:1909 */
};
/* Line 2053 of yacc.c */
#line 92 "yacc.h"
} YYSTYPE;
typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
int kiotraderparse (void *_scanner);
#endif /* !YY_KIOTRADER_YACC_H_INCLUDED */

View file

@ -6,10 +6,8 @@
#define YYLTYPE_IS_TRIVIAL 0
#define YYENABLE_NLS 0
#define YYLEX_PARAM _scanner
#define YYPARSE_PARAM _scanner
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_init (yyscan_t* scanner);
int kiotraderlex_destroy(yyscan_t scanner);
@ -27,6 +25,9 @@ void KTraderParse_initFlex( const char *s, yyscan_t _scanner );
void *ptr;
}
%lex-param { void *_scanner }
%parse-param { void *_scanner }
%token NOT
%token EQ
%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 );
}