Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            ArduinoSDK sdk;

            if (args == null || args.Length != 1)
            {
                Console.WriteLine("usage: ArduinoPreproc <ino-file>");
                Environment.Exit(-1);
            }

            sdk = new ArduinoSDK(@"D:\arduino-1.0.5");

            Regex importRegexp = new Regex(@"^\s*#include\s*[<""](\S+)["">]");

            Console.WriteLine(String.Format("Preprocessing {0}", args[0]));

            using (StreamReader r = new StreamReader(args[0]))
            {
                string line;
                while ((line = r.ReadLine()) != null)
                {
                    Match m = importRegexp.Match(line);
                    if (m.Success)
                    {
                        string include = m.Groups[1].Value;
                        Console.WriteLine(String.Format("\tuses: {0}", include));
                    }
                }
            }

        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            ArduinoSDK sdk;

            if (args == null || args.Length != 1)
            {
                Console.WriteLine("usage: ArduinoPreproc <ino-file>");
                Environment.Exit(-1);
            }

            sdk = new ArduinoSDK(@"D:\arduino-1.0.5");

            Regex importRegexp = new Regex(@"^\s*#include\s*[<""](\S+)["">]");

            Console.WriteLine(String.Format("Preprocessing {0}", args[0]));

            using (StreamReader r = new StreamReader(args[0]))
            {
                string line;
                while ((line = r.ReadLine()) != null)
                {
                    Match m = importRegexp.Match(line);
                    if (m.Success)
                    {
                        string include = m.Groups[1].Value;
                        Console.WriteLine(String.Format("\tuses: {0}", include));
                    }
                }
            }
        }