com.ph.pr.parser.vbs2java.deprecated
Class Translator

java.lang.Object
  extended by com.ph.pr.parser.vbs2java.deprecated.Translator

Deprecated.

public class Translator
extends java.lang.Object

A translator of VBScript to Java. Mostly does a good job, but does not have the capability to figure out operator precedence, since it is not a true parser.

Author:
bobh
See Also:
com.ph.pr.parser.vb2java.VBSVisitor

Field Summary
(package private) static java.lang.String appsPKG
          Deprecated.  
(package private) static boolean atHome
          Deprecated.  
(package private) static boolean chatty
          Deprecated.  
(package private) static java.lang.String comment
          Deprecated.  
(package private) static java.io.FileOutputStream consoleOut
          Deprecated.  
(package private) static java.io.File consoleOutput
          Deprecated.  
(package private) static java.lang.String corePKG
          Deprecated.  
(package private) static java.lang.String currentFunctionName
          Deprecated.  
(package private) static java.util.HashMap dimmer
          Deprecated.  
(package private) static boolean doExit
          Deprecated.  
(package private) static boolean firstCase
          Deprecated.  
(package private) static boolean isOk
          Deprecated.  
(package private) static int nestingLevel
          Deprecated.  
(package private) static int nestingLevelWas
          Deprecated.  
(package private) static java.io.PrintWriter pw
          Deprecated.  
private static java.util.Map SPECIAL_CASES
          Deprecated. This is for special-case pre-processing (mostly precedence errors), since it's not worth it to go all-out and parse VB, nor is it worth correcting these particular special cases, as VBS files could change.
private static java.lang.String SPECIAL_COMMENT
          Deprecated.  
(package private) static java.io.PrintStream stderr
          Deprecated.  
(package private) static java.io.PrintStream stdout
          Deprecated.  
(package private) static Variable varInSelect
          Deprecated.  
 
Constructor Summary
Translator()
          Deprecated.  
 
Method Summary
private static void close()
          Deprecated.  
private static java.lang.String doListOfTerms(java.lang.String tline)
          Deprecated.  
private static void ensure(boolean b)
          Deprecated.  
private static Term evalBoolean(java.lang.String expression)
          Deprecated.  
(package private) static Term extractTerm(java.lang.String expr)
          Deprecated.  
private static Oper fetchOper(java.lang.String remainder)
          Deprecated.  
private static java.lang.String finishIt(boolean nestUp, java.lang.String nline)
          Deprecated.  
static int getEndOfFunc(java.lang.String rhs)
          Deprecated.  
static java.lang.String getFileAsString(java.io.File file)
          Deprecated.  
static boolean isNextFunction(java.lang.String rhs)
          Deprecated.  
static void main(java.lang.String[] args)
          Deprecated.  
private static void open(java.io.File file)
          Deprecated.  
private static void out(java.lang.String string)
          Deprecated.  
(package private) static java.lang.String parseLine(java.lang.String rline)
          Deprecated.  
private static void regVar(java.lang.String var)
          Deprecated.  
private static java.lang.String removeIt(java.lang.String vb, java.lang.String string)
          Deprecated.  
private static void setConsoleOutToFile(java.io.File refFile)
          Deprecated.  
static java.io.File translate(java.io.File file)
          Deprecated.  
private static void turnOffConsoleCapture()
          Deprecated.  
private static void XXX_Edit_fix(java.lang.String editcodes, java.lang.String badstring, java.lang.String goodstring)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPECIAL_CASES

private static final java.util.Map SPECIAL_CASES
Deprecated. 
This is for special-case pre-processing (mostly precedence errors), since it's not worth it to go all-out and parse VB, nor is it worth correcting these particular special cases, as VBS files could change. The best way is probably to make sure VBS scripts use parenthesis as much as possible to indicate precedence. I will second Bob's Oh the inhumanity exclamation.

This is a map of VBS file names to an array of 2 Strings -- first one is regex to replace, second - the replacement.


SPECIAL_COMMENT

private static final java.lang.String SPECIAL_COMMENT
Deprecated. 
See Also:
Constant Field Values

atHome

static boolean atHome
Deprecated. 

appsPKG

static java.lang.String appsPKG
Deprecated. 

corePKG

static java.lang.String corePKG
Deprecated. 

pw

static java.io.PrintWriter pw
Deprecated. 

chatty

static boolean chatty
Deprecated. 

dimmer

static java.util.HashMap dimmer
Deprecated. 

currentFunctionName

static java.lang.String currentFunctionName
Deprecated. 

nestingLevel

static int nestingLevel
Deprecated. 

nestingLevelWas

static int nestingLevelWas
Deprecated. 

comment

static java.lang.String comment
Deprecated. 

firstCase

static boolean firstCase
Deprecated. 

varInSelect

static Variable varInSelect
Deprecated. 

isOk

static boolean isOk
Deprecated. 

doExit

static boolean doExit
Deprecated. 

consoleOut

static java.io.FileOutputStream consoleOut
Deprecated. 

consoleOutput

static java.io.File consoleOutput
Deprecated. 

stdout

static java.io.PrintStream stdout
Deprecated. 

stderr

static java.io.PrintStream stderr
Deprecated. 
Constructor Detail

Translator

public Translator()
Deprecated. 
Method Detail

getEndOfFunc

public static int getEndOfFunc(java.lang.String rhs)
Deprecated. 

XXX_Edit_fix

private static void XXX_Edit_fix(java.lang.String editcodes,
                                 java.lang.String badstring,
                                 java.lang.String goodstring)
Deprecated. 

getFileAsString

public static java.lang.String getFileAsString(java.io.File file)
                                        throws java.io.IOException
Deprecated. 
Throws:
java.io.IOException

isNextFunction

public static boolean isNextFunction(java.lang.String rhs)
Deprecated. 

main

public static void main(java.lang.String[] args)
Deprecated. 

turnOffConsoleCapture

private static void turnOffConsoleCapture()
Deprecated. 

setConsoleOutToFile

private static void setConsoleOutToFile(java.io.File refFile)
Deprecated. 

extractTerm

static Term extractTerm(java.lang.String expr)
Deprecated. 

parseLine

static java.lang.String parseLine(java.lang.String rline)
Deprecated. 

close

private static void close()
Deprecated. 

doListOfTerms

private static java.lang.String doListOfTerms(java.lang.String tline)
Deprecated. 
Parameters:
tline -
Returns:

ensure

private static void ensure(boolean b)
Deprecated. 

evalBoolean

private static Term evalBoolean(java.lang.String expression)
Deprecated. 

fetchOper

private static Oper fetchOper(java.lang.String remainder)
Deprecated. 

finishIt

private static java.lang.String finishIt(boolean nestUp,
                                         java.lang.String nline)
Deprecated. 

open

private static void open(java.io.File file)
                  throws java.io.IOException
Deprecated. 
Throws:
java.io.IOException

out

private static void out(java.lang.String string)
Deprecated. 

regVar

private static void regVar(java.lang.String var)
Deprecated. 

removeIt

private static java.lang.String removeIt(java.lang.String vb,
                                         java.lang.String string)
Deprecated. 

translate

public static java.io.File translate(java.io.File file)
                              throws java.io.IOException
Deprecated. 
Throws:
java.io.IOException