Compare commits

..

3 Commits

Author SHA1 Message Date
Achim D. Brucker dd92984a2d Keeping cpp script for the moment. 2024-01-27 13:45:36 +00:00
Achim D. Brucker 99c79b50df
Ensure that umm_types.txt is saved relative to theory file. (#674)
Signed-off-by: Achim D. Brucker <adbrucker@0x5f.org>
2024-01-27 18:47:54 +11:00
Achim D. Brucker c71c31d163
If cpp_path is relative, make it relative to the current theory. (#676)
Signed-off-by: Achim D. Brucker <adbrucker@0x5f.org>
2024-01-27 18:41:18 +11:00
2 changed files with 8 additions and 2 deletions

View File

@ -480,8 +480,12 @@ fun mk_thy_types cse install thy = let
val thy = List.foldl rcddecls_phase0 thy sorted_structs
val abs_outfilnameN = (if Path.is_absolute (Path.explode outfilnameN)
then outfilnameN
else (Path.implode o Path.expand)
(Path.append (Resources.master_directory thy) (Path.explode outfilnameN)))
(* Yuck, sorry *)
val _ = gen_umm_types_file cse outfilnameN
val _ = gen_umm_types_file cse abs_outfilnameN
val arrays = List.filter (fn (_, sz) => sz <> 0)
(Binaryset.listItems (get_array_mentions cse))

View File

@ -145,7 +145,9 @@ fun get_Csyntax thy s = let
val cpp_option =
case Config.get_global thy cpp_path of
"" => NONE
| s => SOME s
| s => SOME (if Path.is_absolute (Path.explode s)
then s
else Path.implode (Path.append (Resources.master_directory thy) (Path.explode s)))
val cpp_error_count = Config.get_global thy report_cpp_errors
val (ast0, _) =
StrictCParser.parse