Commit 0505f8c5 authored by POGODALLA Sylvain's avatar POGODALLA Sylvain

Minor bug fixes and log removal

parent 246b61d7
......@@ -131,9 +131,9 @@ let type_error_to_string = function
| Linear_var s ->
Printf.sprintf "Var \"%s\" is supposed to be linear" s
| Other -> "Not yet implemented"
| Is_Used (s1,s2) -> Printf.sprintf "The type of this expression is \"%s\" but is used with type \"%s\"" s1 s2
| Is_Used (s1,s2) -> Printf.sprintf "The type of this expression is \"%s\" but is used with type %s" s1 s2
| Two_occurrences_of_linear_variable (s,e) -> Printf.sprintf "This linear variable was already used: %s" (compute_comment_for_position s e)
| Non_empty_context (x,(s,e),funct_pos,funct_type) -> Printf.sprintf "This term contains a free linear variable \"%s\" at %s and is argument the term of type %s at %s )" x (compute_comment_for_position s e) funct_type (compute_comment_for_position (fst funct_pos) (snd funct_pos))
| Non_empty_context (x,(s,e),funct_pos,funct_type) -> Printf.sprintf "This term contains a free linear variable \"%s\" at %s and is argument the term of type \"%s\" at %s )" x (compute_comment_for_position s e) funct_type (compute_comment_for_position (fst funct_pos) (snd funct_pos))
| Not_normal -> "This term is not in normal form"
| Vacuous_abstraction (x,(s,e)) -> Printf.sprintf "This linear variable \"%s\" is abstracted over but not used in term %s" x (compute_comment_for_position s e)
......
......@@ -60,7 +60,7 @@
let newline = ('\010' | '\013' | "\013\010")
let letter = ['a'-'z' 'A'-'Z']
let digit = ['0'-'9']
let string = (letter|digit|'_')*'\''?
let string = (letter|digit|'_')*'\''*
let symbol = ['|' '!' '"' '#' '$' '%' '&' '\'' '*' '+' '-' '/' '<' '>' '?' '@' '[' '\\' ']' '^' '`' '{' '}' '~' ]
......
......@@ -61,8 +61,8 @@ CREATE_HELP
zzcommands :
| EOII @{let e,f = dyp.last_local_data in
let () = Printf.printf "End of parsing, getting:\n%!" in
let () = F.list e in
(* let () = Printf.printf "End of parsing, getting:\n%!" in
let () = F.list e in *)
(e,[Local_data (e,f)])}
| command[c] ...@{let e,f = (dyp.last_local_data) in
let e' =
......@@ -153,8 +153,8 @@ CREATE_HELP
try (fst (List.hd (zzcommands ~global_data:(F.should_wait ()) ~local_data:(env,parse_file) Script_lexer.lexer lexbuf))) with
| Dyp.Syntax_error -> raise (Error.dyp_error lexbuf filename) in
let () = Printf.printf "Done.\n%!" in
let () = Printf.printf "I parsed the script file and now:\n%!" in
let () = F.list new_env in
(* let () = Printf.printf "I parsed the script file and now:\n%!" in
let () = F.list new_env in *)
new_env
with
| Error.Error e ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment