public void TestScanner(string dataFile, string canonFile) { var s = new Scanner(new Reader(new FileStream(dataFile, FileMode.Open))); var tokens1 = new List<Tokens.Base>(); while(s.CheckToken()) tokens1.Add(s.GetToken()); s = new Scanner(new Reader(new FileStream(canonFile, FileMode.Open))); var tokens2 = new List<Tokens.Base>(); while (s.CheckToken()) tokens2.Add(s.GetToken()); }
public void TestScanner(string dataFile, string canonFile) { var file = new FileStream(dataFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); var s = new Scanner(new Reader(file)); var tokens1 = new List<Tokens.Base>(); while(s.CheckToken()) tokens1.Add(s.GetToken()); file.Close(); file = new FileStream(canonFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); s = new Scanner(new Reader(file)); var tokens2 = new List<Tokens.Base>(); while (s.CheckToken()) tokens2.Add(s.GetToken()); file.Close(); }