OSDN Git Service

Fix copyrights.
[pf3gnuchains/gcc-fork.git] / gcc / java / lex.h
1 /* Language lexer definitions for the GNU compiler for the Java(TM) language.
2    Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
3    Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.
21
22 Java and all Java-based marks are trademarks or registered trademarks
23 of Sun Microsystems, Inc. in the United States and other countries.
24 The Free Software Foundation is independent of Sun Microsystems, Inc.  */
25
26 #ifndef JV_LEX_H
27 #define JV_LEX_H
28
29 #include <setjmp.h>             /* set_float_handler argument uses it */
30
31 /* Extern global variables declarations  */
32 extern FILE *finput;
33 extern int   lineno;
34
35 /* A Unicode character, as read from the input file  */
36 typedef unsigned short unicode_t;
37
38 /* Debug macro to print-out what we match  */
39 #ifdef JAVA_LEX_DEBUG
40 #ifdef JAVA_LEX_DEBUG_CHAR
41 #define JAVA_LEX_CHAR(c)      printf ("java_lex:%d: char '%c'.%d\n",    \
42                                       lineno, (c < 128 ? c : '.'), c);
43 #else
44 #define JAVA_LEX_CHAR(c)
45 #endif
46 #define JAVA_LEX_KW(c)        printf ("java_lex:%d: keyword: '%s'\n", lineno,c)
47 #define JAVA_LEX_ID(s)        printf ("java_lex:%d: ID: '%s'\n",        \
48                                       lineno,                           \
49                                       (all_ascii ? s : "<U>"))
50 #define JAVA_LEX_LIT(s, r)    printf ("java_lex:%d: literal '%s'_%d\n", \
51                                       lineno, s, r)
52 #define JAVA_LEX_CHAR_LIT(s)  printf ("java_lex:%d: literal '%d'\n", lineno, s)
53 #define JAVA_LEX_STR_LIT(s)   {                                          \
54                                  int i;                                  \
55                                  printf ("java_lex:%d: literal '%s'\n",  \
56                                          lineno, s);                     \
57                                }
58 #define JAVA_LEX_SEP(c)       printf ("java_lex:%d: separator '%c'\n",lineno,c)
59 #define JAVA_LEX_OP(c)        printf ("java_lex:%d: operator '%s'\n", lineno,c)
60 #else
61 #define JAVA_LEX_CHAR(c)
62 #define JAVA_LEX_KW(c)
63 #define JAVA_LEX_ID(s)
64 #define JAVA_LEX_LIT(s,r)
65 #define JAVA_LEX_CHAR_LIT(s)
66 #define JAVA_LEX_STR_LIT(s)
67 #define JAVA_LEX_SEP(c)
68 #define JAVA_LEX_OP(s)
69 #endif
70
71 /* Line information containers  */
72 struct java_line {
73   unicode_t *line;              /* The line's unicode */
74   char      *unicode_escape_p;  /* The maching char was a unicode escape */
75   unicode_t ahead[1];           /* Character ahead */
76   char unicode_escape_ahead_p;  /* Character ahead is a unicode escape */
77   int max;                      /* buffer's max size */
78   int size;                     /* number of unicodes */
79   int current;                  /* Current position, unicode based */
80   int char_col;                 /* Current position, input char based */
81   int lineno;                   /* Its line number */
82   int white_space_only;         /* If it contains only white spaces */
83 };
84 #define JAVA_COLUMN_DELTA(p)                                            \
85   (ctxp->c_line->unicode_escape_p [ctxp->c_line->current+(p)] ? 6 :     \
86    (ctxp->c_line->line [ctxp->c_line->current+(p)] == '\t' ? 8 : 1))
87
88 struct java_error {
89   struct java_line *line;
90   int error;
91 };
92
93 typedef struct _java_lc {
94   int line;
95   int prev_col;
96   int col;
97 } java_lc;
98
99
100 #define JAVA_LINE_MAX 80
101
102 /* Macro to read and unread chars */
103 #define UNGETC(c) ctxp->unget_utf8_value = (c);
104 #define GETC()    getc(finput)
105
106 /* Build a location compound integer */
107 #define BUILD_LOCATION() ((ctxp->elc.line << 12) | (ctxp->elc.col & 0xfff))
108
109 /* Those macros are defined differently if we compile jc1-lite
110    (JC1_LITE defined) or jc1.  */
111 #ifdef JC1_LITE
112
113 #define DCONST0 0
114 #define HOST_WIDE_INT long
115 #define HOST_BITS_PER_WIDE_INT 64
116 #define HOST_BITS_PER_CHAR 8
117 #define REAL_VALUE_TYPE int
118 #define SET_FLOAT_HANDLER(H)
119 #define GET_IDENTIFIER(S) xstrdup ((S))
120 #define REAL_VALUE_ATOF(LIT,MODE) 0
121 #define REAL_VALUE_ISINF(VALUE)   0
122 #define REAL_VALUE_ISNAN(VALUE)   0
123 #define SET_REAL_VALUE_ATOF(TARGET,SOURCE)
124 #define FLOAT_TYPE_NODE 0
125 #define DOUBLE_TYPE_NODE 0
126 #define SET_MODIFIER_CTX(TOKEN) java_lval->value = (TOKEN)
127 #define GET_TYPE_PRECISION(NODE) 4
128 #define BUILD_OPERATOR(TOKEN)   return TOKEN
129 #define BUILD_OPERATOR2(TOKEN)  return TOKEN
130 #define SET_LVAL_NODE(NODE)
131 #define SET_LVAL_NODE_TYPE(NODE, TYPE)
132 #define BUILD_ID_WFL(EXP) (EXP)
133 #define JAVA_FLOAT_RANGE_ERROR(S) {}
134 #define JAVA_INTEGRAL_RANGE_ERROR(S) {}
135
136 #else
137
138 extern void set_float_handler PROTO((jmp_buf));
139 static tree build_wfl_node ();
140 #define SET_FLOAT_HANDLER(H) set_float_handler ((H))
141 #define DCONST0 dconst0
142 #define GET_IDENTIFIER(S) get_identifier ((S))
143 #define SET_REAL_VALUE_ATOF(TARGET,SOURCE) (TARGET) = (SOURCE)
144 #define FLOAT_TYPE_NODE float_type_node
145 #define DOUBLE_TYPE_NODE double_type_node
146 /* Set modifier_ctx according to TOKEN */
147 #define SET_MODIFIER_CTX(TOKEN)                                            \
148   {                                                                        \
149     ctxp->modifier_ctx [(TOKEN)-PUBLIC_TK] = build_wfl_node (NULL_TREE); \
150     java_lval->value = (TOKEN)-PUBLIC_TK;                                  \
151   }
152 /* Type precision for long */
153 #define GET_TYPE_PRECISION(NODE) TYPE_PRECISION (long_type_node) / 8;
154 /* Build an operator tree node and return TOKEN */
155 #define BUILD_OPERATOR(TOKEN)                           \
156   {                                                     \
157     java_lval->operator.token = (TOKEN);                \
158     java_lval->operator.location = BUILD_LOCATION();    \
159     return (TOKEN);                                     \
160   }
161
162 /* Build an operator tree node but return ASSIGN_ANY_TK */
163 #define BUILD_OPERATOR2(TOKEN)                          \
164   {                                                     \
165     java_lval->operator.token = (TOKEN);                \
166     java_lval->operator.location = BUILD_LOCATION();    \
167     return ASSIGN_ANY_TK;                               \
168   }
169 /* Set java_lval->node and TREE_TYPE(java_lval->node) in macros */
170 #define SET_LVAL_NODE(NODE) java_lval->node = (NODE)
171 #define SET_LVAL_NODE_TYPE(NODE,TYPE)           \
172   {                                             \
173     java_lval->node = (NODE);                   \
174     TREE_TYPE (java_lval->node) = (TYPE);       \
175   }
176 /* Wrap identifier around a wfl */
177 #define BUILD_ID_WFL(EXP) build_wfl_node ((EXP))
178 /* Special ways to report error on numeric literals  */
179 #define JAVA_FLOAT_RANGE_ERROR(m)                                         \
180   {                                                                       \
181     char msg [1024];                                                      \
182     int i = ctxp->c_line->current;                                        \
183     ctxp->c_line->current = number_beginning;                             \
184     sprintf (msg, "Floating pointer literal exceeds range of `%s'", (m)); \
185     java_lex_error (msg, 0);                                              \
186     ctxp->c_line->current = i;                                            \
187     value = dconst0;                                                      \
188   }
189 #define JAVA_INTEGRAL_RANGE_ERROR(m)            \
190   {                                             \
191     int i = ctxp->c_line->current;              \
192     ctxp->c_line->current = number_beginning;   \
193     java_lex_error (m, 0);                      \
194     ctxp->c_line->current = i;                  \
195   }
196
197 #endif /* Definitions for jc1 compilation only */
198
199 /* Macros to decode character ranges */
200 #define RANGE(c, l, h)           (((c) >= l && (c) <= h))
201 #define JAVA_WHITE_SPACE_P(c) (c == ' ' || c == '\t' || c == '\f')
202 #define JAVA_ID_CHAR_P(c)     ((c < 128 && (RANGE (c, 'A', 'Z') ||      \
203                                             RANGE (c, 'a', 'z') ||      \
204                                             RANGE (c, '0', '9') ||      \
205                                             c == '_'         ||         \
206                                             c == '$'))       ||         \
207                                (c > 127 && java_letter_or_digit_p (c)))
208 #define JAVA_ASCII_DIGIT(c)    RANGE(c,'0', '9')
209 #define JAVA_ASCII_OCTDIGIT(c) RANGE(c,'0', '7')
210 #define JAVA_ASCII_HEXDIGIT(c) (RANGE(c,'0', '9') ||    \
211                                 RANGE(c,'a', 'f') ||    \
212                                 RANGE(c,'A', 'F'))
213 #define JAVA_ASCII_FPCHAR(c)   (RANGE(c,'d', 'f') || RANGE(c,'D', 'F') || \
214                                 c == '.' || JAVA_ASCII_DIGIT (c))
215 #define JAVA_FP_SUFFIX(c)      (c == 'D' || c == 'd' || c == 'f' || c == 'F')
216 #define JAVA_FP_EXP(c)         (c == 'E' || c == 'F')
217 #define JAVA_FP_PM(c)          (c == '-' || c == '+')
218 #define JAVA_ASCII_LETTER(c)   (RANGE(c,'a', 'z') || RANGE(c,'A', 'Z'))
219 #define JAVA_DIGIT_P(c)                                                       \
220    (RANGE (c, 0x030, 0x039) || /* ISO-Latin-1 (and ASCII) digits ('0'-'9') */ \
221     RANGE (c, 0x660, 0x669) || /* Arabic-Indic digits */                      \
222     RANGE (c, 0x6F0, 0x6F9) || /* Eastern Arabic-Indic digits */              \
223     RANGE (c, 0x966, 0x96F) || /* Devanagari digits */                        \
224     RANGE (c, 0x9E6, 0x9EF) || /* Bengali digits */                           \
225     RANGE (c, 0xA66, 0xA6F) || /* Gurmukhi digits */                          \
226     RANGE (c, 0xAE6, 0xAEF) || /* Gujarati digits */                          \
227     RANGE (c, 0xB66, 0xB6F) || /* Oriya digits */                             \
228     RANGE (c, 0xBE7, 0xBEF) || /* Tamil digits */                             \
229     RANGE (c, 0xC66, 0xC6F) || /* Telugu digits */                            \
230     RANGE (c, 0xCE6, 0xCEF) || /* Kannada digits */                           \
231     RANGE (c, 0xD66, 0xD6F) || /* Malayalam digits */                         \
232     RANGE (c, 0xE50, 0xE59) || /* Thai digits */                              \
233     RANGE (c, 0xED0, 0xED9))   /* Lao digits */
234
235 /* This is not to be used as a stand alone macro. Use JAVA_ID_CHAR_P()
236    or the forcoming JAVA_LETTER_OR_DIGIT_P() instead.
237    It need to be split by region. FIXME.  */
238 #define _JAVA_LETTER_OR_DIGIT_P(c)              \
239    (RANGE (c, 0x00C0, 0x00D6) ||                \
240     RANGE (c, 0x00D8, 0x00F6) ||                \
241     RANGE (c, 0x00F8, 0x01F5) ||                \
242     RANGE (c, 0x01FA, 0x0217) ||                \
243     RANGE (c, 0x0250, 0x02A8) ||                \
244     RANGE (c, 0x02B0, 0x02DE) ||                \
245     RANGE (c, 0x02E0, 0x02E9) ||                \
246     RANGE (c, 0x0300, 0x0345) ||                \
247     RANGE (c, 0x0360, 0x0361) ||                \
248     RANGE (c, 0x0374, 0x0375) ||                \
249     c == 0x037A            ||                   \
250     c == 0x037E            ||                   \
251     RANGE (c, 0x0384, 0x038A) ||                \
252     c == 0x038C            ||                   \
253     c == 0x038E            ||                   \
254     RANGE (c, 0x038F, 0x03A1) ||                \
255     RANGE (c, 0x03A3, 0x03CE) ||                \
256     RANGE (c, 0x03D0, 0x03D6) ||                \
257     RANGE (c, 0x03DA, 0x03E2) ||                \
258     c == 0x03DA            ||                   \
259     c == 0x03DC            ||                   \
260     c == 0x03DE            ||                   \
261     c == 0x03E0            ||                   \
262     RANGE (c, 0x03E2, 0x03F3) ||                \
263     RANGE (c, 0x0401, 0x040C) ||                \
264     RANGE (c, 0x040E, 0x044F) ||                \
265     RANGE (c, 0x0451, 0x045C) ||                \
266     RANGE (c, 0x045E, 0x0486) ||                \
267     RANGE (c, 0x0490, 0x04C4) ||                \
268     RANGE (c, 0x04C7, 0x04C8) ||                \
269     RANGE (c, 0x04CB, 0x04CC) ||                \
270     RANGE (c, 0x04D0, 0x04EB) ||                \
271     RANGE (c, 0x04EE, 0x04F5) ||                \
272     RANGE (c, 0x04F8, 0x04F9) ||                \
273     RANGE (c, 0x0531, 0x0556) ||                \
274     RANGE (c, 0x0559, 0x055F) ||                \
275     RANGE (c, 0x0561, 0x0587) ||                \
276     c == 0x0589            ||                   \
277     RANGE (c, 0x05B0, 0x05B9) ||                \
278     RANGE (c, 0x05BB, 0x05C3) ||                \
279     RANGE (c, 0x05D0, 0x05EA) ||                \
280     RANGE (c, 0x05F0, 0x05F4) ||                \
281     c == 0x060C            ||                   \
282     c == 0x061B            ||                   \
283     c == 0x061F            ||                   \
284     c == 0x0621            ||                   \
285     RANGE (c, 0x0622, 0x063A) ||                \
286     RANGE (c, 0x0640, 0x0652) ||                \
287     RANGE (c, 0x0660, 0x066D) ||                \
288     RANGE (c, 0x0670, 0x06B7) ||                \
289     RANGE (c, 0x06BA, 0x06BE) ||                \
290     RANGE (c, 0x06C0, 0x06CE) ||                \
291     RANGE (c, 0x06D0, 0x06ED) ||                \
292     RANGE (c, 0x06F0, 0x06F9) ||                \
293     RANGE (c, 0x0901, 0x0903) ||                \
294     RANGE (c, 0x0905, 0x0939) ||                \
295     RANGE (c, 0x093C, 0x094D) ||                \
296     RANGE (c, 0x0950, 0x0954) ||                \
297     RANGE (c, 0x0958, 0x0970) ||                \
298     RANGE (c, 0x0981, 0x0983) ||                \
299     RANGE (c, 0x0985, 0x098C) ||                \
300     RANGE (c, 0x098F, 0x0990) ||                \
301     RANGE (c, 0x0993, 0x09A8) ||                \
302     RANGE (c, 0x09AA, 0x09B0) ||                \
303     c == 0x09B2            ||                   \
304     RANGE (c, 0x09B6, 0x09B9) ||                \
305     c == 0x09BC            ||                   \
306     c == 0x09BE            ||                   \
307     RANGE (c, 0x09BF, 0x09C4) ||                \
308     RANGE (c, 0x09C7, 0x09C8) ||                \
309     RANGE (c, 0x09CB, 0x09CD) ||                \
310     c == 0x09D7            ||                   \
311     RANGE (c, 0x09DC, 0x09DD) ||                \
312     RANGE (c, 0x09DF, 0x09E3) ||                \
313     RANGE (c, 0x09E6, 0x09FA) ||                \
314     c == 0x0A02            ||                   \
315     RANGE (c, 0x0A05, 0x0A0A) ||                \
316     RANGE (c, 0x0A0F, 0x0A10) ||                \
317     RANGE (c, 0x0A13, 0x0A28) ||                \
318     RANGE (c, 0x0A2A, 0x0A30) ||                \
319     RANGE (c, 0x0A32, 0x0A33) ||                \
320     RANGE (c, 0x0A35, 0x0A36) ||                \
321     RANGE (c, 0x0A38, 0x0A39) ||                \
322     c == 0x0A3C            ||                   \
323     c == 0x0A3E            ||                   \
324     RANGE (c, 0x0A3F, 0x0A42) ||                \
325     RANGE (c, 0x0A47, 0x0A48) ||                \
326     RANGE (c, 0x0A4B, 0x0A4D) ||                \
327     RANGE (c, 0x0A59, 0x0A5C) ||                \
328     c == 0x0A5E            ||                   \
329     RANGE (c, 0x0A66, 0x0A74) ||                \
330     RANGE (c, 0x0A81, 0x0A83) ||                \
331     RANGE (c, 0x0A85, 0x0A8B) ||                \
332     c == 0x0A8D            ||                   \
333     c == 0x0A8F            ||                   \
334     RANGE (c, 0x0A90, 0x0A91) ||                \
335     RANGE (c, 0x0A93, 0x0AA8) ||                \
336     RANGE (c, 0x0AAA, 0x0AB0) ||                \
337     RANGE (c, 0x0AB2, 0x0AB3) ||                \
338     RANGE (c, 0x0AB5, 0x0AB9) ||                \
339     RANGE (c, 0x0ABC, 0x0AC5) ||                \
340     RANGE (c, 0x0AC7, 0x0AC9) ||                \
341     RANGE (c, 0x0ACB, 0x0ACD) ||                \
342     c == 0x0AD0            ||                   \
343     c == 0x0AE0            ||                   \
344     RANGE (c, 0x0AE6, 0x0AEF) ||                \
345     RANGE (c, 0x0B01, 0x0B03) ||                \
346     RANGE (c, 0x0B05, 0x0B0C) ||                \
347     RANGE (c, 0x0B0F, 0x0B10) ||                \
348     RANGE (c, 0x0B13, 0x0B28) ||                \
349     RANGE (c, 0x0B2A, 0x0B30) ||                \
350     RANGE (c, 0x0B32, 0x0B33) ||                \
351     RANGE (c, 0x0B36, 0x0B39) ||                \
352     RANGE (c, 0x0B3C, 0x0B43) ||                \
353     RANGE (c, 0x0B47, 0x0B48) ||                \
354     RANGE (c, 0x0B4B, 0x0B4D) ||                \
355     RANGE (c, 0x0B56, 0x0B57) ||                \
356     RANGE (c, 0x0B5C, 0x0B5D) ||                \
357     RANGE (c, 0x0B5F, 0x0B61) ||                \
358     RANGE (c, 0x0B66, 0x0B70) ||                \
359     RANGE (c, 0x0B82, 0x0B83) ||                \
360     RANGE (c, 0x0B85, 0x0B8A) ||                \
361     RANGE (c, 0x0B8E, 0x0B90) ||                \
362     RANGE (c, 0x0B92, 0x0B95) ||                \
363     RANGE (c, 0x0B99, 0x0B9A) ||                \
364     c == 0x0B9C            ||                   \
365     c == 0x0B9E            ||                   \
366     c == 0x0B9F            ||                   \
367     RANGE (c, 0x0BA3, 0x0BA4) ||                \
368     RANGE (c, 0x0BA8, 0x0BAA) ||                \
369     RANGE (c, 0x0BAE, 0x0BB5) ||                \
370     RANGE (c, 0x0BB7, 0x0BB9) ||                \
371     RANGE (c, 0x0BBE, 0x0BC2) ||                \
372     RANGE (c, 0x0BC6, 0x0BC8) ||                \
373     RANGE (c, 0x0BCA, 0x0BCD) ||                \
374     c == 0x0BD7            ||                   \
375     RANGE (c, 0x0BE7, 0x0BF2) ||                \
376     RANGE (c, 0x0C01, 0x0C03) ||                \
377     RANGE (c, 0x0C05, 0x0C0C) ||                \
378     RANGE (c, 0x0C0E, 0x0C10) ||                \
379     RANGE (c, 0x0C12, 0x0C28) ||                \
380     RANGE (c, 0x0C2A, 0x0C33) ||                \
381     RANGE (c, 0x0C35, 0x0C39) ||                \
382     RANGE (c, 0x0C3E, 0x0C44) ||                \
383     RANGE (c, 0x0C46, 0x0C48) ||                \
384     RANGE (c, 0x0C4A, 0x0C4D) ||                \
385     RANGE (c, 0x0C55, 0x0C56) ||                \
386     RANGE (c, 0x0C60, 0x0C61) ||                \
387     RANGE (c, 0x0C66, 0x0C6F) ||                \
388     RANGE (c, 0x0C82, 0x0C83) ||                \
389     RANGE (c, 0x0C85, 0x0C8C) ||                \
390     RANGE (c, 0x0C8E, 0x0C90) ||                \
391     RANGE (c, 0x0C92, 0x0CA8) ||                \
392     RANGE (c, 0x0CAA, 0x0CB3) ||                \
393     RANGE (c, 0x0CB5, 0x0CB9) ||                \
394     RANGE (c, 0x0CBE, 0x0CC4) ||                \
395     RANGE (c, 0x0CC6, 0x0CC8) ||                \
396     RANGE (c, 0x0CCA, 0x0CCD) ||                \
397     RANGE (c, 0x0CD5, 0x0CD6) ||                \
398     c == 0x0CDE            ||                   \
399     c == 0x0CE0            ||                   \
400     c == 0x0CE1            ||                   \
401     RANGE (c, 0x0CE6, 0x0CEF) ||                \
402     RANGE (c, 0x0D02, 0x0D03) ||                \
403     RANGE (c, 0x0D05, 0x0D0C) ||                \
404     RANGE (c, 0x0D0E, 0x0D10) ||                \
405     RANGE (c, 0x0D12, 0x0D28) ||                \
406     RANGE (c, 0x0D2A, 0x0D39) ||                \
407     RANGE (c, 0x0D3E, 0x0D43) ||                \
408     RANGE (c, 0x0D46, 0x0D48) ||                \
409     RANGE (c, 0x0D4A, 0x0D4D) ||                \
410     c == 0x0D57            ||                   \
411     RANGE (c, 0x0D60, 0x0D61) ||                \
412     RANGE (c, 0x0D66, 0x0D6F) ||                \
413     RANGE (c, 0x0E01, 0x0E3A) ||                \
414     RANGE (c, 0x0E3F, 0x0E5B) ||                \
415     RANGE (c, 0x0E81, 0x0E82) ||                \
416     c == 0x0E84            ||                   \
417     RANGE (c, 0x0E87, 0x0E88) ||                \
418     c == 0x0E8A            ||                   \
419     c == 0x0E8D            ||                   \
420     RANGE (c, 0x0E94, 0x0E97) ||                \
421     RANGE (c, 0x0E99, 0x0E9F) ||                \
422     RANGE (c, 0x0EA1, 0x0EA3) ||                \
423     c == 0x0EA5            ||                   \
424     c == 0x0EA7            ||                   \
425     RANGE (c, 0x0EAA, 0x0EAB) ||                \
426     RANGE (c, 0x0EAD, 0x0EB9) ||                \
427     RANGE (c, 0x0EBB, 0x0EBD) ||                \
428     RANGE (c, 0x0EC0, 0x0EC4) ||                \
429     c == 0x0EC6            ||                   \
430     c == 0x0EC8            ||                   \
431     RANGE (c, 0x0EC9, 0x0ECD) ||                \
432     RANGE (c, 0x0ED0, 0x0ED9) ||                \
433     RANGE (c, 0x0EDC, 0x0EDD) ||                \
434     RANGE (c, 0x10A0, 0x10C5) ||                \
435     RANGE (c, 0x10D0, 0x10F6) ||                \
436     c == 0x10FB            ||                   \
437     RANGE (c, 0x1100, 0x1159) ||                \
438     RANGE (c, 0x115F, 0x11A2) ||                \
439     RANGE (c, 0x11A8, 0x11F9) ||                \
440     RANGE (c, 0x1E00, 0x1E9A) ||                \
441     RANGE (c, 0x1EA0, 0x1EF9) ||                \
442     RANGE (c, 0x1F00, 0x1F15) ||                \
443     RANGE (c, 0x1F18, 0x1F1D) ||                \
444     RANGE (c, 0x1F20, 0x1F45) ||                \
445     RANGE (c, 0x1F48, 0x1F4D) ||                \
446     RANGE (c, 0x1F50, 0x1F57) ||                \
447     c == 0x1F59            ||                   \
448     c == 0x1F5B            ||                   \
449     c == 0x1F5D            ||                   \
450     RANGE (c, 0x1F5F, 0x1F7D) ||                \
451     RANGE (c, 0x1F80, 0x1FB4) ||                \
452     RANGE (c, 0x1FB6, 0x1FC4) ||                \
453     RANGE (c, 0x1FC6, 0x1FD3) ||                \
454     RANGE (c, 0x1FD6, 0x1FDB) ||                \
455     RANGE (c, 0x1FDD, 0x1FEF) ||                \
456     RANGE (c, 0x1FF2, 0x1FF4) ||                \
457     RANGE (c, 0x1FF6, 0x1FFE) ||                \
458     RANGE (c, 0x3041, 0x3094) ||                \
459     RANGE (c, 0x3099, 0x309E) ||                \
460     RANGE (c, 0x30A1, 0x30FE) ||                \
461     RANGE (c, 0x3105, 0x312C) ||                \
462     RANGE (c, 0x3131, 0x318E) ||                \
463     RANGE (c, 0x3190, 0x319F) ||                \
464     RANGE (c, 0x3200, 0x321C) ||                \
465     RANGE (c, 0x3220, 0x3243) ||                \
466     RANGE (c, 0x3260, 0x327B) ||                \
467     RANGE (c, 0x327F, 0x32B0) ||                \
468     RANGE (c, 0x32C0, 0x32CB) ||                \
469     RANGE (c, 0x32D0, 0x32FE) ||                \
470     RANGE (c, 0x3300, 0x3376) ||                \
471     RANGE (c, 0x337B, 0x33DD) ||                \
472     RANGE (c, 0x33E0, 0x33FE) ||                \
473     RANGE (c, 0x3400, 0x9FA5) ||                \
474     RANGE (c, 0xF900, 0xFA2D) ||                \
475     RANGE (c, 0xFB00, 0xFB06) ||                \
476     RANGE (c, 0xFB13, 0xFB17) ||                \
477     RANGE (c, 0xFB1E, 0xFB36) ||                \
478     RANGE (c, 0xFB38, 0xFB3C) ||                \
479     c == 0xFB3E            ||                   \
480     c == 0xFB40            ||                   \
481     c == 0xFB41            ||                   \
482     c == 0xFB43            ||                   \
483     c == 0xFB44            ||                   \
484     c == 0xFB46            ||                   \
485     RANGE (c, 0xFB47, 0xFBB1) ||                \
486     RANGE (c, 0xFBD3, 0xFD3F) ||                \
487     RANGE (c, 0xFD50, 0xFD8F) ||                \
488     RANGE (c, 0xFD92, 0xFDC7) ||                \
489     RANGE (c, 0xFDF0, 0xFDFB) ||                \
490     RANGE (c, 0xFE70, 0xFE72) ||                \
491     c == 0xFE74            ||                   \
492     c == 0xFE76            ||                   \
493     RANGE (c, 0xFE77, 0xFEFC) ||                \
494     RANGE (c, 0xFF10, 0xFF19) ||                \
495     RANGE (c, 0xFF21, 0xFF3A) ||                \
496     RANGE (c, 0xFF41, 0xFF5A) ||                \
497     RANGE (c, 0xFF66, 0xFFBE) ||                \
498     RANGE (c, 0xFFC2, 0xFFC7) ||                \
499     RANGE (c, 0xFFCA, 0xFFCF) ||                \
500     RANGE (c, 0xFFD2, 0xFFD7) ||                \
501     RANGE (c, 0xFFDA, 0xFFDC))
502
503 /* Constants  */
504 #define JAVA_CHAR_ERROR 0xFFC1  /* This is an illegal unicode!?! FIXME */
505 #define JAVA_READ_BUFFER 256
506 #define UEOF (unicode_t)0xffff
507
508 #endif