using System; using System.Collections.Generic; using System.Text; using System.IO; namespace incparser { class Program { static void Main(string[] args) { Environment.Exit(SubMain(args)); } static int SubMain(string[] args) { string directory = "."; string template = "template.txt"; string outputfile = "output.txt"; string file = null; if (args.Length == 0 || (args.Length == 1 && args[0] == "-h")) { PrintHelp(); return 0; } for (int i=0; i - Specify an input file to be used"); Console.WriteLine("-d - Specify a directory to parse (only *.inc files are used)"); Console.WriteLine("-t - Specify a template file to be used"); Console.WriteLine("-o - Specify an output file to be used"); Console.WriteLine("-h - Display this help"); Console.WriteLine("-h template - Displays help about templates"); } static void PrintTemplateHelp() { Console.WriteLine("Template File Help:"); Console.WriteLine("The inc parser can read a template file and replace variables with the outputs of it's parse and write into the output file"); Console.Write("\n"); Console.WriteLine("Variables:"); Console.Write("\n"); Console.WriteLine("$defines $enums $enumtypes $forwards $natives $stocks $funcenums $functags $structs"); } } }