// ============================================================== // ===== Initialization of string-based input buffers ==== // ============================================================== public void SetSource(string source, int offset) { this.buffer = new StringBuff(source); this.buffer.Pos = offset; this.cNum = offset - 1; this.chr = '\n'; // to initialize yyline, yycol and lineStart this.eofseen = false; GetChr(); }
// ================ LineBuffer Initialization =================== public void SetSource(IList<string> source) { this.buffer = new LineBuff(source); this.chr = '\n'; // to initialize yyline, yycol and lineStart this.cNum = -1; this.eofseen = false; GetChr(); }
// =================== End Nested classes ======================= public Scanner(Stream file) { buffer = TextBuff.NewTextBuff(file); // selected by /unicode option this.cNum = -1; this.chr = '\n'; // to initialize yyline, yycol and lineStart GetChr(); }