Class new title: Stream subclassof: Object fields: 'array position limit' declare: ''  t1 [array  t1]  t1 _ t2 [array  t1 _ t2]  t1 | t2 [t2 _ self next. t2  [t1 = t2  [t2] position _ position - 1. false] false] append: t1 | t2 [for t2 from: t1 do [self next_ t2]. t1] asArray [array] asStream asVector [(Reader new of: self) read] close [limit _ position. position _ 0] contents [array copy: 1 to: position] cr [self next_ 13] crtab: t1 | t2 [self next_ 13. for t2 to: t1 do [self next_ 9]] default [self of: (String new: 16)] dequeue [self dequeue: 1] dequeue: t1 | t2 [position < t1  [false] t2 _ (array  (1 to: t1)) copy. array  1 to: position - t1 _ array  (t1 + 1 to: position). position _ position - t1. t2] emitLong: t1 by: t2 [[t2 < 0  [t2 _ t2 + 1024] t2 > 1023  [t2 _ 1] t1 _ t1 + 4]. t2 < 0  [user notify: 'A block compiles more than 1K bytes of code'] self next_ t2 / 256 + t1. self next_ t2 \ 256] empty [position = 0] end [position  limit] first [position  0  [array  1] nil] insert: t1 | t2 [[position = limit  [array _ array grow. limit _ array length]]. for t2 to: position do [array  position - t2 + 2 _ array  (position - t2 + 1)]. array  1 _ t1. position _ position + 1] integerScan | t1 t2 t3 t4 t5 [t1 _ [self  21  [1] 1]. t2 _ [self  48  [8] 10]. t3 _ 48 + t2. t5 _ 0. while [t4 _ self next. t4 and (t4  48 and t4 < t3)] do [t5 _ t5 * t2 + (t4 - 48)]. [t4  [self skip: 1]]. t2 = 8 and (t5 > 32767 and (t1 = 1 and t5 < 65536))  [t5 asSmall] (t5 * t1) asInteger] into: t1 | t2 [for t2 to: t1 length do [t1  t2 _ self next]. t1] last [position  0  [array  position] nil] last: t1 [(array  (position - t1 + 1 to: position)) copy] limit [limit] loc [position] myend [position  limit] next [self myend  [self pastend] position _ position + 1. array  position] primitive: 18 next: t1 | t2 [t2 _ array species new: t1. for t1 to: t1 do [t2  t1 _ self next]. t2] next: t1 _ t2 | [for t1 to: t1 do [self next_ t2]] next: t1 from: t2 | [for t1 to: t1 do [self next_ t2 next]] nextNumber: t1 | t2 t3 t4 [t3 _ false. for t2 to: t1 do [t4 _ self next. t3  [t3  t1 + 1 - t2 _ t4] t2 = t1  [t4] t4 = 0  [] t2  (t1 - 2) or (t4 land: 128)  0  [t3 _ Natural new: t1 + 1 - t2. t3 last_ t4] (t4 lshift: 8) + self next]. LargeInteger new bytes: t3 neg: false] nextNumber: t1 _ t2 [t2 is: Integer  [self next: t1 - 2 _ 0. self nextword_ t2] t2 _ t2 bytes. t2 length > t1  [user notify: 'number too big'] self next: t1 - t2 length _ 0. self append: t2 reverse] nextPoint | t1 [t1 _ self nextword. Point new x: t1 y: self nextword] nextPoint_ t1 [self nextword_ t1 x. self nextword_ t1 y] nextString | t1 [t1 _ self next. self into: (String new: [t1 < 192  [t1] t1 - 192 * 256 + self next])] nextString_ t1 | t2 [t2 _ t1 length. [t2 < 192  [self next_ t2] self next_ t2 / 256 + 192. self next_ t2 \ 256]. self append: t1. t1] next_ t1 [self myend  [self pastend_ t1] position _ position + 1. array  position _ t1] primitive: 19 nextword | t1 t2 [t1 _ self next. t1  [t2 _ self next. t2  [(t1 lshift: 8) + t2] false] false] nextword_ t1 [self next_ t1 lshift: 8. self next_ t1 land: 255. t1] of: t1 [array _ t1. position _ 0. limit _ array length] of: t1 from: t2 to: t3 | t4 [array _ t1. t4 _ array length. limit _ [t3 > t4  [t4] t3]. position _ [t2  1  [0] t2 - 1]] padNext [position even  [false] self next] padNext_ t1 [position even  [false] self next_ t1] pastend [false] pastend_ t1 [array _ array grow. limit _ array length. self next_ t1] peek | t1 [t1 _ self next. t1  [position _ position - 1. t1] false] pop [position < 1  [false] position _ position - 1. array  (position + 1)] pop: t1 | t2 [position < t1  [false] t2 _ self last: t1. position _ position - t1. t2] position [position] position_ t1 [position _ t1] print: t1 [t1 printon: self] release [array _ nil] reset [position _ 0] rest [array copy: position + 1 to: limit] semicrtab [self append: '; '] settoend [position _ limit] skip: t1 [position _ position + t1] skipTo: t1 | t2 [for t2 from: self do [t2 = t1  [true]]. false] skipwords: t1 [self skip: 2 * t1] space [self next_ 32] tab [self next_ 9] upto: t1 | t2 t3 [t3 _ (String new: 250) asStream. for t2 from: self do [t2 = t1  [t3 contents] t3 next_ t2]. t3 contents] viewer [SetReader new of: array from: 1 to: position] wordposition [self position / 2] wordposition_ t1 [self position_ t1 * 2]