// ================ StringBuffer Initialization =================== public override void SetSource(string source, int offset) { this.buffer = new StringBuff(source); this.buffer.Pos = offset; this.cPos = offset - 1; this.chr = '\n'; // to initialize yyline, yycol and lineStart GetChr(); }
// =================== End Nested classes ======================= public Scanner(Stream file) { buffer = new StreamBuff(file); this.cPos = -1; this.chr = '\n'; // to initialize yyline, yycol and lineStart GetChr(); }