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

driver2.cpp File Reference

#include <stdio.h>
#include <fstream.h>
#include <string.h>
#include <windows.h>
#include <stdlib.h>
#include <process.h>
#include <fcntl.h>
#include <io.h>

Include dependency graph for driver2.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define STRICT
#define WIN32_LEAN_AND_MEAN
#define NOSERVICE
#define PREPROCESSOR_EXT   ".i"
#define TRANSLATOR_EXT   ".occ"
#define is_blank(c)   ((c) == ' ' || (c) == '\t' || (c) == '\f' || (c) == '\r' || (c) == '\n')

Functions

void ParseCmdOptions (int from, int argc, char **argv, char *&source)
void AddCppOption (const char *arg)
void AddCcOption (const char *arg)
void CloseCcOptions ()
bool IsCxxSource (char *fname)
void ShowCommandLine (const char *cmd, const char **args)
void RunLinker ()
char * RunPreprocessor (const char *src)
char * OpenCxxOutputFileName (const char *src)
void RunCompiler (const char *src, const char *occsrc)
void RunSoCompiler (const char *src_file)
void BaseClassUsed (char *name, int len)
void * LoadSoLib (char *file_name)
void * LookupSymbol (void *handle, char *symbol)
bool ParseTargetSpecificOptions (char *arg, char *&source_file)
int Launch (const char *tool, const char *const *argv)
char * MakeTempFilename (const char *src, const char *suffix)
void ParseFileOptions (const char *filename, char *&source_file)
void File2Args (const char *fname, int max, int &argc, char *argv[])
void String2Args (const char *str, int max, int &argc, char *argv[])
char * NewArg (const char *from, size_t size, int argc, int max)
void ParseBackslash (char arg[], size_t &i, const char *&string)
void ParseDoubleQuote (char arg[], size_t &i, const char *&string)

Variables

const char * compilerName = "cl"
const char * opencxxErrorMessage = " Error(s). OpenC++ stops.\n"
bool showProgram
bool doCompile
bool makeExecutable
bool doPreprocess
bool doTranslate
bool verboseMode
bool regularCpp
bool makeSharedLibrary
const char * cppArgv []
const char * ccArgv []
const NLIBS = 32
int libsArgc = 0
const char * libsArgv [NLIBS]
const NLINKERARGS = 32
int linkerArgc = 0
bool linkerFlag = FALSE
char * linkerArgv [NLINKERARGS]


Define Documentation

#define is_blank      ((c) == ' ' || (c) == '\t' || (c) == '\f' || (c) == '\r' || (c) == '\n')
 

Definition at line 372 of file driver2.cpp.

Referenced by Lex::GetNextNonWhiteChar(), Program::ReadLineDirective(), Lex::ReadStrConst(), Lex::SkipExtensionToken(), and String2Args().

#define NOSERVICE
 

Definition at line 50 of file driver2.cpp.

#define PREPROCESSOR_EXT   ".i"
 

Definition at line 71 of file driver2.cpp.

Referenced by RunPreprocessor().

#define STRICT
 

Definition at line 48 of file driver2.cpp.

#define TRANSLATOR_EXT   ".occ"
 

Definition at line 72 of file driver2.cpp.

Referenced by OpenCxxOutputFileName().

#define WIN32_LEAN_AND_MEAN
 

Definition at line 49 of file driver2.cpp.


Function Documentation

void AddCcOption const char *    arg
 

Referenced by CloseCcOptions(), ParseCcOptions(), ParseCmdOptions(), ParseOptions(), RunCompiler(), and RunLinker().

void AddCppOption const char *    arg
 

Referenced by ParseCmdOptions(), ParseOptions(), and RunPreprocessor().

void BaseClassUsed char *    name,
int    len
 

Definition at line 170 of file driver2.cpp.

References libsArgc, and libsArgv.

Referenced by Metaclass::ProduceInitFile().

void CloseCcOptions  
 

void File2Args const char *    fname,
int    max,
int &    argc,
char *    argv[]
[static]
 

Definition at line 312 of file driver2.cpp.

References String2Args().

Referenced by ParseFileOptions().

bool IsCxxSource char *    fname
 

Referenced by ParseCcOptions(), and ParseTargetSpecificOptions().

int Launch const char *    tool,
const char *const *    argv
[static]
 

Definition at line 252 of file driver2.cpp.

Referenced by RunCompiler(), and RunPreprocessor().

void* LoadSoLib char *    file_name
 

Definition at line 235 of file driver2.cpp.

void* LookupSymbol void *    handle,
char *    symbol
 

Definition at line 246 of file driver2.cpp.

char * MakeTempFilename const char *    src,
const char *    suffix
[static]
 

Definition at line 257 of file driver2.cpp.

Referenced by OpenCxxOutputFileName(), RunCompiler(), RunLinker(), RunPreprocessor(), and RunSoCompiler().

char * NewArg const char *    from,
size_t    size,
int    argc,
int    max
[static]
 

Definition at line 414 of file driver2.cpp.

Referenced by String2Args().

char* OpenCxxOutputFileName const char *    src
 

