diff options
author | Tom Tromey <tromey@cygnus.com> | 2000-11-03 20:27:07 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2000-11-03 20:27:07 +0000 |
commit | 747800ee8a9782cea34d002fe6a53439da75b25c (patch) | |
tree | 3ec9a05402bdb242bd150aacc46596d394cd2d1d /gcc/java/lex.h | |
parent | 35e9340fc9994dbd2025f8770593fa0136e33740 (diff) | |
download | gcc-747800ee8a9782cea34d002fe6a53439da75b25c.tar.gz |
lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
* lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
(JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
* lex.c (java_read_unicode): Removed `term_context' argument.
Recognize any number of `u' in `\u'.
(java_read_unicode_collapsing_terminators): New function.
(java_get_unicode): Use it.
(java_lineterminator): Removed.
(yylex): Produce error if character literal is newline or single
quote. Return if eof found in middle of `//' comment. EOF in
`//' comment is only an error if pedantic.
(java_ignorable_control_p): New function.
(java_parse_end_comment): Return if eof found in middle of
comment.
Include flags.h.
* jv-scan.c (pedantic): New global.
From-SVN: r37232
Diffstat (limited to 'gcc/java/lex.h')
-rw-r--r-- | gcc/java/lex.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/java/lex.h b/gcc/java/lex.h index ae9eebb68e5..b43061e45ee 100644 --- a/gcc/java/lex.h +++ b/gcc/java/lex.h @@ -256,6 +256,7 @@ extern void set_float_handler PARAMS ((jmp_buf)); RANGE (c, '0', '9') || \ c == '_' || \ c == '$')) || \ + java_ignorable_control_p (c) || \ (c > 127 && java_letter_or_digit_p (c))) #define JAVA_ASCII_DIGIT(c) RANGE(c,'0', '9') #define JAVA_ASCII_OCTDIGIT(c) RANGE(c,'0', '7') @@ -552,6 +553,20 @@ extern void set_float_handler PARAMS ((jmp_buf)); RANGE (c, 0xFFD2, 0xFFD7) || \ RANGE (c, 0xFFDA, 0xFFDC)) +/* Identifier-ignorable characters. This should not be used + standalone. Note that the JCL says 200a->200e. That is a typo. + The correct values are 202a->202e. Note also that we test against + 0x0000 separately to avoid a warning. */ +#define _JAVA_IDENTIFIER_IGNORABLE(c) \ + (c == 0x0000 \ + || RANGE (c, 0x0001, 0x0008) \ + || RANGE (c, 0x000e, 0x001b) \ + || RANGE (c, 0x007f, 0x009f) \ + || RANGE (c, 0x200c, 0x200f) \ + || RANGE (c, 0x202a, 0x202e) \ + || RANGE (c, 0x206a, 0x206f) \ + || c == 0xfeff) + /* Constants */ #define JAVA_CHAR_ERROR 0xFFC1 /* This is an illegal unicode!?! FIXME */ #define JAVA_READ_BUFFER 256 |