home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / samples1.exe / MyC / Src / MyC.cs < prev    next >
Encoding:
Text File  |  2000-06-23  |  566 b   |  36 lines

  1. namespace MyC
  2. {
  3.  
  4. /*
  5.  * My simple C compiler
  6.  *
  7.  * Brad Merrill
  8.  * 17-Apr-1999
  9.  */
  10. using System;
  11.  
  12. public class MyC
  13. {
  14. public const int MAXBUF = 512;
  15. public const int MAXSTR = 128;
  16.  
  17. /* main program */
  18. public static void Main()
  19.   {
  20.   try
  21.     {
  22.     String[] args = Environment.GetCommandLineArgs();
  23.     Io prog = new Io(args);
  24.     Tok tok = new Tok(prog);
  25.     Parse p = new Parse(prog, tok);
  26.     p.program();
  27.     prog.Finish();
  28.     }
  29.   catch (Exception e)
  30.     {
  31.     Console.WriteLine("Compiler aborting: "+e.ToString());
  32.     }
  33.   }
  34. }
  35. }
  36.