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

driver.cc File Reference

#include <stdio.h>
#include <stdlib.h>
#include <iostream.h>
#include <string.h>
#include "token.h"
#include "buffer.h"
#include "parse.h"
#include "walker.h"
#include "classwalk.h"
#include "ptree-core.h"
#include "mop.h"
#include <unistd.h>

Include dependency graph for driver.cc:

Include dependency graph

Go to the source code of this file.

Functions

bool ParseTargetSpecificOptions (char *arg, char *&source_file)
void RunLinker ()
char * RunPreprocessor (const char *src)
char * OpenCxxOutputFileName (const char *src)
void RunCompiler (const char *src, const char *occserc)
void LoadMetaclass (char *)
void Compile (int argc, char **argv)
void ParseCmdOptions (int from, int argc, char **argv, char *&source_file)
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 ReadStdin ()
void ReadFile (const char *src)
char * RunOpencxx (const char *src)
int ParseOpencxx (Program *parse)
char * ParseOptions (int argc, char **argv)
void ShowVersion ()
void ShowHelp (char **)
void AddCc2Option (const char *arg)
void RecordCmdOption (char *option)
void ParseCcOptions (char *arg, char *&source_file)

Variables

char thisVersion [] = "2.5.12"
char copyingNote []
const char opencxxErrorMessage [] = " Error(s). OpenC++ stops.\n"
const char * compilerName
bool showProgram
bool doCompile
bool makeExecutable
bool doPreprocess
bool doTranslate
bool verboseMode
bool regularCpp
bool makeSharedLibrary
char * sharedLibraryName
bool preprocessTwice
const int NARGS = 64
const char * cppArgv [NARGS]
const char * ccArgv [NARGS]
const char * cc2Argv [NARGS]
int cppArgc = 0
int ccArgc = 0
int cc2Argc = 0
int numOfObjectFiles = 0


Function Documentation

void AddCc2Option const char *    arg [static]
 

Definition at line 388 of file driver.cc.

References cc2Argc, cc2Argv, and NARGS.

Referenced by ParseCcOptions().

void AddCcOption const char *    arg
 

Definition at line 370 of file driver.cc.

References ccArgc, ccArgv, and NARGS.

void AddCppOption const char *    arg
 

Definition at line 360 of file driver.cc.

References cppArgc, cppArgv, and NARGS.

void CloseCcOptions  
 

Definition at line 380 of file driver.cc.

References AddCcOption(), cc2Argc, and cc2Argv.

Referenced by RunCompiler(), and RunLinker().

void Compile int    argc,
char **    argv
 

Definition at line 114 of file driver.cc.

References nil, numOfObjectFiles, ParseOptions(), ReadFile(), ReadStdin(), and RunLinker().

bool IsCxxSource char *    fname
 

Definition at line 446 of file driver.cc.

References FALSE, nil, and TRUE.

void LoadMetaclass char *   
 

Definition at line 299 of file metaclass.cc.

char * OpenCxxOutputFileName const char *    src
 

Definition at line 223 of file driver2.cc.

void ParseCcOptions char *    arg,
char *&    source_file
[static]
 

Definition at line 413 of file driver.cc.

References AddCc2Option(), AddCcOption(), IsCxxSource(), nil, and numOfObjectFiles.

Referenced by ParseCmdOptions().

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

Definition at line 250 of file driver.cc.

References AddCcOption(), AddCppOption(), doCompile, doPreprocess, doTranslate, FALSE, LoadMetaclass(), makeExecutable, makeSharedLibrary, ParseCcOptions(), ParseTargetSpecificOptions(), preprocessTwice, opcxx_ListOfMetaclass::PrintAllMetaclasses(), RecordCmdOption(), regularCpp, sharedLibraryName, ShowHelp(), showProgram, ShowVersion(), TRUE, and verboseMode.

int ParseOpencxx Program   parse [static]
 

Definition at line 203 of file driver.cc.

References Ptree::Display2(), ClassWalker::GetAppendedPtree(), ClassWalker::GetInsertedPtree(), Program::Insert(), Program::MinimumSubst(), Parser::NumOfErrors(), Parser::rProgram(), and Walker::Translate().

Referenced by ReadStdin(), and RunOpencxx().

char * ParseOptions int    argc,
char **    argv
[static]
 

Definition at line 228 of file driver.cc.

References AddCcOption(), AddCppOption(), compilerName, doCompile, doPreprocess, doTranslate, FALSE, makeExecutable, makeSharedLibrary, nil, ParseCmdOptions(), preprocessTwice, regularCpp, sharedLibraryName, showProgram, TRUE, and verboseMode.

