Commit afb65f34 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

expr.h: undef register for cplusplus

parent 75668dfb
#include <stdio.h>
#ifndef register
#define register
#endif
#ifdef __cplusplus
#ifndef fileno
int fileno(FILE *stream);
#endif
#endif
#ifndef strdupx
#ifndef strdup
......
This diff is collapsed.
/* 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_YY_EXPR_YACC_H_INCLUDED
# define YY_YY_EXPR_YACC_H_INCLUDED
/* Enabling traces. */
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
......@@ -40,59 +40,41 @@
extern int yydebug;
#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 {
CONSTANT = 258,
VARIABLE = 259,
FUNCTION = 260,
NE = 261,
EQ = 262,
LE = 263,
GE = 264,
LEG = 265,
OR = 266,
AND = 267,
UMINUS = 268
};
enum yytokentype
{
CONSTANT = 258,
VARIABLE = 259,
FUNCTION = 260,
LEG = 261,
GE = 262,
LE = 263,
EQ = 264,
NE = 265,
AND = 266,
OR = 267,
UMINUS = 268
};
#endif
/* Tokens. */
#define CONSTANT 258
#define VARIABLE 259
#define FUNCTION 260
#define NE 261
#define EQ 262
#define LEG 261
#define GE 262
#define LE 263
#define GE 264
#define LEG 265
#define OR 266
#define AND 267
#define EQ 264
#define NE 265
#define AND 266
#define OR 267
#define UMINUS 268
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (parse_parm_t *parse_arg, void *scanner);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
#endif /* !YY_YY_EXPR_YACC_H_INCLUDED */
......@@ -189,7 +189,7 @@ void freeNode(nodeType *p)
free (p);
}
void yyerror(void *parse_arg, void *scanner, char *errstr)
void yyerror(void *parse_arg, void *scanner, const char *errstr)
{
fprintf(stdout, "%s!\n", errstr);
}
......
# bison version 2.7; flex version 2.5.37
# bison version 3.0.4; flex version 2.5.37
bison -y -o expr_yacc.c -d expr_yacc.y
flex -oexpr_lex.c expr_lex.l
flex -v -oexpr_lex.c expr_lex.l
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment