wcs
Class PjTask

java.lang.Object
  extended by wcs.Task
      extended by wcs.ProcessTask
          extended by wcs.PjTask
All Implemented Interfaces:
Runnable

public class PjTask
extends ProcessTask

task to run pj. BUG: this should not use ProcessTask; it should be patterned on PJServlet.


Nested Class Summary
 
Nested classes/interfaces inherited from class wcs.Task
Task.Exception, Task.In, Task.Out
 
Field Summary
protected  ArrayList args
          commandline.
protected  File tmpDir
          root of workarea for yacc.
 
Fields inherited from class wcs.ProcessTask
argv
 
Fields inherited from class wcs.Task
env, err, in, out
 
Constructor Summary
PjTask(File tmpDir, Task.In in, Task.Out out, Task.Out err, Properties env)
          required properties: java Java launcher pj.jar jar file for pj
 
Method Summary
 void dump()
          arrange to dump parser tree.
 void recover()
          arrange to insert error recovery actions.
 void run()
          insert args as ProcessTask.argv, create a Process in the working directory and set TMPDIR in the environment.
 void scanner(boolean isStatic, File lex)
          arrange for scanner generation.
 void trace(String trace)
          arrange for trace or animation and force jay.
 void tree(boolean isStatic, boolean flatten, File tree)
          arrange for tree factory generation.
 void verbose()
          arrange to let jay describe the parser.
 
Methods inherited from class wcs.ProcessTask
main, run
 
Methods inherited from class wcs.Task
In, In, In, Out, Out
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tmpDir

protected final File tmpDir
root of workarea for yacc.* and y.output.


args

protected final ArrayList args
commandline.

Constructor Detail

PjTask

public PjTask(File tmpDir,
              Task.In in,
              Task.Out out,
              Task.Out err,
              Properties env)
required properties:
java Java launcher
pj.jar jar file for pj

Method Detail

dump

public void dump()
arrange to dump parser tree.


recover

public void recover()
arrange to insert error recovery actions.


scanner

public void scanner(boolean isStatic,
                    File lex)
             throws IOException
arrange for scanner generation.

Parameters:
isStatic - true for static scanner.
lex - not null to capture JLex input.
Throws:
IOException

trace

public void trace(String trace)
arrange for trace or animation and force jay.

Parameters:
trace - true|0|1|2|3, can be null.

tree

public void tree(boolean isStatic,
                 boolean flatten,
                 File tree)
          throws IOException
arrange for tree factory generation.

Parameters:
isStatic - true for static factory (only if no tree file).
flatten - true to squeeze out single ArrayList parameter.
tree - not null: template for factory.
Throws:
IOException

verbose

public void verbose()
arrange to let jay describe the parser.


run

public void run()
         throws Task.Exception
insert args as ProcessTask.argv, create a Process in the working directory and set TMPDIR in the environment.

Specified by:
run in interface Runnable
Overrides:
run in class ProcessTask
Throws:
Task.Exception