Referenced by Compile().

bool ParseTargetSpecificOptions char *    arg,
char *&    source_file
 

Definition at line 116 of file driver2.cc.

void ReadFile const char *    src [static]
 

Definition at line 142 of file driver.cc.

References RunCompiler(), RunOpencxx(), and RunPreprocessor().

Referenced by Compile().

void ReadStdin   [static]
 

Definition at line 126 of file driver.cc.

References opencxxErrorMessage, ParseOpencxx(), showProgram, and Program::Write().

Referenced by Compile().

void RecordCmdOption char *    option [static]
 

Definition at line 398 of file driver.cc.

References nil, and Class::RecordCmdLineOption().

Referenced by ParseCmdOptions().

void RunCompiler const char *    src,
const char *    occserc
 

Definition at line 241 of file driver2.cc.

void RunLinker  
 

Definition at line 121 of file driver2.cc.

Referenced by Compile().

char * RunOpencxx const char *    src [static]
 

Definition at line 163 of file driver.cc.

References opencxxErrorMessage, OpenCxxOutputFileName(), ParseOpencxx(), and Program::Write().

Referenced by ReadFile().

char * RunPreprocessor const char *    src
 

Definition at line 173 of file driver2.cc.

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

Definition at line 466 of file driver.cc.

References nil.

void ShowHelp char **    [static]
 

Definition at line 321 of file driver.cc.

Referenced by ParseCmdOptions().

void ShowVersion   [static]
 

Definition at line 316 of file driver.cc.

References copyingNote, and thisVersion.

Referenced by ParseCmdOptions().


Variable Documentation

int cc2Argc = 0 [static]
 

Definition at line 81 of file driver.cc.

Referenced by AddCc2Option(), and CloseCcOptions().

const char* cc2Argv[NARGS] [static]
 

Definition at line 78 of file driver.cc.

Referenced by AddCc2Option(), and CloseCcOptions().

int ccArgc = 0
 

Definition at line 80 of file driver.cc.

Referenced by AddCcOption().

const char* ccArgv[NARGS]
 

Definition at line 77 of file driver.cc.

Referenced by AddCcOption(), and RunCompiler().

const char* compilerName
 

Definition at line 62 of file driver.cc.

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

char copyingNote[] [static]
 

Initial value:

 "Copyright (c) 1997-2001 Shigeru Chiba.  All Rights Reserved.\n"
          "Copyright (c) 1995, 1996 Xerox Corporation. All Rights Reserved."

Definition at line 57 of file driver.cc.

Referenced by ShowVersion().

int cppArgc = 0
 

Definition at line 79 of file driver.cc.

Referenced by AddCppOption().

const char* cppArgv[NARGS]
 

Definition at line 76 of file driver.cc.

Referenced by AddCppOption(), and RunPreprocessor().

bool doCompile
 

Definition at line 65 of file driver.cc.

Referenced by ParseCmdOptions(), and ParseOptions().

bool doPreprocess
 

Definition at line 67 of file driver.cc.

Referenced by ParseCmdOptions(), and ParseOptions().

bool doTranslate
 

Definition at line 68 of file driver.cc.

Referenced by ParseCmdOptions(), and ParseOptions().

bool makeExecutable
 

Definition at line 66 of file driver.cc.

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

bool makeSharedLibrary
 

Definition at line 71 of file driver.cc.

Referenced by ParseCmdOptions(), and ParseOptions().

const int NARGS = 64
 

Definition at line 75 of file driver.cc.

Referenced by AddCc2Option(), AddCcOption(), and AddCppOption().

int numOfObjectFiles = 0 [static]
 

Definition at line 82 of file driver.cc.

Referenced by Compile(), and ParseCcOptions().

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

Definition at line 60 of file driver.cc.

Referenced by ReadStdin(), and RunOpencxx().

bool preprocessTwice
 

Definition at line 73 of file driver.cc.

Referenced by ParseCmdOptions(), and ParseOptions().

bool regularCpp
 

Definition at line 70 of file driver.cc.

Referenced by ParseCmdOptions(), and ParseOptions().

char* sharedLibraryName
 

Definition at line 72 of file driver.cc.

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

bool showProgram
 

Definition at line 64 of file driver.cc.

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

char thisVersion[] = "2.5.12" [static]
 

Definition at line 54 of file driver.cc.

Referenced by ShowVersion().

bool verboseMode
 

Definition at line 69 of file driver.cc.

Referenced by ParseCmdOptions(), and ParseOptions().


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