aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/lex.c
diff options
context:
space:
mode:
authorPer Bothner <bothner@cygnus.com>1999-03-08 13:34:12 +0000
committerPer Bothner <bothner@gcc.gnu.org>1999-03-08 05:34:12 -0800
commit30ca27b4751fd68cb31758d01f309b13144b1cc2 (patch)
treed51147db527f31da8d998c1a963c2cbb9027228f /gcc/java/lex.c
parentc0d87ff6f9eaecba3c1e1936cd52074385131a96 (diff)
downloadgcc-30ca27b4751fd68cb31758d01f309b13144b1cc2.zip
gcc-30ca27b4751fd68cb31758d01f309b13144b1cc2.tar.gz
gcc-30ca27b4751fd68cb31758d01f309b13144b1cc2.tar.bz2
lex.c (java_parse_end_comment): Take extra parameter (next char).
� * lex.c (java_parse_end_comment): Take extra parameter (next char). * class.c (build_utf8_ref): Fix possible name class/ambiguity. * class.c (layout_class_method): A static method in a base class is never overridden, so treat it like it doesn't exist. However, do complain about private non-static method overriding public static method. * parse.y: Don't set unused INITIALIZED_P flag. * java-tree.h (INITIALIZED_P): Removed no-longer needed flag. * parse.y (find_expr_with_wfl): Optimize tail-calls. (build_array_from_name): Re-order &index[string] to &string[index]. * parse.y (java_complete_tree): Don't call patch_assignment if rhs is error_mark (it might catch more errors, but it is more likely to lose). From-SVN: r25641
Diffstat (limited to 'gcc/java/lex.c')
-rw-r--r--gcc/java/lex.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/java/lex.c b/gcc/java/lex.c
index be5c849..8c40d47 100644
--- a/gcc/java/lex.c
+++ b/gcc/java/lex.c
@@ -64,7 +64,7 @@ static void java_store_unicode PROTO ((struct java_line *, unicode_t, int));
static unicode_t java_parse_escape_sequence PROTO (());
static int java_letter_or_digit_p PROTO ((unicode_t));
static int java_parse_doc_section PROTO ((unicode_t));
-static void java_parse_end_comment PROTO (());
+static void java_parse_end_comment PROTO ((unicode_t));
static unicode_t java_get_unicode PROTO (());
static unicode_t java_read_unicode PROTO ((int, int *));
static void java_store_unicode PROTO ((struct java_line *, unicode_t, int));
@@ -366,13 +366,14 @@ java_lineterminator (c)
return 0;
}
-/* Parse the end of a C style comment */
+/* Parse the end of a C style comment.
+ * C is the first character after the '/*'. */
static void
-java_parse_end_comment ()
+java_parse_end_comment (c)
+ unicode_t c;
{
- unicode_t c;
- for (c = java_get_unicode ();; c = java_get_unicode ())
+ for ( ;; c = java_get_unicode ())
{
switch (c)
{
@@ -559,8 +560,9 @@ java_lex (java_lval)
switch (c = java_get_unicode ())
{
case '/':
- for (c = java_get_unicode ();;c = java_get_unicode ())
+ for (;;)
{
+ c = java_get_unicode ();
if (c == UEOF)
java_lex_error ("Comment not terminated at end of input", 0);
if (c == '\n') /* ULT */
@@ -576,10 +578,8 @@ java_lex (java_lval)
else if (java_parse_doc_section (c))
goto step1;
}
- else
- java_unget_unicode ();
- java_parse_end_comment ();
+ java_parse_end_comment (c);
goto step1;
break;
default: