Commit 2323b28b by Alexandre Petit-Bianco Committed by Alexandre Petit-Bianco

re GNATS gcj/147 (Problem parsing comments)

2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* lex.c (java_parse_doc_section): Alway unget the last unicode
	when returning 0.
	(java_lex): Call java_parse_end_comment with fetched unicode.

This is a fix to the Java PR #47
(http://sourceware.cygnus.com/ml/java-prs/2000-q1/msg00042.html)

From-SVN: r32097
parent 7d612b1e
...@@ -52,6 +52,12 @@ Thu Feb 17 13:20:58 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> ...@@ -52,6 +52,12 @@ Thu Feb 17 13:20:58 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
* Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h. * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
* lex.c (java_parse_doc_section): Alway unget the last unicode
when returning 0.
(java_lex): Call java_parse_end_comment with fetched unicode.
2000-02-15 Tom Tromey <tromey@cygnus.com> 2000-02-15 Tom Tromey <tromey@cygnus.com>
* gjavah.c (jni_print_char): New function. * gjavah.c (jni_print_char): New function.
......
...@@ -438,13 +438,12 @@ java_parse_doc_section (c) ...@@ -438,13 +438,12 @@ java_parse_doc_section (c)
if (c == UEOF) if (c == UEOF)
java_lex_error ("Comment not terminated at end of input", 0); java_lex_error ("Comment not terminated at end of input", 0);
java_unget_unicode ();
tag [tag_index] = '\0'; tag [tag_index] = '\0';
if (!strcmp (tag, "deprecated")) if (!strcmp (tag, "deprecated"))
ctxp->deprecated = 1; ctxp->deprecated = 1;
} }
java_unget_unicode ();
return 0; return 0;
} }
...@@ -619,7 +618,7 @@ java_lex (java_lval) ...@@ -619,7 +618,7 @@ java_lex (java_lval)
goto step1; goto step1;
} }
java_parse_end_comment (c); java_parse_end_comment ((c = java_get_unicode ()));
goto step1; goto step1;
break; break;
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment