Example #1
0
        // =================== 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();
        }
Example #2
0
        // ================ StringBuffer Initialization ===================

        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
            GetChr();
        }
Example #3
0
        // ================ StringBuffer Initialization ===================

        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
            GetChr();
        }
Example #4
0
        // =================== 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();
        }