diff -r c7b4237fff50 -r 03a67e41afbc tools/incparser/Program.cs --- a/tools/incparser/Program.cs Fri Mar 28 06:21:34 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace incparser -{ - class Program - { - static void Main(string[] args) - { - Environment.Exit(SubMain(args)); - } - - static int SubMain(string[] args) - { - if (args.Length < 1) - { - Console.WriteLine("Usage: incparser "); - return 1; - } - - IncParser inc = null; - try - { - inc = new IncParser(args[0]); - } - catch (ParseException e) - { - Console.WriteLine("Initial browsing failed: " + e.Message); - return 1; - } - catch (System.Exception e) - { - Console.WriteLine("Failed to read file: " + e.Message); - return 1; - } - - ParseWriter pw = new ParseWriter(); - - try - { - inc.Parse(pw); - } - catch (System.Exception e) - { - Console.WriteLine("Error parsing file (line " + inc.GetLineNumber() + "): " + e.Message); - return 1; - } - - if (pw.Level != 0) - { - Console.WriteLine("Fatal parse error detected; unable to complete output."); - return 1; - } - - Console.Write(pw.Contents); - Console.Write("\n"); - - return 0; - } - } -}