Exemplo n.º 1
0
        /// <summary>
        /// <para>This is the main entry point of the command-line runner for the Micro Parser. It creates a ParserContext
        /// object by passing in the input file path and the desired output file path. The context is then told to execute 
        /// the algorithms.
        /// </para>
        /// <para>
        /// The entry point also checks to make sure paths are supplied, though for this version we don't do any validation 
        /// on the paths.
        /// </para>
        /// </summary>
        static void Main(string[] args)
        {
            bool canContinue = GuardUsage(args);

            if (canContinue)
            {
                var parserContext = new ParserContext(args[0], args[1]);
                ExecuteParser(parserContext);
            }
        }
Exemplo n.º 2
0
 private static void ExecuteParser(ParserContext parserContext)
 {
     parserContext.LoadInput();
     parserContext.ParseProgram();
     parserContext.FlushOutput();
 }
Exemplo n.º 3
0
 private static void ExecuteParser(ParserContext parserContext)
 {
     parserContext.LoadInput();
     parserContext.ParseProgram();
     parserContext.FlushOutput();
 }