stepc
Class Compiler

java.lang.Object
  |
  +--stepc.Compiler

public class Compiler
extends Object


Field Summary
static int ERROR_EXIT
           
static int NORMAL_EXIT
           
static int USAGE_EXIT
           
static String VERSION
           
 
Constructor Summary
Compiler()
          Create a new STEP-DL compiler.
 
Method Summary
 void emit(Emitter emitter)
          Apply an emitter to the current set of parsed definitions.
 int errCount()
          Get the total parse error count so far.
(package private) static int ioBufferSize()
           
(package private) static boolean isDebug()
           
(package private) static boolean isVerbose()
           
static void main(String[] args)
          The default compiler application.
 boolean parse(Reader input)
          Read a text stream of STEP-DL definitions; parse, resolve and verify the definitions.
 void setErrOutput(PrintWriter output)
          Direct error/warning messages to a given output stream.
 void setMsgOutput(PrintWriter output)
          Direct normal messages to a given output stream.
 int warnCount()
          Get the total parse warning count so far.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION
See Also:
Constant Field Values

NORMAL_EXIT

public static final int NORMAL_EXIT
See Also:
Constant Field Values

ERROR_EXIT

public static final int ERROR_EXIT
See Also:
Constant Field Values

USAGE_EXIT

public static final int USAGE_EXIT
See Also:
Constant Field Values
Constructor Detail

Compiler

public Compiler()
Create a new STEP-DL compiler.

NOTE: By default, no messages are printed.

See Also:
setMsgOutput(PrintWriter), setErrOutput(PrintWriter)
Method Detail

main

public static void main(String[] args)
The default compiler application.

Parameters:
args - the command line arguments.
Run stepc.Compiler --help for details.

parse

public boolean parse(Reader input)
              throws IOException
Read a text stream of STEP-DL definitions; parse, resolve and verify the definitions.

Returns:
true if the parse was successful, false if there were errors.
Throws:
IOException - if an I/O failure occurred while reading the input.
See Also:
errCount(), warnCount()

emit

public void emit(Emitter emitter)
          throws IOException
Apply an emitter to the current set of parsed definitions.

Throws:
IOException - if the emitter encountered an I/O failure.

errCount

public int errCount()
Get the total parse error count so far.


warnCount

public int warnCount()
Get the total parse warning count so far.


setMsgOutput

public void setMsgOutput(PrintWriter output)
Direct normal messages to a given output stream.


setErrOutput

public void setErrOutput(PrintWriter output)
Direct error/warning messages to a given output stream.


ioBufferSize

static int ioBufferSize()

isVerbose

static boolean isVerbose()

isDebug

static boolean isDebug()