예제 #1
0
파일: Typical.java 프로젝트: iamxyz/nbscala
  public void init() {
    super.init();

    runtime
        .bool("checkOnly", "optionCheckOnly", false, "Type check, but do not generate code.")
        .bool("typesOnly", "optionTypesOnly", false, "Generate external type definitions.")
        .word("o", "optionOutput", false, "Specify the base name of the generated checker.")
        .bool("printAST", "printAST", false, "Print the AST of the of the pre-transformed program.")
        .bool("printSymbolTable", "printSymbolTable", false, "Print the symbol table.")
        .bool(
            "printSource",
            "printSource",
            false,
            "Print the java source code of the generated checker.")
        .bool(
            "Oswitch",
            "optimizeMatch",
            false,
            "Use switch statements and type tags for pattern matches.")
        .bool("Ofold-let", "optimizeFoldLet", false, "Collapse let expressions where possible.")
        .bool("Olet", "optimizeLet", false, "Avoid creating a Let object if possible.")
        .bool(
            "Otype",
            "optimizeType",
            false,
            "Eliminate type records, if attributes are not defined.")
        .word("node", "optionNodeType", false, "Specify the name of the node type.");
  }
  public void init() {
    super.init();

    // Declare command line arguments.
    runtime
        .bool("printJavaAST", "printJavaAST", false, "Print Java AST.")
        .bool("printJavaCode", "printJavaCode", false, "Print Java code.")
        .bool("countMethods", "countMethods", false, "Count all Java methods.")
        .bool("translate", "translate", false, "Translate from Java to C++.")
        .bool(
            "findDependencies",
            "findDependencies",
            false,
            "Find all Dependencies of given Java file.");
  }
  public void prepare() {
    super.prepare();

    // Perform consistency checks on command line arguments.
  }