aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2003-03-19 17:02:43 +0000
committerTom Tromey <tromey@gcc.gnu.org>2003-03-19 17:02:43 +0000
commitb25a23bd5a16e5e6d9f9fbcd0273ffe900b072e9 (patch)
treed525f8ee9b347c5b49819e3fc8cd25529523e7f0 /gcc/java
parent8b5642e02581a5bb68b0bcbc7e28ed8b695cf2bf (diff)
downloadgcc-b25a23bd5a16e5e6d9f9fbcd0273ffe900b072e9.zip
gcc-b25a23bd5a16e5e6d9f9fbcd0273ffe900b072e9.tar.gz
gcc-b25a23bd5a16e5e6d9f9fbcd0273ffe900b072e9.tar.bz2
lex.c (do_java_lex): Renamed from java_lex.
* lex.c (do_java_lex): Renamed from java_lex. (java_lex): New function. Include timevar.h. From-SVN: r64586
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/lex.c21
2 files changed, 26 insertions, 1 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 46f2950..8f0c3be 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-19 Tom Tromey <tromey@redhat.com>
+
+ * lex.c (do_java_lex): Renamed from java_lex.
+ (java_lex): New function.
+ Include timevar.h.
+
2003-03-13 Tom Tromey <tromey@redhat.com>
* parse.y (resolve_inner_class): Error if qualifier is a primitive
diff --git a/gcc/java/lex.c b/gcc/java/lex.c
index bf263ba..d18aa1b 100644
--- a/gcc/java/lex.c
+++ b/gcc/java/lex.c
@@ -38,12 +38,17 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "keyword.h"
#include "flags.h"
#include "chartables.h"
+#ifndef JC1_LITE
+#include "timevar.h"
+#endif
/* Function declarations. */
static char *java_sprint_unicode (struct java_line *, int);
static void java_unicode_2_utf8 (unicode_t);
static void java_lex_error (const char *, int);
#ifndef JC1_LITE
+static int do_java_lex (YYSTYPE *);
+static int java_lex (YYSTYPE *);
static int java_is_eol (FILE *, int);
static tree build_wfl_node (tree);
#endif
@@ -937,7 +942,7 @@ static int
#ifdef JC1_LITE
yylex (YYSTYPE *java_lval)
#else
-java_lex (YYSTYPE *java_lval)
+do_java_lex (YYSTYPE *java_lval)
#endif
{
int c;
@@ -1699,6 +1704,19 @@ java_lex (YYSTYPE *java_lval)
}
#ifndef JC1_LITE
+
+/* The exported interface to the lexer. */
+static int
+java_lex (YYSTYPE *java_lval)
+{
+ int r;
+
+ timevar_push (TV_LEX);
+ r = do_java_lex (java_lval);
+ timevar_pop (TV_LEX);
+ return r;
+}
+
/* This is called by the parser to see if an error should be generated
due to numeric overflow. This function only handles the particular
case of the largest negative value, and is only called in the case
@@ -1716,6 +1734,7 @@ error_if_numeric_overflow (tree value)
java_lex_error ("Numeric overflow for `int' literal", 0);
}
}
+
#endif /* JC1_LITE */
static void