mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* data/bison.simple (m4_if): Don't output empty enums.
And actually, output valid enum definitions :(.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2002-05-03 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* data/bison.simple (m4_if): Don't output empty enums.
|
||||||
|
And actually, output valid enum definitions :(.
|
||||||
|
|
||||||
2002-05-03 Akim Demaille <akim@epita.fr>
|
2002-05-03 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* configure.bat: Remove, completely obsolete.
|
* configure.bat: Remove, completely obsolete.
|
||||||
|
|||||||
@@ -82,14 +82,16 @@ m4_define([b4_token_define],
|
|||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
# Output the definition of this token as an enum.
|
# Output the definition of this token as an enum.
|
||||||
m4_define([b4_token_enum],
|
m4_define([b4_token_enum],
|
||||||
[enum $1 = $2])
|
[$1 = $2])
|
||||||
|
|
||||||
|
|
||||||
# b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
|
# b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
|
||||||
# -------------------------------------------------------
|
# -------------------------------------------------------
|
||||||
# Output the definition of the tokens as #define.
|
# Output the definition of the tokens (if there are) as enums and #define.
|
||||||
m4_define([b4_token_defines],
|
m4_define([b4_token_defines],
|
||||||
[#ifndef YYTOKENTYPE
|
[m4_if([$@], [[]], [],
|
||||||
|
[/* Tokens. */
|
||||||
|
#ifndef YYTOKENTYPE
|
||||||
# if defined (__STDC__) || defined (__cplusplus)
|
# if defined (__STDC__) || defined (__cplusplus)
|
||||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||||
know about them. */
|
know about them. */
|
||||||
@@ -101,8 +103,10 @@ m4_map_sep([ b4_token_enum], [,
|
|||||||
/* POSIX requires `int' for tokens in interfaces. */
|
/* POSIX requires `int' for tokens in interfaces. */
|
||||||
# define YYTOKENTYPE int
|
# define YYTOKENTYPE int
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif /* !YYTOKENTYPE */
|
||||||
m4_map([b4_token_define], [$@])])
|
m4_map([b4_token_define], [$@])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
m4_divert(0)dnl
|
m4_divert(0)dnl
|
||||||
@@ -310,7 +314,6 @@ union yyalloc
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tokens. */
|
|
||||||
b4_token_defines(b4_tokens)
|
b4_token_defines(b4_tokens)
|
||||||
|
|
||||||
/* YYFINAL -- State number of the termination state. */
|
/* YYFINAL -- State number of the termination state. */
|
||||||
|
|||||||
Reference in New Issue
Block a user