dvander@824: using System; dvander@824: using System.Collections.Generic; dvander@824: using System.Text; pred@2019: using System.IO; dvander@824: dvander@824: namespace incparser dvander@824: { dvander@824: class Program dvander@824: { dvander@824: static void Main(string[] args) dvander@824: { dvander@824: Environment.Exit(SubMain(args)); dvander@824: } dvander@824: dvander@824: static int SubMain(string[] args) dvander@824: { pred@2019: string directory = "."; pred@2019: string template = "template.txt"; pred@2019: string outputfile = "output.txt"; pred@2019: string file = null; pred@2019: pred@2019: if (args.Length == 0 || (args.Length == 1 && args[0] == "-h")) pred@2019: { pred@2019: PrintHelp(); pred@2019: return 0; pred@2019: } pred@2019: pred@2019: for (int i=0; i - Specify an input file to be used"); pred@2019: Console.WriteLine("-d - Specify a directory to parse (only *.inc files are used)"); pred@2019: Console.WriteLine("-t - Specify a template file to be used"); pred@2019: Console.WriteLine("-o - Specify an output file to be used"); pred@2019: Console.WriteLine("-h - Display this help"); pred@2019: Console.WriteLine("-h template - Displays help about templates"); pred@2019: } pred@2019: pred@2019: static void PrintTemplateHelp() pred@2019: { pred@2019: Console.WriteLine("Template File Help:"); pred@2019: 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"); pred@2019: Console.Write("\n"); pred@2019: Console.WriteLine("Variables:"); pred@2019: Console.Write("\n"); pred@2019: Console.WriteLine("$defines $enums $enumtypes $forwards $natives $stocks $funcenums $functags $structs"); pred@2019: } dvander@824: } dvander@824: }