1 | /* Copyright (C) 1996-2023 Free Software Foundation, Inc. |
2 | This file is part of the GNU C Library. |
3 | |
4 | This program is free software; you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published |
6 | by the Free Software Foundation; version 2 of the License, or |
7 | (at your option) any later version. |
8 | |
9 | This program is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | GNU General Public License for more details. |
13 | |
14 | You should have received a copy of the GNU General Public License |
15 | along with this program; if not, see <https://www.gnu.org/licenses/>. */ |
16 | |
17 | #ifndef _TOKEN_H |
18 | #define _TOKEN_H |
19 | |
20 | enum token_t |
21 | { |
22 | tok_none = 0, |
23 | |
24 | tok_eof, |
25 | tok_eol, |
26 | tok_bsymbol, |
27 | tok_ident, |
28 | tok_ellipsis2, |
29 | tok_ellipsis3, |
30 | tok_ellipsis4, |
31 | tok_ellipsis2_2, |
32 | tok_ellipsis4_2, |
33 | tok_semicolon, |
34 | tok_comma, |
35 | tok_open_brace, |
36 | tok_close_brace, |
37 | tok_charcode, |
38 | tok_ucs4, |
39 | tok_number, |
40 | tok_minus1, |
41 | tok_string, |
42 | tok_include, |
43 | |
44 | tok_escape_char, |
45 | , |
46 | tok_charmap, |
47 | tok_end, |
48 | tok_g0esc, |
49 | tok_g1esc, |
50 | tok_g2esc, |
51 | tok_g3esc, |
52 | tok_escseq, |
53 | tok_addset, |
54 | |
55 | tok_charids, |
56 | |
57 | tok_code_set_name, |
58 | tok_mb_cur_max, |
59 | tok_mb_cur_min, |
60 | tok_charconv, |
61 | tok_width, |
62 | tok_width_variable, |
63 | tok_width_default, |
64 | tok_repertoiremap, |
65 | |
66 | tok_lc_ctype, |
67 | tok_copy, |
68 | /* Keep the following entries up to the next comment in this order! */ |
69 | tok_upper, |
70 | tok_lower, |
71 | tok_alpha, |
72 | tok_digit, |
73 | tok_xdigit, |
74 | tok_space, |
75 | tok_print, |
76 | tok_graph, |
77 | tok_blank, |
78 | tok_cntrl, |
79 | tok_punct, |
80 | tok_alnum, |
81 | /* OK, shuffling allowed again. */ |
82 | tok_outdigit, |
83 | tok_charclass, |
84 | tok_class, |
85 | tok_toupper, |
86 | tok_tolower, |
87 | tok_map, |
88 | tok_translit_start, |
89 | tok_translit_end, |
90 | tok_translit_ignore, |
91 | tok_default_missing, |
92 | tok_lc_collate, |
93 | tok_codepoint_collation, |
94 | tok_coll_weight_max, |
95 | tok_section_symbol, |
96 | tok_collating_element, |
97 | tok_collating_symbol, |
98 | tok_symbol_equivalence, |
99 | tok_script, |
100 | tok_order_start, |
101 | tok_order_end, |
102 | tok_from, |
103 | tok_forward, |
104 | tok_backward, |
105 | tok_position, |
106 | tok_undefined, |
107 | tok_ignore, |
108 | tok_reorder_after, |
109 | tok_reorder_end, |
110 | tok_reorder_sections_after, |
111 | tok_reorder_sections_end, |
112 | tok_define, |
113 | tok_undef, |
114 | tok_ifdef, |
115 | tok_ifndef, |
116 | tok_else, |
117 | tok_elifdef, |
118 | tok_elifndef, |
119 | tok_endif, |
120 | tok_lc_monetary, |
121 | tok_int_curr_symbol, |
122 | tok_currency_symbol, |
123 | tok_mon_decimal_point, |
124 | tok_mon_thousands_sep, |
125 | tok_mon_grouping, |
126 | tok_positive_sign, |
127 | tok_negative_sign, |
128 | tok_int_frac_digits, |
129 | tok_frac_digits, |
130 | tok_p_cs_precedes, |
131 | tok_p_sep_by_space, |
132 | tok_n_cs_precedes, |
133 | tok_n_sep_by_space, |
134 | tok_p_sign_posn, |
135 | tok_n_sign_posn, |
136 | tok_int_p_cs_precedes, |
137 | tok_int_p_sep_by_space, |
138 | tok_int_n_cs_precedes, |
139 | tok_int_n_sep_by_space, |
140 | tok_int_p_sign_posn, |
141 | tok_int_n_sign_posn, |
142 | tok_duo_int_curr_symbol, |
143 | tok_duo_currency_symbol, |
144 | tok_duo_int_frac_digits, |
145 | tok_duo_frac_digits, |
146 | tok_duo_p_cs_precedes, |
147 | tok_duo_p_sep_by_space, |
148 | tok_duo_n_cs_precedes, |
149 | tok_duo_n_sep_by_space, |
150 | tok_duo_int_p_cs_precedes, |
151 | tok_duo_int_p_sep_by_space, |
152 | tok_duo_int_n_cs_precedes, |
153 | tok_duo_int_n_sep_by_space, |
154 | tok_duo_p_sign_posn, |
155 | tok_duo_n_sign_posn, |
156 | tok_duo_int_p_sign_posn, |
157 | tok_duo_int_n_sign_posn, |
158 | tok_uno_valid_from, |
159 | tok_uno_valid_to, |
160 | tok_duo_valid_from, |
161 | tok_duo_valid_to, |
162 | tok_conversion_rate, |
163 | tok_lc_numeric, |
164 | tok_decimal_point, |
165 | tok_thousands_sep, |
166 | tok_grouping, |
167 | tok_lc_time, |
168 | tok_abday, |
169 | tok_day, |
170 | tok_abmon, |
171 | tok_mon, |
172 | tok_d_t_fmt, |
173 | tok_d_fmt, |
174 | tok_t_fmt, |
175 | tok_am_pm, |
176 | tok_t_fmt_ampm, |
177 | tok_era, |
178 | tok_era_year, |
179 | tok_era_d_fmt, |
180 | tok_era_d_t_fmt, |
181 | tok_era_t_fmt, |
182 | tok_alt_digits, |
183 | tok_week, |
184 | tok_first_weekday, |
185 | tok_first_workday, |
186 | tok_cal_direction, |
187 | tok_timezone, |
188 | tok_date_fmt, |
189 | tok_alt_mon, |
190 | tok_ab_alt_mon, |
191 | tok_lc_messages, |
192 | tok_yesexpr, |
193 | tok_noexpr, |
194 | tok_yesstr, |
195 | tok_nostr, |
196 | tok_lc_paper, |
197 | tok_height, |
198 | tok_lc_name, |
199 | tok_name_fmt, |
200 | tok_name_gen, |
201 | tok_name_mr, |
202 | tok_name_mrs, |
203 | tok_name_miss, |
204 | tok_name_ms, |
205 | tok_lc_address, |
206 | tok_postal_fmt, |
207 | tok_country_name, |
208 | tok_country_post, |
209 | tok_country_ab2, |
210 | tok_country_ab3, |
211 | tok_country_num, |
212 | tok_country_car, |
213 | tok_country_isbn, |
214 | tok_lang_name, |
215 | tok_lang_ab, |
216 | tok_lang_term, |
217 | tok_lang_lib, |
218 | tok_lc_telephone, |
219 | tok_tel_int_fmt, |
220 | tok_tel_dom_fmt, |
221 | tok_int_select, |
222 | tok_int_prefix, |
223 | tok_lc_measurement, |
224 | tok_measurement, |
225 | tok_lc_identification, |
226 | tok_title, |
227 | tok_source, |
228 | tok_address, |
229 | tok_contact, |
230 | tok_email, |
231 | tok_tel, |
232 | tok_fax, |
233 | tok_language, |
234 | tok_territory, |
235 | tok_audience, |
236 | tok_application, |
237 | tok_abbreviation, |
238 | tok_revision, |
239 | tok_date, |
240 | tok_category, |
241 | |
242 | tok_error |
243 | }; |
244 | |
245 | |
246 | struct keyword_t |
247 | { |
248 | const char *name; |
249 | enum token_t token; |
250 | int symname_or_ident; |
251 | |
252 | /* Only for locdef file. */ |
253 | int locale; |
254 | enum token_t base; |
255 | enum token_t group; |
256 | enum token_t list; |
257 | }; |
258 | |
259 | |
260 | #endif /* token.h */ |
261 | |