SmallSense__TokenStream.st
changeset 268 7c469d0beca1
parent 252 feba6ee5c814
child 374 e65bd2bf892a
child 860 e1dbc2501f4a
--- a/SmallSense__TokenStream.st	Tue Aug 05 14:11:29 2014 +0100
+++ b/SmallSense__TokenStream.st	Thu Aug 07 12:02:10 2014 +0100
@@ -242,12 +242,12 @@
 
 position: anInteger
     (positionMax - anInteger) > (tokens size) ifTrue:[
-        Stream positionErrorSignal raiseErrorString:'Not that much tokens in backlog!! Icrease it and try again'.
+        Stream positionErrorSignal raiseErrorString:'Not that much tokens in backlog!! You may try to increase it.'.
         ^ self.
     ].
     position := anInteger.
 
-    "Modified: / 13-06-2014 / 16:54:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 07-08-2014 / 11:46:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 position: tokenPosition sourcePosition: sourcePosition
@@ -267,13 +267,18 @@
 !
 
 reset
-    (positionMax) > (tokens size) ifFalse:[
+    (positionMax) > (tokens size) ifTrue:[
         scanner sourceStream reset.    
+        tokens := Array new: BacklogSize.
+        last := 0.
+        full := false.
+        position := 0.
+        positionMax := 0.
     ].
     position := 0.
 
     "Created: / 14-05-2014 / 16:19:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 13-06-2014 / 16:47:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 07-08-2014 / 11:57:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 skipSeparators