Example #1
0
        static void Main(string[] args)
        {
            using (FileStream stream = new FileStream("../../Test/tree.txt", FileMode.Open, FileAccess.Read))
            {
                using (TreeReader reader = new TreeReader(stream))
                {
                    using (TreeParser parser = new TreeParser(reader))
                    {
                        parser.Parse();

                        AssemblyDefinition assembly   = parser.GenerateAssembly();
                        string             exportPath = "Export";
                        if (!Directory.Exists(exportPath))
                        {
                            Directory.CreateDirectory(exportPath);
                        }

                        assembly.Export(exportPath);
                    }
                }
            }

            Console.WriteLine("Finished");
            Console.ReadKey();
        }
 public BaseParser(TreeReader reader)
 {
     if (reader == null)
     {
         throw new ArgumentNullException(nameof(reader));
     }
     m_reader = reader;
 }
Example #3
0
 public TreeParser(TreeReader reader) :
     base(reader)
 {
     m_header = new TreeHeaderParser(reader);
     m_type   = new TypeParser(reader, 0);
 }
 public VarParser(TreeReader reader, bool isHex) :
     base(reader)
 {
     m_isHex = isHex;
 }
Example #5
0
 public TypeParser(TreeReader reader, int indent) :
     base(reader)
 {
     m_indent = indent;
 }
Example #6
0
 public TreeHeaderParser(TreeReader reader) :
     base(reader)
 {
 }