Пример #1
0
        /***************************************************************
          Function: main
          **************************************************************/
        public static void main(
            string[] arg
            )
        {
            CLexGen lg;

            if (arg.Length < 1)
            {
                System.Console.WriteLine("Usage: JLex.Main <filename>");
                return;
            }

            /* Note: For debuging, it may be helpful to remove the try/catch
               block and permit the Exception to propagate to the top level.
               This gives more information. */
            try
            {
                lg = new CLexGen(arg[0]);
                lg.generate();
            }
            catch (System.Exception e)
            {
                System.Console.WriteLine(e.Message);
            }
        }