70 |
[[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]], [_])]) |
[[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]], [_])]) |
71 |
|
|
72 |
|
|
73 |
# b4_token_defines(TOKEN-NAME, TOKEN-NUMBER) |
# b4_token_define(TOKEN-NAME, TOKEN-NUMBER) |
74 |
# ------------------------------------------ |
# ----------------------------------------- |
75 |
# Output the definition of this token as #define. |
# Output the definition of this token as #define. |
76 |
m4_define([b4_token_define], |
m4_define([b4_token_define], |
77 |
[#define $1 $2 |
[#define $1 $2 |
78 |
]) |
]) |
79 |
|
|
80 |
|
|
81 |
|
# b4_token_enum(TOKEN-NAME, TOKEN-NUMBER) |
82 |
|
# --------------------------------------- |
83 |
|
# Output the definition of this token as an enum. |
84 |
|
m4_define([b4_token_enum], |
85 |
|
[enum $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 as #define. |
91 |
m4_define([b4_token_defines], |
m4_define([b4_token_defines], |
92 |
[m4_map([b4_token_define], [$@])]) |
[#ifndef YYTOKENTYPE |
93 |
|
# if defined (__STDC__) || defined (__cplusplus) |
94 |
|
/* Put the tokens into the symbol table, so that GDB and other debuggers |
95 |
|
know about them. */ |
96 |
|
enum yytokentype { |
97 |
|
m4_map_sep([ b4_token_enum], [, |
98 |
|
], |
99 |
|
[$@]) |
100 |
|
}; |
101 |
|
/* POSIX requires `int' for tokens in interfaces. */ |
102 |
|
# define YYTOKENTYPE int |
103 |
|
# endif |
104 |
|
#endif |
105 |
|
m4_map([b4_token_define], [$@])]) |
106 |
|
|
107 |
|
|
108 |
m4_divert(0)dnl |
m4_divert(0)dnl |