All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sdi.tools.mls.Main

java.lang.Object
   |
   +----com.sdi.tools.mls.Main

public class Main
extends Object
The Multi Line Strings with Executable Inclusions A Java preprocessor by Brad Cox

Version:
0.1
Author:
Brad J. Cox, Phd; bcox@virtualschool.edu

Variable Index

 o fileName
The current input file name
 o in
The current input stream
 o lineNumber
The line number in the current input file
 o nestingLevel
The nesting level increases with each doData() or doCode() call.
 o out
The current output stream
 o usage
Usage instructions

Constructor Index

 o Main()

Method Index

 o doCode()
Process an even-level {{string}} by treating it as code; e.g.
 o doData(int)
Process an odd-level {{string}} by treating it as data; e.g.
 o doStream(InputStream, PrintWriter)
Initiate processing of an inputstream by setting the input and outputstreams, and setting line number and nesting level to 0.
 o main(String[])
Usage: java com.sdi.tools.mls [-d directoryName] inputFile ...

Variables

 o nestingLevel
 private static int nestingLevel
The nesting level increases with each doData() or doCode() call. Even-level nestings (including the 0th) are handled by doCode(). Odd-level nestings are handled by doData().

 o fileName
 private static String fileName
The current input file name

 o lineNumber
 private static int lineNumber
The line number in the current input file

 o in
 private static PushbackInputStream in
The current input stream

 o out
 private static PrintWriter out
The current output stream

 o usage
 private static final String usage
Usage instructions

Constructors

 o Main
 public Main()

Methods

 o doCode
 private static void doCode() throws Exception
Process an even-level {{string}} by treating it as code; e.g. an executable inclusion

 o doData
 private static void doData(int line) throws Exception
Process an odd-level {{string}} by treating it as data; e.g. a multi-line string

 o doStream
 public static void doStream(InputStream is,
                             PrintWriter os) throws Exception
Initiate processing of an inputstream by setting the input and outputstreams, and setting line number and nesting level to 0.

Parameters:
eter - InputStream is: the input stream
eter - PrintWriter os: the output stream
 o main
 public static void main(String args[])
Usage: java com.sdi.tools.mls [-d directoryName] inputFile ...


All Packages  Class Hierarchy  This Package  Previous  Next  Index