public static void Main(string[] args) { string pathToResourceFile = "..\\..\\resources\\resource.db"; string pathToResultFile = "..\\..\\result.db"; Analizer analizer = new Analizer(pathToResourceFile); ResultsWriter writer = new ResultsWriter(pathToResultFile); writer.WriteResultToFile(analizer.GetIdentsFormattedString()); writer.WriteResultToFile(analizer.GetConstantsFormattedString()); writer.WriteResultToFile(analizer.GetOtherLexemsWordsFormattedString()); writer.Finish(); }
public static void Main(string[] args) { string pathToResourceFile = "..\\..\\resources\\resource.db"; string pathToResultFile = "..\\..\\result.db"; InstructionsTreatment treater = new InstructionsTreatment(pathToResourceFile); ResultsWriter writer = new ResultsWriter(pathToResultFile); while (true) { treater.SetNextLexemTypeToTreater(); LexemsType type = treater.CurrentLexem; string word = treater.CurrentWord; writer.WriteResultToFile(type, word); if (word.Trim() == "@") { break; } } treater.Finish(); writer.Finish(); }