coins.driver
インタフェース CompilerImplementation

既知の実装クラスの一覧:
Driver

public interface CompilerImplementation

Compiler implementation object.
In COINS Compiler Driver API, user must provide implemtation of four compilation steps: preprocess, compile, assemble, and link. These implementations are called from a CompilerDriver object via this interface.


メソッドの概要
 void assemble(java.io.File sourceFile, Suffix suffix, java.io.InputStream in, java.io.File out, IoRoot io)
          Assembler implementation.
 void compile(java.io.File sourceFile, Suffix suffix, java.io.InputStream in, java.io.OutputStream out, IoRoot io)
          Compiler implementation.
 void link(java.io.File out, IoRoot io)
          Linker implementation.
 void preprocess(java.io.File sourceFile, Suffix suffix, java.io.OutputStream out, IoRoot io)
          Preprocessor implementation.
 

メソッドの詳細

preprocess

public void preprocess(java.io.File sourceFile,
                       Suffix suffix,
                       java.io.OutputStream out,
                       IoRoot io)
                throws java.io.IOException,
                       PassException
Preprocessor implementation.
The input source file name can be obtained as an File. Output lines should be written to the OutputStream. Command line options and arguments can be obtained from the CompileSpecification.

パラメータ:
sourceFile - the source file name.
suffix - suffix rule of the source file.
out - the OutputStream.
io - the IoRoot.
例外:
java.io.IOException - any IO error.
PassException - unrecoverable error(s) found in processing.

compile

public void compile(java.io.File sourceFile,
                    Suffix suffix,
                    java.io.InputStream in,
                    java.io.OutputStream out,
                    IoRoot io)
             throws java.io.IOException,
                    PassException
Compiler implementation.
Input lines can be read from the InputStream. Output lines should be written to the OutputStream. The input source file name (before preprocessing) can be obtained as the File. Command line options and arguments can be obtained from a CompileSpecification.

パラメータ:
sourceFile - the source file name.
suffix - suffix rule of the source file.
in - the InputStream.
out - the OutputStream.
io - the IoRoot.
例外:
java.io.IOException - any IO error
PassException - unrecoverable error(s) found in processing

assemble

public void assemble(java.io.File sourceFile,
                     Suffix suffix,
                     java.io.InputStream in,
                     java.io.File out,
                     IoRoot io)
              throws java.io.IOException,
                     PassException
Assembler implementation.
Input lines can be read from the InputStream. Output lines should be written to the File. The input source file name (before preprocessing) can be obtained as the sourceFile. Command line options and arguments can be obtained from a CompileSpecification.

パラメータ:
sourceFile - the source file name
suffix - suffix rule of the source file.
in - the InputStream
out - the output File
io - the IoRoot.
例外:
java.io.IOException - any IO error
PassException - unrecoverable error(s) found in processing

link

public void link(java.io.File out,
                 IoRoot io)
          throws java.io.IOException,
                 PassException
Linker implementation.
Output executable file should be written to a File. Command line options and arguments can be obtained from a CompileSpecification.

パラメータ:
out - the output File
io - the IoRoot.
例外:
java.io.IOException - any IO error
PassException - unrecoverable error(s) found in processing