X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbin%2Froles%2Froles.ml;h=95be729607cd89f6701a9c53ea1edca8f71fde05;hb=cfd201c62dd9b854bfb4ada648d3e556b29fac3a;hp=bbabd22647e29e75b10420ed9d66fdaf10dd6003;hpb=f07cd97493f650ee779be874d1159c0e807f8273;p=helm.git
diff --git a/matita/matita/contribs/lambdadelta/bin/roles/roles.ml b/matita/matita/contribs/lambdadelta/bin/roles/roles.ml
index bbabd2264..95be72960 100644
--- a/matita/matita/contribs/lambdadelta/bin/roles/roles.ml
+++ b/matita/matita/contribs/lambdadelta/bin/roles/roles.ml
@@ -13,28 +13,40 @@ module EE = RolesEngine
module EG = RolesGlobal
module ET = RolesTypes
module EU = RolesUtils
+module WE = WebEngine
-let help_C = "
Set this working directory (default: current directory)"
+let help_B = " Set this base url (default: http://helm.cs.unibo.it/lambdadelta/)"
+let help_C = " Set this relative working directory (default: invocation directory)"
let help_L = " Debug osn lexer"
+let help_W = " Run as an LWS application"
let help_X = " Reset all options to defaults"
let help_a = " Add selected names to a role"
+let help_d = " Remove selected names from roles"
let help_m = " Add roles relating matching names"
-let help_o = " Add top objects for this stage"
+let help_n = " Start a stage with this version"
+let help_o = " Turn waiting names into top objects"
let help_p = " Print current status on standard output"
let help_r = " Load current status"
-let help_s = " Start a stage with this version"
-let help_t = " Toggle the selection of this pointed entry"
+let help_s = " Toggle the selection of this pointed entry"
+let help_t = " Add top objects for this stage"
let help_w = " Save current status"
-let help = "Usage: roles [ -LXamprw | -C | -os | -t | ]*"
+let help_x = " Toggle the expansion of this pointed entry"
+let help = "Usage: roles [ -LWXadmprw | -B | -C | -nt | -sx | ]*"
+
+let change_cwd s =
+ EG.cwd := Filename.concat !EG.cwd s
let add_tops s =
- EE.add_tops (EU.version_of_string s)
+ EE.add_tops (EU.stage_of_string s)
let new_stage s =
- EE.new_stage (EU.version_of_string s)
+ EE.new_stage (EU.stage_of_string s)
+
+let select_entry s =
+ EE.select_entry (EU.pointer_of_string s)
-let toggle_entry s =
- EE.toggle_entry (EU.pointer_of_string s)
+let expand_entry s =
+ EE.expand_entry (EU.pointer_of_string s)
let process s =
match Filename.extension s with
@@ -43,16 +55,21 @@ let process s =
let _main = try
Arg.parse [
- "-C", Arg.String ((:=) EG.wd), help_C;
+ "-B", Arg.String ((:=) EG.base_url), help_B;
+ "-C", Arg.String change_cwd, help_C;
"-L", Arg.Set EG.debug_lexer, help_L;
+ "-W", Arg.Unit WE.init, help_W;
"-X", Arg.Unit EG.clear, help_X;
"-a", Arg.Unit EE.add_role, help_a;
+ "-d", Arg.Unit EE.remove_roles, help_d;
"-m", Arg.Unit EE.add_matching, help_m;
- "-o", Arg.String add_tops, help_o;
+ "-n", Arg.String new_stage, help_n;
+ "-o", Arg.Unit EE.make_tops, help_o;
"-p", Arg.Unit EE.print_status, help_p;
"-r", Arg.Unit EE.read_status, help_r;
- "-s", Arg.String new_stage, help_s;
- "-t", Arg.String toggle_entry, help_t;
+ "-s", Arg.String select_entry, help_s;
+ "-t", Arg.String add_tops, help_t;
"-w", Arg.Unit EE.write_status, help_w;
+ "-x", Arg.String expand_entry, help_x;
] process help
with ET.Error e -> Printf.eprintf "roles: %s\n%!" (EU.string_of_error e)