Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/jay
diff options
context:
space:
mode:
authorJackson Harper <jackson@novell.com>2003-01-13 18:52:01 +0300
committerJackson Harper <jackson@novell.com>2003-01-13 18:52:01 +0300
commit51646007b404e5052567ee663bd6837ec5a9e253 (patch)
treef3d6cea110f3dc8d23d5e150982ccc8d70e0e8df /mcs/jay
parentcf7a3205de0ee36da77b28408a93c989a1f86c25 (diff)
Call lexer.Cleanup when the lexer reaches the EOF.
svn path=/trunk/mcs/; revision=10462
Diffstat (limited to 'mcs/jay')
-rwxr-xr-xmcs/jay/ChangeLog4
-rw-r--r--mcs/jay/skeleton.cs8
2 files changed, 12 insertions, 0 deletions
diff --git a/mcs/jay/ChangeLog b/mcs/jay/ChangeLog
index a32b32b76e6..d27100ac780 100755
--- a/mcs/jay/ChangeLog
+++ b/mcs/jay/ChangeLog
@@ -1,3 +1,7 @@
+2003-01-13 Jackson Harper <jackson@latitudegeo.com>
+
+ * skeleton.cs: Call lexer.Cleanup when the lexer reaches the EOF.
+
2002-08-20 Miguel de Icaza <miguel@ximian.com>
* skeleton.cs: Fix the code that expanded the arrays dynamically,
diff --git a/mcs/jay/skeleton.cs b/mcs/jay/skeleton.cs
index 82d8f63e3d6..2c8bc9d78e3 100644
--- a/mcs/jay/skeleton.cs
+++ b/mcs/jay/skeleton.cs
@@ -150,6 +150,8 @@ t if (debug != null) debug.push(yyState, yyVal);
. if ((yyN = yyDefRed[yyState]) == 0) { // else [default] reduce (yyN)
. if (yyToken < 0) {
. yyToken = yyLex.advance() ? yyLex.token() : 0;
+. if (yyToken == 0)
+. yyLex.Cleanup ();
t if (debug != null)
t debug.lex(yyState, yyToken, yyname(yyToken), yyLex.value());
. }
@@ -219,6 +221,9 @@ t if (debug != null) debug.shift(0, yyFinal);
. yyState = yyFinal;
. if (yyToken < 0) {
. yyToken = yyLex.advance() ? yyLex.token() : 0;
+. if (yyToken == 0)
+. yyLex.Cleanup ();
+
t if (debug != null)
t debug.lex(yyState, yyToken,yyname(yyToken), yyLex.value());
. }
@@ -347,6 +352,9 @@ t if (debug != null) debug.shift(yyStates[yyTop], yyState);
. @return value for token().
. */
. Object value ();
+. /** Cleanup, this is called when advance returns false.
+. */
+. void Cleanup ();
. }
. }
.} // close outermost namespace, that MUST HAVE BEEN opened in the prolog