Definition at line 165 of file driver2.cpp.

References MakeTempFilename(), and TRANSLATOR_EXT.

Referenced by RunOpencxx().

void ParseBackslash char    arg[],
size_t &    i,
const char *&    string
[static]
 

Definition at line 434 of file driver2.cpp.

Referenced by ParseDoubleQuote(), and String2Args().

void ParseCmdOptions int    from,
int    argc,
char **    argv,
char *&    source
 

Referenced by ParseFileOptions(), and ParseOptions().

void ParseDoubleQuote char    arg[],
size_t &    i,
const char *&    string
[static]
 

Definition at line 462 of file driver2.cpp.

References ParseBackslash().

Referenced by String2Args().

void ParseFileOptions const char *    filename,
char *&    source_file
[static]
 

Definition at line 302 of file driver2.cpp.

References File2Args(), and ParseCmdOptions().

Referenced by ParseTargetSpecificOptions().

bool ParseTargetSpecificOptions char *    arg,
char *&    source_file
 

Definition at line 281 of file driver2.cpp.

References FALSE, IsCxxSource(), linkerArgc, linkerArgv, linkerFlag, NLINKERARGS, ParseFileOptions(), and TRUE.

Referenced by ParseCmdOptions().

void RunCompiler const char *    src,
const char *    occsrc
 

Definition at line 179 of file driver2.cpp.

References AddCcOption(), ccArgv, CloseCcOptions(), compilerName, Launch(), libsArgc, libsArgv, linkerArgc, linkerArgv, makeExecutable, makeSharedLibrary, and ShowCommandLine().

Referenced by ReadFile().

void RunLinker  
 

Definition at line 127 of file driver2.cpp.

char* RunPreprocessor const char *    src
 

Definition at line 132 of file driver2.cpp.

References AddCppOption(), compilerName, cppArgv, Launch(), MakeTempFilename(), PREPROCESSOR_EXT, regularCpp, and ShowCommandLine().

Referenced by ReadFile().

void RunSoCompiler const char *    src_file
 

Definition at line 230 of file driver2.cpp.

void ShowCommandLine const char *    cmd,
const char **    args
 

Referenced by RunCompiler(), RunLinker(), RunPreprocessor(), and RunSoCompiler().

void String2Args const char *    str,
int    max,
int &    argc,
char *    argv[]
[static]
 

Definition at line 375 of file driver2.cpp.

References is_blank, NewArg(), ParseBackslash(), and ParseDoubleQuote().

Referenced by File2Args().


Variable Documentation

const char* ccArgv[]
 

Definition at line 89 of file driver2.cpp.

Referenced by AddCcOption(), and RunCompiler().

const char* compilerName = "cl"
 

Definition at line 74 of file driver2.cpp.

Referenced by ParseOptions(), RunCompiler(), and RunPreprocessor().

const char* cppArgv[]
 

Definition at line 88 of file driver2.cpp.

Referenced by AddCppOption(), and RunPreprocessor().

bool doCompile
 

Definition at line 80 of file driver2.cpp.

Referenced by ParseCmdOptions(), and ParseOptions().

bool doPreprocess
 

Definition at line 82 of file driver2.cpp.

Referenced by ParseCmdOptions(), and ParseOptions().

bool doTranslate
 

Definition at line 83 of file driver2.cpp.

Referenced by ParseCmdOptions(), and ParseOptions().

int libsArgc = 0 [static]
 

Definition at line 92 of file driver2.cpp.

Referenced by BaseClassUsed(), and RunCompiler().

const char* libsArgv[NLIBS]
 

Definition at line 93 of file driver2.cpp.

Referenced by BaseClassUsed(), and RunCompiler().

int linkerArgc = 0 [static]
 

Definition at line 96 of file driver2.cpp.

Referenced by ParseTargetSpecificOptions(), and RunCompiler().

char* linkerArgv[NLINKERARGS]
 

Definition at line 98 of file driver2.cpp.

Referenced by ParseTargetSpecificOptions(), and RunCompiler().

bool linkerFlag = FALSE [static]
 

Definition at line 97 of file driver2.cpp.

Referenced by ParseTargetSpecificOptions().

bool makeExecutable
 

Definition at line 81 of file driver2.cpp.

Referenced by ParseCmdOptions(), ParseOptions(), and RunCompiler().

bool makeSharedLibrary
 

Definition at line 86 of file driver2.cpp.

Referenced by RunCompiler().

const NLIBS = 32
 

Definition at line 91 of file driver2.cpp.

const NLINKERARGS = 32
 

Definition at line 95 of file driver2.cpp.

Referenced by ParseTargetSpecificOptions().

const char* opencxxErrorMessage = " Error(s). OpenC++ stops.\n"
 

Definition at line 75 of file driver2.cpp.

bool regularCpp
 

Definition at line 85 of file driver2.cpp.

Referenced by RunPreprocessor().

bool showProgram
 

Definition at line 79 of file driver2.cpp.

Referenced by ParseCmdOptions(), ParseOptions(), and ReadStdin().

bool verboseMode
 

Definition at line 84 of file driver2.cpp.


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