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,19 +1,19 @@
/* 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
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@ -26,13 +26,13 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_KIOTRADER_YACC_H_INCLUDED
# define YY_KIOTRADER_YACC_H_INCLUDED
/* Enabling traces. */
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
@ -40,45 +40,44 @@
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 {
NOT = 258,
EQ = 259,
EQI = 260,
NEQ = 261,
NEQI = 262,
LEQ = 263,
GEQ = 264,
LE = 265,
GR = 266,
OR = 267,
AND = 268,
TOKEN_IN = 269,
TOKEN_IN_SUBSTRING = 270,
MATCH_INSENSITIVE = 271,
TOKEN_IN_INSENSITIVE = 272,
TOKEN_IN_SUBSTRING_INSENSITIVE = 273,
EXIST = 274,
MAX = 275,
MIN = 276,
VAL_BOOL = 277,
VAL_STRING = 278,
VAL_ID = 279,
VAL_NUM = 280,
VAL_FLOAT = 281
};
enum yytokentype
{
NOT = 258,
EQ = 259,
EQI = 260,
NEQ = 261,
NEQI = 262,
LEQ = 263,
GEQ = 264,
LE = 265,
GR = 266,
OR = 267,
AND = 268,
TOKEN_IN = 269,
TOKEN_IN_SUBSTRING = 270,
MATCH_INSENSITIVE = 271,
TOKEN_IN_INSENSITIVE = 272,
TOKEN_IN_SUBSTRING_INSENSITIVE = 273,
EXIST = 274,
MAX = 275,
MIN = 276,
VAL_BOOL = 277,
VAL_STRING = 278,
VAL_ID = 279,
VAL_NUM = 280,
VAL_FLOAT = 281
};
#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 );
}