home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Programming / jikes-1.02 / src / jikes.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-09-05  |  3.8 KB  |  101 lines

  1. // $Id: jikes.cpp,v 1.37 1999/09/01 14:58:25 shields Exp $
  2. //
  3. // This software is subject to the terms of the IBM Jikes Compiler
  4. // License Agreement available at the following URL:
  5. // http://www.ibm.com/research/jikes.
  6. // Copyright (C) 1996, 1999, International Business Machines Corporation
  7. // and others.  All Rights Reserved.
  8. // You must accept the terms of that agreement to use this software.
  9. //
  10.  
  11. #include "config.h"
  12. #include <iostream.h>
  13. #include <assert.h>
  14. #include "control.h"
  15. #include <stdio.h>
  16.  
  17. #ifdef __amigaos__
  18. // Jikes definitely needs more than the default 4K stack. I've had no problems
  19. // running it with a stack of 20000, so we'll use that value, to play it safe,
  20. // even though the actual stack used is probably a lot less.
  21. extern "C" {
  22.   unsigned long __stack = 20000;
  23. }
  24. #endif
  25.  
  26. int main(int argc, char *argv[])
  27. {
  28.     int return_code;
  29.  
  30. #ifdef EBCDIC
  31.     Code::Conversion();
  32. #endif
  33.  
  34.     SetNewHandler();
  35.  
  36.     FloatingPointCheck();
  37.  
  38.     ArgumentExpander *arguments = new ArgumentExpander(argc, argv);
  39.  
  40.     Option *option = new Option(*arguments);
  41.  
  42.     if (option -> first_file_index < arguments -> argc)
  43.     {
  44.         Control *control = new Control(*arguments, *option);
  45.         return_code = control -> return_code;
  46. #ifdef NO_LEAKS
  47.         delete control;
  48. #endif
  49.     }
  50.     else
  51.     {
  52.         //
  53.         // Be quiet about +A and +C. Those who know, know; those who don't, don't.
  54.         //
  55.         fprintf(stderr,
  56.                 "\nIBM Research Jikes Compiler"
  57.                 "\n(C) Copyright IBM Corp. 1997, 1999.\n"
  58.                 "- Licensed Materials - Program Property of IBM - All Rights Reserved.\n\n");
  59.         fprintf(stderr, "%s", StringConstant::U8S_command_format);
  60.         fprintf(stderr,
  61.                 "\n\n"
  62.                 "-classpath path    use path for CLASSPATH\n"
  63.                 "-d dir             write class files in directory dir\n"
  64.                 "-debug             no effect (recognized for compatibility)\n"
  65.                 "-depend            recompile all used classes\n"
  66.                 "-deprecation       report uses of deprecated features\n"
  67.                 "-g                 debug (generate LocalVariableTable)\n"
  68.                 "-nowarn            do not issue warning messages\n"
  69.                 "-nowrite           do not write any class files\n"
  70.                 "-O                 do not write LineNumberTable\n"
  71.                 "-verbose           list files read and written\n"
  72.                 "-Xstdout           redirect output listings to stdout\n"
  73.                 "+1.0               recognize only 1.0.2 language\n"
  74.                 "++                 compile in incremental mode\n"
  75.                 "+B                 do not invoke bytecode generator\n"
  76.                 "+D                 report errors immediately in emacs-form without buffering\n"
  77.                 "+E                 list errors in emacs-form\n"
  78.                 "+F                 do full dependence check except for Zip and Jar files\n"
  79.                 "+Kname=TypeKeyWord map name to type keyword\n"
  80.                 "+M                 generate makefile dependencies\n"
  81.                 "+M=filename        generate makefile dependencies information in filename\n"
  82.                 "+P                 Pedantic compilation - issues lots of warnings\n"
  83.                 "+Td...d            set value of tab d...d spaces; each d is a decimal digit\n"
  84.                 "+U                 do full dependence check including Zip and Jar files\n"
  85.                 "+Z                 treat cautions as errors\n"
  86.                 "\nVersion 1.02 (1 Sep 99)"
  87.                 " by Philippe Charles and David Shields, IBM Research.\n"
  88.                 "Please report problems to shields@watson.ibm.com.\n"
  89.                 "or via browser at http://www.ibm.com/research/jikes\n");
  90.  
  91.         return_code = 1;
  92.     }
  93.  
  94. #ifdef NO_LEAKS
  95.     delete arguments;
  96.     delete option;
  97. #endif
  98.  
  99.     return return_code;
  100. }
  101.