setDebugging now returns result.

don't indent options with tab.


git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1036 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
jochen 26 years ago
parent 6e053f676e
commit aace74ecc2
  1. 39
      jode/jode/GlobalOptions.java

@ -54,34 +54,40 @@ public class GlobalOptions {
public static void usageDebugging() { public static void usageDebugging() {
err.println("Debugging option: --debug=flag1,flag2,..."); err.println("Debugging option: --debug=flag1,flag2,...");
err.println("possible flags:"); err.println("possible flags:");
err.println("\tbytecode " + err.println(" bytecode " +
"show bytecode, as it is read from class file."); "show bytecode, as it is read from class file.");
err.println("\tverifier " + err.println(" verifier " +
"show result of bytecode verification."); "show result of bytecode verification.");
err.println("\ttypes " + err.println(" types " +
"show type intersections"); "show type intersections");
err.println("\tflow " + err.println(" flow " +
"show flow block merging."); "show flow block merging.");
err.println("\tanalyze " + err.println(" analyze " +
"show analyzation order of flow blocks."); "show T1/T2 analyzation of flow blocks.");
err.println("\tinout " + err.println(" inout " +
"show T1/T2 in/out set analysis."); "show in/out set analysis.");
err.println("\tlvt " + err.println(" lvt " +
"dump LocalVariableTable."); "dump LocalVariableTable.");
err.println("\tcheck " + err.println(" check " +
"do time consuming sanity checks."); "do time consuming sanity checks.");
err.println("\tlocals " + err.println(" locals " +
"dump local merging information."); "dump local merging information.");
err.println("\tconstructors " + err.println(" constructors " +
"dump constructor simplification."); "dump constructor simplification.");
err.println("\tinterpreter " + err.println(" interpreter " +
"debug execution of interpreter."); "debug execution of interpreter.");
System.exit(0); System.exit(0);
} }
public static void setDebugging(String debuggingString) { /**
if (debuggingString.length() == 0 || debuggingString.equals("help")) * Parse the argument given to the debugging flag.
* @return true, if the argument parsed without problems.
*/
public static boolean setDebugging(String debuggingString) {
if (debuggingString.length() == 0 || debuggingString.equals("help")) {
usageDebugging(); usageDebugging();
return false;
}
StringTokenizer st = new StringTokenizer(debuggingString, ","); StringTokenizer st = new StringTokenizer(debuggingString, ",");
next_token: next_token:
@ -94,7 +100,8 @@ public class GlobalOptions {
} }
} }
err.println("Illegal debugging flag: "+token); err.println("Illegal debugging flag: "+token);
usageDebugging(); return false;
} }
return true;
} }
} }

Loading…
Cancel
Save