Infinite loop with the SqueakFile parser

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Infinite loop with the SqueakFile parser

Holger Freyther
Hi,

using this diff I am able to send the FileIn parser into an infinite loop. The
issue appears to be due the '-' which is interpreted as a binary operator or
similar. I intend to look into fixing this.

diff --git a/tests/stcompiler.st b/tests/stcompiler.st
index 7144867..d72340b 100644
--- a/tests/stcompiler.st
+++ b/tests/stcompiler.st
@@ -90,3 +90,15 @@ asParser
                    with: STInST.SqueakFileInParser.
 ]

+Eval [
+    | squeak |
+    "Test the import of squeak code"
+
+    squeak := '!String methodsFor: ''*a'' stamp: ''lr 11/7/2009 13:32''!
+asParser
+    ^ #(1 -1)! !'.
+
+    STInST.STClassLoader new parseSmalltalkStream: squeak readStream
+                   with: STInST.SqueakFileInParser.
+]
+

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk