コード例 #1
0
ファイル: Shell.java プロジェクト: dbremner/fortress
 private static void printHelpMessage() {
   System.err.println(
       "Invoked as script: fortress args\n"
           + "Invoked by java: java ... com.sun.fortress.Shell args\n"
           + "\n"
           + "fortress parse [-out file] [-debug [type]* [#]] somefile.fs{i,s}\n"
           + "  Parses a file. If parsing succeeds the message \"Ok\" will be printed.\n"
           + "  If -out file is given, a message about the file being written to will be printed.\n"
           + "\n"
           + "fortress disambiguate [-compiler-lib] [-out file] [-debug [type]* [#]] somefile.fs{i,s}\n"
           + "  Disambiguates a file.\n"
           + "  If -out file is given, a message about the file being written to will be printed.\n"
           + "\n"
           + "fortress desugar [-compiler-lib] [-out file] [-debug [#]] somefile.fs{i,s}\n"
           + "  Desugars a file.\n"
           + "  If -out file is given, a message about the file being written to will be printed.\n"
           + "\n"
           + "fortress grammar [-compiler-lib] [-out file] [-debug [#]] somefile.fs{i,s}\n"
           + "  Rewrites syntax grammars in a file.\n"
           + "  If -out file is given, a message about the file being written to will be printed.\n"
           + "\n"
           + "fortress typecheck [-compiler-lib] [-out file] [-debug [#]] somefile.fs{i,s}\n"
           + "  Typechecks a file. If type checking succeeds no message will be printed.\n"
           + "\n"
           + "fortress compile [-out file] [-debug [type]* [#]] somefile.fs{s,i}\n"
           + "  Compiles somefile. If compilation succeeds no message will be printed.\n"
           + "\n"
           + "fortress link [-debug [type]* [#]] somecomponent[.fss]\n"
           + "  Links compiled components implementing APIs imported by somecomponent.\n"
           + "\n"
           + "fortress build [-debug [type]* [#]] somecomponent[.fss]\n"
           + "  Builds and links components implementing APIs imported by somecomponent.\n"
           + "\n"
           + "fortress run somecomponent\n"
           + "  Runs the compiler-generated bytecode for somecomponent.\n"
           + "\n"
           + "fortress [walk] [-compiler-lib] [-debug [type]* [#]] somefile.fss arg ...\n"
           + "  Runs somefile.fss through the Fortress interpreter, passing arg ... to the\n"
           + "  run method of somefile.fss.\n"
           + "\n"
           + "fortress test [-verbose] [-debug [type]* [#]] somefile.fss ...\n"
           + "  Runs the functions with the test modifier in the specified components \n"
           + "  If -verbose is set, the name of each test function is printed before and after running the function\n"
           + "\n"
           + "fortress junit [-debug [type]* [#]] somefile1.test ...\n"
           + "  Runs the system test file(s) somefile1.test (etc) in a junit textui harness.\n"
           + "\n"
           + "\n"
           + "fortress api [-out file] [-prepend prependFile] [-debug [type]* [#]] somefile.fss\n"
           + "  Automatically generate an API from a component.\n"
           + "  If -out file is given, a message about the file being written to will be printed.\n"
           + "  If -prepend prependFile is given, the prependFile is prepended to the generated API.\n"
           + "\n"
           + "fortress compare [-debug [type]* [#]] somefile.fss anotherfile.fss\n"
           + "  Compare results of two components.\n"
           + "\n"
           + "fortress unparse [-unqualified] [-unmangle] [-out file] [-debug [type]* [#]] somefile.tf{i,s}\n"
           + "  Convert a parsed file back to Fortress source code. The output will be dumped to stdout if -out is not given.\n"
           + "  If -unqualified is given, identifiers are dumped without their API prefixes.\n"
           + "  If -unmangle is given, internally mangled identifiers are unmangled.\n"
           + "  If -out file is given, a message about the file being written to will be printed.\n"
           + "\n"
           + "fortress expand property\n"
           + "  Prints the contents of the given property name from the local Fortress repository.\n"
           + "\n"
           + "\n"
           + "More details on each flag:\n"
           + "   -out file : dumps the processed abstract syntax tree to a file.\n"
           + "   -debug : enables debugging to the maximum level (99) for all \n"
           + "            debugging types and prints java stack traces.\n"
           + "   -debug # : sets debugging to the specified level, where # is a number, \n"
           + "            and sets all debugging types on.\n"
           + "   -debug types : sets debugging types to the specified types with \n"
           + "            the maximum debugging level. \n"
           + "   -debug types # : sets debugging to the specified level, where # is a number, \n"
           + "            and the debugging types to the specified types. \n"
           + "   The acceptable debugging types are:\n"
           + "            "
           + Debug.typeStrings()
           + "\n"
           + "\n");
 }