Esempio n. 1
0
        // ================ 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();
        }
Esempio n. 2
0
        // =================== End Nested classes =======================

        public Scanner(Stream file) {
            buffer = new StreamBuff(file);
            this.cPos = -1;
            this.chr = '\n'; // to initialize yyline, yycol and lineStart
            GetChr();
        }