mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 15:53:03 +00:00
2004-11-23 Akim Demaille <akim@epita.fr>
* data/lalr1.cc (YYSTYPE): Define it as is done for C, instead of #defining from yystype. Don't typedef yystype, C++ does not need it. This lets it possible to forward declare it as union.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2004-11-23 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
|
||||||
|
of #defining from yystype.
|
||||||
|
Don't typedef yystype, C++ does not need it.
|
||||||
|
This lets it possible to forward declare it as union.
|
||||||
|
|
||||||
2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
|
2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
* bootstrap (gnulib_modules): Add extensions.
|
* bootstrap (gnulib_modules): Add extensions.
|
||||||
|
|||||||
@@ -164,16 +164,16 @@ b4_syncline([@oline@], [@ofile@])[
|
|||||||
# define YYERROR_VERBOSE ]b4_error_verbose[
|
# define YYERROR_VERBOSE ]b4_error_verbose[
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef YYSTYPE
|
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
||||||
typedef YYSTYPE yystype;
|
|
||||||
#else
|
|
||||||
]m4_ifdef([b4_stype],
|
]m4_ifdef([b4_stype],
|
||||||
[b4_syncline([b4_stype_line], [b4_filename])
|
[b4_syncline([b4_stype_line], [b4_filename])
|
||||||
typedef union b4_stype yystype;
|
union YYSTYPE b4_stype;
|
||||||
/* Line __line__ of lalr1.cc. */
|
/* Line __line__ of lalr1.cc. */
|
||||||
b4_syncline([@oline@], [@ofile@])],
|
b4_syncline([@oline@], [@ofile@])],
|
||||||
[typedef int yystype;])[
|
[typedef int YYSTYPE;])[
|
||||||
# define YYSTYPE yystype
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||||
|
# define YYSTYPE_IS_DECLARED 1
|
||||||
|
# define YYSTYPE_IS_TRIVIAL 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Copy the second part of user declarations. */
|
/* Copy the second part of user declarations. */
|
||||||
@@ -215,7 +215,7 @@ namespace yy
|
|||||||
typedef ]b4_int_type_for([b4_translate])[ TokenNumberType;
|
typedef ]b4_int_type_for([b4_translate])[ TokenNumberType;
|
||||||
typedef ]b4_int_type_for([b4_rhs])[ RhsNumberType;
|
typedef ]b4_int_type_for([b4_rhs])[ RhsNumberType;
|
||||||
typedef int StateType;
|
typedef int StateType;
|
||||||
typedef yystype SemanticType;
|
typedef YYSTYPE SemanticType;
|
||||||
typedef ]b4_location_type[ LocationType;
|
typedef ]b4_location_type[ LocationType;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user