82 |
# --------------------------------------- |
# --------------------------------------- |
83 |
# Output the definition of this token as an enum. |
# Output the definition of this token as an enum. |
84 |
m4_define([b4_token_enum], |
m4_define([b4_token_enum], |
85 |
[enum $1 = $2]) |
[$1 = $2]) |
86 |
|
|
87 |
|
|
88 |
# b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER) |
# b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER) |
89 |
# ------------------------------------------------------- |
# ------------------------------------------------------- |
90 |
# Output the definition of the tokens as #define. |
# Output the definition of the tokens (if there are) as enums and #define. |
91 |
m4_define([b4_token_defines], |
m4_define([b4_token_defines], |
92 |
[#ifndef YYTOKENTYPE |
[m4_if([$@], [[]], [], |
93 |
|
[/* Tokens. */ |
94 |
|
#ifndef YYTOKENTYPE |
95 |
# if defined (__STDC__) || defined (__cplusplus) |
# if defined (__STDC__) || defined (__cplusplus) |
96 |
/* 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 |
97 |
know about them. */ |
know about them. */ |
103 |
/* POSIX requires `int' for tokens in interfaces. */ |
/* POSIX requires `int' for tokens in interfaces. */ |
104 |
# define YYTOKENTYPE int |
# define YYTOKENTYPE int |
105 |
# endif |
# endif |
106 |
#endif |
#endif /* !YYTOKENTYPE */ |
107 |
m4_map([b4_token_define], [$@])]) |
m4_map([b4_token_define], [$@]) |
108 |
|
]) |
109 |
|
]) |
110 |
|
|
111 |
|
|
112 |
m4_divert(0)dnl |
m4_divert(0)dnl |
314 |
|
|
315 |
#endif |
#endif |
316 |
|
|
|
/* Tokens. */ |
|
317 |
b4_token_defines(b4_tokens) |
b4_token_defines(b4_tokens) |
318 |
|
|
319 |
/* YYFINAL -- State number of the termination state. */ |
/* YYFINAL -- State number of the termination state. */ |