mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdecore: regen and make the kiotrader lexer compatible with Bison 3.x
This commit is contained in:
parent
b58af18570
commit
f2ee459f5e
3 changed files with 568 additions and 735 deletions
File diff suppressed because it is too large
Load diff
|
@ -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
|
/* 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
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
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
|
special exception, which will cause the skeleton and the resulting
|
||||||
Bison output files to be licensed under the GNU General Public
|
Bison output files to be licensed under the GNU General Public
|
||||||
License without this special exception.
|
License without this special exception.
|
||||||
|
|
||||||
This special exception was added by the Free Software Foundation in
|
This special exception was added by the Free Software Foundation in
|
||||||
version 2.2 of Bison. */
|
version 2.2 of Bison. */
|
||||||
|
|
||||||
#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,45 +40,44 @@
|
||||||
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,
|
NEQ = 261,
|
||||||
NEQ = 261,
|
NEQI = 262,
|
||||||
NEQI = 262,
|
LEQ = 263,
|
||||||
LEQ = 263,
|
GEQ = 264,
|
||||||
GEQ = 264,
|
LE = 265,
|
||||||
LE = 265,
|
GR = 266,
|
||||||
GR = 266,
|
OR = 267,
|
||||||
OR = 267,
|
AND = 268,
|
||||||
AND = 268,
|
TOKEN_IN = 269,
|
||||||
TOKEN_IN = 269,
|
TOKEN_IN_SUBSTRING = 270,
|
||||||
TOKEN_IN_SUBSTRING = 270,
|
MATCH_INSENSITIVE = 271,
|
||||||
MATCH_INSENSITIVE = 271,
|
TOKEN_IN_INSENSITIVE = 272,
|
||||||
TOKEN_IN_INSENSITIVE = 272,
|
TOKEN_IN_SUBSTRING_INSENSITIVE = 273,
|
||||||
TOKEN_IN_SUBSTRING_INSENSITIVE = 273,
|
EXIST = 274,
|
||||||
EXIST = 274,
|
MAX = 275,
|
||||||
MAX = 275,
|
MIN = 276,
|
||||||
MIN = 276,
|
VAL_BOOL = 277,
|
||||||
VAL_BOOL = 277,
|
VAL_STRING = 278,
|
||||||
VAL_STRING = 278,
|
VAL_ID = 279,
|
||||||
VAL_ID = 279,
|
VAL_NUM = 280,
|
||||||
VAL_NUM = 280,
|
VAL_FLOAT = 281
|
||||||
VAL_FLOAT = 281
|
};
|
||||||
};
|
|
||||||
#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 */
|
||||||
|
|
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue