Exemple #1
0
        public void LoadAllLinesAndExecute()
        {
            using (StreamReader sr = new StreamReader(fileName))
            {
                string temp = sr.ReadLine();
                LinePointer.SetFirstLine(beginFileTokenLineNumber);


                while (!FoundBeginFile(temp))
                {
                    fileLineTokens.Add(new TokenLine(temp.Trim()));
                    LinePointer.Increment();
                    temp = sr.ReadLine();
                    beginFileTokenLineNumber++;
                }


                while (temp != null)
                {
                    fileLineTokens.Add(new TokenLine(temp.Trim()));
                    LinePointer.Increment();
                    temp = sr.ReadLine();
                }

                LinePointer.SetFirstLine(beginFileTokenLineNumber);
            }

            LoadLineMarkers();
            ParseAndExecute();
        }
Exemple #2
0
 private void ParseAndExecute()
 {
     while (LinePointer.GetCurrentLine() < fileLineTokens.Count)
     {
         int line = LinePointer.GetCurrentLine();
         fileLineTokens[line - 1].ParseAndExecute();
         LinePointer.Increment();
     }
 }