coins.driver
クラス CompilerDriver

java.lang.Object
  |
  +--coins.driver.CompilerDriver

public final class CompilerDriver
extends java.lang.Object

A framework of COINS compiler driver.
A CompilerDriver object represents an execution of whole compilation process which is divided into four passes: preprocess, compile, assemble and link. An object which implements CompilerImplementation must be provided to implement these four passes.
The semantics of driver control options such as -E, -c, -pipe, etc. are determined by this class.


コンストラクタの概要
CompilerDriver(CompileSpecification spec)
          Constructs a framework object.
 
メソッドの概要
static java.io.InputStream getAttachedFileInputStream(java.lang.Class clazz, java.lang.String path)
          Returns an InputStream of a file, which is in a directory where a loadable class file is in it (or one of sub-directories of the directory).
 int go(CompilerImplementation implementation)
          Drives compilation processes: preprocess, compile, assemble and link.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

CompilerDriver

public CompilerDriver(CompileSpecification spec)
Constructs a framework object.

メソッドの詳細

getAttachedFileInputStream

public static java.io.InputStream getAttachedFileInputStream(java.lang.Class clazz,
                                                             java.lang.String path)
                                                      throws java.lang.ClassNotFoundException,
                                                             java.io.IOException
Returns an InputStream of a file, which is in a directory where a loadable class file is in it (or one of sub-directories of the directory). Note that the file and the directory may be on a jar/zip file.

パラメータ:
clazz - a class object the class
path - a relative path of the directory where the file exists
戻り値:
the InputStream object.
例外:
java.io.IOException - failed to get InputStream
java.lang.ClassNotFoundException - failed to find `clazz' from class-path.

go

public int go(CompilerImplementation implementation)
Drives compilation processes: preprocess, compile, assemble and link.

パラメータ:
implementation - a compiler implementation
戻り値:
0 if no error, 1 otherwise