Beispiel #1
0
 private void CheckError(bool is_read = false)
 {
     if (error != null)
     {
         Scaner.Exception res = error;
         error = null;
         throw res;
     }
 }
Beispiel #2
0
 public void Pass()
 {
     while (!IsWhite(buf.Peek()) && buf.Peek() != -1 && buf.Peek() != ';') { buf.Read(); };
     try
     {
         next_token = Next();
     }
     catch (Scaner.Exception e)
     {
         error = e;
     }
 }
Beispiel #3
0
 public Scaner(System.IO.StreamReader istream)
 {
     buf = new Buffer(istream.BaseStream);
     try
     {
         next_token = Next();
     }
     catch (Scaner.Exception e)
     {
         error = e;
     }
 }
Beispiel #4
0
 public Scaner(System.IO.StreamReader istream)
 {
     buf = new Buffer(istream.BaseStream);
     try
     {
         next_token = Next();
     }
     catch (Scaner.Exception e)
     {
         error = e;
     }
 }
Beispiel #5
0
        public Token Read()
        {
            CheckError();
            Token res = next_token;

            try
            {
                next_token = Next();
            }
            catch (Scaner.Exception e)
            {
                error = e;
            }

            return res;
        }
Beispiel #6
0
 public void Pass()
 {
     while (!IsWhite(buf.Peek()) && buf.Peek() != -1 && buf.Peek() != ';')
     {
         buf.Read();
     }
     ;
     try
     {
         next_token = Next();
     }
     catch (Scaner.Exception e)
     {
         error = e;
     }
 }
Beispiel #7
0
        public Token Read()
        {
            CheckError();
            Token res = next_token;

            try
            {
                next_token = Next();
            }
            catch (Scaner.Exception e)
            {
                error = e;
            }

            return(res);
        }
Beispiel #8
0
 private void CheckError(bool is_read = false)
 {
     if (error != null)
     {
         Scaner.Exception res = error;
         error = null;
         throw res;
     }
 }