This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: FYI: fixlet for gcj lexer
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: 22 Jul 2002 21:24:46 -0600
- Subject: Patch: FYI: fixlet for gcj lexer
- Reply-to: tromey at redhat dot com
I'm checking this in on the trunk.
This patch fixes a small bug in the gcj lexer. We previously rejected
literals such as "0e+5".
I successfully rebuilt libgcj with this patch. I've also added a new
test case for this.
Incidentally, while running the test suite I noticed that all the exec
tests fail on a timeout. This makes things very slow. Does anybody
else see this? Does anybody know when this started happening? I was
out of town for a week, so I haven't been paying too close attention.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* lex.c (java_lex): Check for `e' or `E' after 0.
Index: lex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/lex.c,v
retrieving revision 1.88
diff -u -r1.88 lex.c
--- lex.c 27 Jun 2002 01:03:24 -0000 1.88
+++ lex.c 23 Jul 2002 03:16:33 -0000
@@ -1023,9 +1023,10 @@
}
else if (JAVA_ASCII_DIGIT (c))
radix = 8;
- else if (c == '.')
+ else if (c == '.' || c == 'e' || c =='E')
{
- /* Push the '.' back and prepare for a FP parsing... */
+ /* Push the '.', 'e', or 'E' back and prepare for a FP
+ parsing... */
java_unget_unicode ();
c = '0';
}