Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
afb65f34
Commit
afb65f34
authored
Oct 13, 2015
by
Uwe Schulzweida
Browse files
expr.h: undef register for cplusplus
parent
75668dfb
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
src/expr.h
View file @
afb65f34
#include
<stdio.h>
#ifndef register
#define register
#endif
#ifdef __cplusplus
#ifndef fileno
int
fileno
(
FILE
*
stream
);
#endif
#endif
#ifndef strdupx
#ifndef strdup
...
...
src/expr_yacc.c
View file @
afb65f34
This diff is collapsed.
Click to expand it.
src/expr_yacc.h
View file @
afb65f34
/* 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-201
3
Free Software Foundation, Inc.
Copyright (C) 1984, 1989-1990, 2000-201
5
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
/*
Enablin
g traces. */
/*
Debu
g traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
...
...
@@ -40,59 +40,41 @@
extern
int
yydebug
;
#endif
/* Token
s
. */
/* 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 E
Q
262
#define
LEG
261
#define
G
E 262
#define LE 263
#define
G
E 264
#define
LEG
265
#define
OR
266
#define
AND
267
#define E
Q
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 */
src/expr_yacc.y
View file @
afb65f34
...
...
@@ -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);
}
...
...
src/yacc_lex
View file @
afb65f34
# 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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment