Skip to content
Snippets Groups Projects
Commit 3116ac3e authored by Erwan Jahier's avatar Erwan Jahier
Browse files

Fix a bug: the main node could not be named main...

parent b3699ebc
No related branches found
No related tags found
No related merge requests found
...@@ -79,7 +79,14 @@ test: $(RESULT) ...@@ -79,7 +79,14 @@ test: $(RESULT)
utest: $(RESULT) utest: $(RESULT)
cd test; make utest cd test; make utest
diff:
cd ..; make diff
cia:
cd ..; make cia
ci:
cd ..; make ci
# Specific rule (version) # Specific rule (version)
......
...@@ -96,9 +96,6 @@ lazycompiler.ml: ...@@ -96,9 +96,6 @@ lazycompiler.ml:
*** facile *** facile
* bug dans main.ml: le program principal ne peut pas s'appeller "main" à cause
du (stupide) test que je fais dans set_infile...
* Verifier que les test de map_red couvre les cas tordus. * Verifier que les test de map_red couvre les cas tordus.
* BUG dans test/should_work/NONREG/Int.lus * BUG dans test/should_work/NONREG/Int.lus
......
(** Time-stamp: <modified the 30/01/2008 (at 16:18) by Erwan Jahier> *) (** Time-stamp: <modified the 20/05/2008 (at 12:07) by Erwan Jahier> *)
(** Some global variables *) (** Some global variables *)
...@@ -14,7 +14,7 @@ let _lus2lic_ARGS = { ...@@ -14,7 +14,7 @@ let _lus2lic_ARGS = {
outfile = "" ; outfile = "" ;
infiles = [] ; infiles = [] ;
current_file = ""; current_file = "";
main_node = "main"; main_node = "";
compile_all_items = false compile_all_items = false
} }
......
(** Time-stamp: <modified the 20/05/2008 (at 12:04) by Erwan Jahier> *) (** Time-stamp: <modified the 20/05/2008 (at 12:08) by Erwan Jahier> *)
(** Here follows a description of the different modules used by this lus2lic compiler. (** Here follows a description of the different modules used by this lus2lic compiler.
...@@ -62,7 +62,7 @@ let print_version = function (x: unit) -> ( ...@@ -62,7 +62,7 @@ let print_version = function (x: unit) -> (
) )
let rec set_infile = function (x:string) -> ( let rec set_infile = function (x:string) -> (
if ( _lus2lic_ARGS.main_node = "main" ) then ( if ( _lus2lic_ARGS.main_node = "" ) then (
(* default node name = file name *) (* default node name = file name *)
try try
_lus2lic_ARGS.main_node <- Filename.chop_extension (Filename.basename x) _lus2lic_ARGS.main_node <- Filename.chop_extension (Filename.basename x)
...@@ -74,10 +74,10 @@ let rec set_infile = function (x:string) -> ( ...@@ -74,10 +74,10 @@ let rec set_infile = function (x:string) -> (
) )
and arg_list = [ and arg_list = [
( "-version", Arg.Unit(function x -> print_version () ; exit 0), ( "-version", Arg.Unit(fun x -> print_version () ; exit 0),
" print the current version then exit" " print the current version then exit"
); );
( "-o", Arg.String(function x -> _lus2lic_ARGS.outfile <- x), ( "-o", Arg.String(fun x -> _lus2lic_ARGS.outfile <- x),
" <file name> set the output file name" " <file name> set the output file name"
); );
( "-n", Arg.String(fun x -> _lus2lic_ARGS.main_node <- x), ( "-n", Arg.String(fun x -> _lus2lic_ARGS.main_node <- x),
...@@ -88,10 +88,10 @@ and arg_list = [ ...@@ -88,10 +88,10 @@ and arg_list = [
" compile all items of the program" " compile all items of the program"
); );
( "-v", Arg.Unit (function vl -> Verbose.set_level 1 ), ( "-v", Arg.Unit (fun vl -> Verbose.set_level 1 ),
" set verbose mode on (i.e., verbose level = 1)" " set verbose mode on (i.e., verbose level = 1)"
); );
( "-vl", Arg.Int(function vl -> Verbose.set_level vl ), ( "-vl", Arg.Int(fun vl -> Verbose.set_level vl ),
" <int> set verbose level" " <int> set verbose level"
) )
] ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment