Package EDU.purdue.jtb
Class JTB
- java.lang.Object
-
- EDU.purdue.jtb.JTB
-
public class JTB extends java.lang.Object
Java Tree Builder (JTB) Driver.Class
JTB
contains the main() method of the program as well as related methods.JTB enables to be run in parallel threads on different grammars.
TESTCASE some to add
-
-
Field Summary
Fields Modifier and Type Field Description static int
ANN_ERR
JJFileAnnotator
errorstatic int
CF_ERR
ClassesFinder
errorstatic int
CL_ERR
Command line errorstatic int
CL_EX
JTB.InvalidCmdLineException
exceptionstatic int
DI_ERR
UserFilesGenerator
&VisitorsGenerator
directory creation errorstatic int
EG_ERR
Running external generator errorstatic int
FO_ERR
Parsing file options errorstatic int
GDB_ERR
GlobalDataBuilder
errorstatic int
IO_EX
IO exceptionJTBOptions
jopt
The global JTB optionsstatic int
OK
No errorstatic int
OTHER_EX
Programmatic errorstatic int
OTHER_THR
Other errorstatic int
PARSE_EX
ParseException
exceptionstatic int
PROG_ERR
Programmatic errorstatic int
SC_ERR
SemanticChecker
error
-
Constructor Summary
Constructors Constructor Description JTB()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
do_main(java.lang.String[] aArgs)
Non standard main static method returning an error code.static void
main(java.lang.String[] aArgs)
Standard main method.
CallsSystem.exit(int)
upon termination with the following status: for specific types of errors:CL_ERR
,GDB_ERR
,SC_ERR
,CF_ERR
,ANN_ERR
,DI_ERR
,FO_ERR
,CL_EX
,PARSE_EX
,EG_ERR
,IO_EX
),OTHER_EX
),PROG_ERR
),OTHER_THR
) or 0 if no error, or the number of errors Usedo_main(String[])
to get directly the status without callingSystem.exit(int)
.static void
printlnError(java.lang.String aMsg)
Prints an error message on stderr.static void
printlnInfo(java.lang.String aMsg)
Prints an information message on stdout.
-
-
-
Field Detail
-
jopt
public final JTBOptions jopt
The global JTB options
-
OK
public static final int OK
No error- See Also:
- Constant Field Values
-
CL_ERR
public static final int CL_ERR
Command line error- See Also:
- Constant Field Values
-
GDB_ERR
public static final int GDB_ERR
GlobalDataBuilder
error- See Also:
- Constant Field Values
-
SC_ERR
public static final int SC_ERR
SemanticChecker
error- See Also:
- Constant Field Values
-
CF_ERR
public static final int CF_ERR
ClassesFinder
error- See Also:
- Constant Field Values
-
ANN_ERR
public static final int ANN_ERR
JJFileAnnotator
error- See Also:
- Constant Field Values
-
DI_ERR
public static final int DI_ERR
UserFilesGenerator
&VisitorsGenerator
directory creation error- See Also:
- Constant Field Values
-
FO_ERR
public static final int FO_ERR
Parsing file options error- See Also:
- Constant Field Values
-
CL_EX
public static final int CL_EX
JTB.InvalidCmdLineException
exception- See Also:
- Constant Field Values
-
PARSE_EX
public static final int PARSE_EX
ParseException
exception- See Also:
- Constant Field Values
-
EG_ERR
public static final int EG_ERR
Running external generator error- See Also:
- Constant Field Values
-
IO_EX
public static final int IO_EX
IO exception- See Also:
- Constant Field Values
-
OTHER_EX
public static final int OTHER_EX
Programmatic error- See Also:
- Constant Field Values
-
PROG_ERR
public static final int PROG_ERR
Programmatic error- See Also:
- Constant Field Values
-
OTHER_THR
public static final int OTHER_THR
Other error- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(java.lang.String[] aArgs)
Standard main method.
CallsSystem.exit(int)
upon termination with the following status:- for specific types of errors:
CL_ERR
,GDB_ERR
,SC_ERR
,CF_ERR
,ANN_ERR
,DI_ERR
,FO_ERR
,CL_EX
,PARSE_EX
,EG_ERR
,IO_EX
),OTHER_EX
),PROG_ERR
),OTHER_THR
) or- 0 if no error, or
- the number of errors
Usedo_main(String[])
to get directly the status without callingSystem.exit(int)
.- Parameters:
aArgs
- - the command line arguments
- for specific types of errors:
-
do_main
public static int do_main(java.lang.String[] aArgs)
Non standard main static method returning an error code.
-
printlnInfo
public static void printlnInfo(java.lang.String aMsg)
Prints an information message on stdout.- Parameters:
aMsg
- - a message
-
printlnError
public static void printlnError(java.lang.String aMsg)
Prints an error message on stderr.- Parameters:
aMsg
- - a message
-
-