Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

main-con.cc

Go to the documentation of this file.
00001 /*
00002   Copyright (C) 1997-2001 Shigeru Chiba, Tokyo Institute of Technology.
00003 
00004   Permission to use, copy, distribute and modify this software and   
00005   its documentation for any purpose is hereby granted without fee,        
00006   provided that the above copyright notice appear in all copies and that 
00007   both that copyright notice and this permission notice appear in 
00008   supporting documentation.
00009 
00010   Shigeru Chiba makes no representations about the suitability of this 
00011   software for any purpose.  It is provided "as is" without express or
00012   implied warranty.
00013 */
00014 
00015 /*
00016   Copyright (c) 1995, 1996 Xerox Corporation.
00017   All Rights Reserved.
00018 
00019   Use and copying of this software and preparation of derivative works
00020   based upon this software are permitted. Any copy of this software or
00021   of any derivative work must include the above copyright notice of
00022   Xerox Corporation, this paragraph and the one after it.  Any
00023   distribution of this software or derivative works must comply with all
00024   applicable United States export control laws.
00025 
00026   This software is made available AS IS, and XEROX CORPORATION DISCLAIMS
00027   ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE
00028   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00029   PURPOSE, AND NOTWITHSTANDING ANY OTHER PROVISION CONTAINED HEREIN, ANY
00030   LIABILITY FOR DAMAGES RESULTING FROM THE SOFTWARE OR ITS USE IS
00031   EXPRESSLY DISCLAIMED, WHETHER ARISING IN CONTRACT, TORT (INCLUDING
00032   NEGLIGENCE) OR STRICT LIABILITY, EVEN IF XEROX CORPORATION IS ADVISED
00033   OF THE POSSIBILITY OF SUCH DAMAGES.
00034 */
00035 
00036 #include <iostream.h>
00037 
00038 #if !defined(_MSC_VER)
00039 
00040 #include "types.h"
00041 
00042 #else
00043 
00044 /*
00045   JLF: The GC_gc_no *MUST* be declared as below to be able to link...
00046   Unfortunately, this declaration collides with the one found in gc.h
00047   This is due to the fact that the _DLL macro is not defined when
00048   compiling occ.exe, thus driving to the extern declaration instead of
00049   __declspec(dllimport).  To bypass this problem, the Gc_gc_no is
00050   temporarily renamed before including gc.h (through types.h).
00051 */
00052 
00053 #define GC_gc_no my_GC_gc_no
00054 #include "types.h"
00055 #undef GC_gc_no
00056 
00057 #ifndef DONT_GC
00058 extern "C" __declspec(dllimport) GC_word GC_gc_no;
00059 #endif
00060 
00061 #endif /* !defined(_MSC_VER) */
00062 
00063 // these are defined in driver.cc
00064 extern bool verboseMode;
00065 extern void Compile(int, char**);
00066 
00067 int main(int argc, char** argv)
00068 {
00069     Compile(argc, argv);
00070     if(verboseMode) {
00071         cerr << "[done.]\n";
00072 #ifndef DONT_GC
00073         cerr << "[GC happened " << GC_gc_no << " times.]\n";
00074 #endif
00075     }
00076 
00077     return 0;
00078 }
00079 

Generated on Mon Feb 10 17:32:50 2003 for VFiasco Semantics Compiler by doxygen1.2.15