1 //<script type="text/javscript">
10 public class TextStreamChar : Object {
13 public TextStreamChar(char val, bool eof=false) {
19 public class TextStream : Object {
24 public TextStream (string text = "")
32 public char look(int n = 0, out bool eof)
36 if (this.cursor+n < 0 || this.cursor+n >= this.text.length) {
40 return this.text[this.cursor+n];
43 public bool lookEOF(int n = 0)
45 if (this.cursor+n < 0 || this.cursor+n >= this.text.length) {
52 public char next(int n = 1, out bool eof)
55 if (n < 1) { //?? eof???
60 for (var i = 0; i < n; i++) {
61 if (this.cursor+i < this.text.length) {
62 pulled += this.text.charAt(this.cursor+i);