예제 #1
0
        static void Main(string[] args)
        {
            var    output    = Processor.WordAnalyse(FileManager.ReadFile("test.txt"));
            string midString = string.Empty;
            int    index     = 0;

            foreach (var v in output)
            {
                midString += v.ToString() + '\n';
                Console.WriteLine($"{index++} : {v.ToString()}");
            }
            FileManager.WriteFile("midString.txt", midString);

            WordContainer.InjectData(output);

            //Console.WriteLine();
            //Console.Write(WordContainer.GetString());

            var ll1 = new LL1Processor();

            ll1.StartProcess();
            ll1.StartGenerate();

            Console.Write(CodeGenerator.CodeToString());
            Console.Write(CodeGenerator.SymbolToString());
            Console.Write(CodeGenerator.LabelToString());

            /*
             * FileManager.WriteFile("ttttttt.json", JsonConvert.SerializeObject(new Anony{
             * data = "aaaa\\\"aaaa"
             * }));
             * Anony obj = JsonConvert.DeserializeObject<Anony>(FileManager.ReadFile("ttttttt.json"));
             *
             * Console.WriteLine(obj.data);
             */
        }