Commit e541d2ab authored by erwan's avatar erwan
Browse files

Update: get rid of the dependency on (the now deprecated) camlp4

parent c6245fe1
Pipeline #28158 passed with stages
in 4 minutes and 3 seconds
......@@ -26,7 +26,7 @@ Executable "gnuplot-rif"
Path: src
CompiledObject: native
MainIs: gnuplotRifMain.ml
BuildDepends: unix,str,camlp4,num
BuildDepends: unix,str,num
CompiledObject: native
Install: true
......@@ -34,7 +34,7 @@ Executable "gnuplot-rif"
Library lutils
XMETADescription: shared by Verimag/synchronous tools (lustre, lutin, rdbg).
Path: src/
BuildDepends: unix,str,camlp4,num
BuildDepends: unix,str,num
Modules: RifIO,Data,LocalGenlex,GnuplotRif,Mypervasives,Luciole,LutilsVersion
Install: true
XMETAEnable: true
......
# OASIS_START
# DO NOT EDIT (digest: 8b63ea904ea0002641021b2a51f5104d)
# DO NOT EDIT (digest: a6fe71ec6f7e55949318872a8fb432ff)
# Ignore VCS directories, you can use the same kind of rule outside
# OASIS_START/STOP if you want to exclude directories that contains
# useless stuff for the build process
......@@ -15,17 +15,13 @@ true: annot, bin_annot
"_darcs": -traverse
"_darcs": not_hygienic
# Executable gnuplot-rif
"src/gnuplotRifMain.native": package(camlp4)
"src/gnuplotRifMain.native": package(num)
"src/gnuplotRifMain.native": package(str)
"src/gnuplotRifMain.native": package(unix)
# Library lutils
"src/lutils.cmxs": use_lutils
<src/*.ml{,i,y}>: package(camlp4)
<src/*.ml{,i,y}>: package(num)
<src/*.ml{,i,y}>: package(str)
<src/*.ml{,i,y}>: package(unix)
# OASIS_STOP
"src/gnuplotRif.ml": syntax_camlp4o
(* setup.ml generated for the first time by OASIS v0.4.10 *)
(* OASIS_START *)
(* DO NOT EDIT (digest: f128264bf93931743806360988b84a47) *)
(* DO NOT EDIT (digest: 48246b9ed1cc28a3d4f0ab7c69c8b998) *)
(*
Regenerated by OASIS v0.4.11
Visit http://oasis.forge.ocamlcore.org for more information and
......@@ -6922,7 +6922,6 @@ let setup_t =
[
FindlibPackage ("unix", None);
FindlibPackage ("str", None);
FindlibPackage ("camlp4", None);
FindlibPackage ("num", None)
];
bs_build_tools = [ExternalTool "ocamlbuild"];
......@@ -7062,7 +7061,6 @@ let setup_t =
[
FindlibPackage ("unix", None);
FindlibPackage ("str", None);
FindlibPackage ("camlp4", None);
FindlibPackage ("num", None)
];
bs_build_tools = [ExternalTool "ocamlbuild"];
......@@ -7272,7 +7270,7 @@ let setup_t =
};
oasis_fn = Some "_oasis";
oasis_version = "0.4.11";
oasis_digest = Some "\139Q\168\030\152\206\146\168C\191\2413\0035\175A";
oasis_digest = Some "/D\214\017Q\214[\156\230i\229\231\236\219Y}";
oasis_exec = None;
oasis_setup_args = [];
setup_update = false
......@@ -7280,7 +7278,7 @@ let setup_t =
let setup () = BaseSetup.setup setup_t;;
# 7284 "setup.ml"
# 7282 "setup.ml"
let setup_t = BaseCompat.Compat_0_4.adapt_setup_t setup_t
open BaseCompat.Compat_0_4
(* OASIS_STOP *)
......
# OASIS_START
# DO NOT EDIT (digest: 5e767c3e21ba38642f87e3237ee489f0)
# DO NOT EDIT (digest: 43c4a4fd5905a87d0ca11b4ec54c7cea)
version = "1.49.3"
description = "shared by Verimag/synchronous tools (lustre, lutin, rdbg)."
requires = "unix str camlp4 num"
requires = "unix str num"
archive(byte) = "lutils.cma"
archive(byte, plugin) = "lutils.cma"
archive(native) = "lutils.cmxa"
......
(* Time-stamp: <modified the 27/05/2019 (at 14:03) by Erwan Jahier> *)
(* Time-stamp: <modified the 21/08/2019 (at 17:24) by Erwan Jahier> *)
(*-----------------------------------------------------------------------
** This file may only be copied under the terms of the CeCill
** Public License
......@@ -98,55 +98,56 @@ let (get_var_types : string -> vtypes_tbl) =
s_ref := s;
pos_ref := pos;
let _ = debug_msg ("\t aux: "^(string_of_int (Stream.count s))^" pos="^
(string_of_int pos)^" ; token='"^ (ftok2str s) ^"'")
(string_of_int pos)^" ; token='"^ (ftok2str s) ^"'")
in
match s with parser
| [< 'String(id) >] -> aux2 pos id s
| [< 'Ident(_) >] -> aux pos s
| [< 'Int(_) >] -> aux pos s
| [< 'Float(_) >] -> aux pos s
| [< 'Kwd("inputs") >] -> is_input:=true;aux pos s
| [< 'Kwd("outputs") >] -> is_input:=false;aux pos s
| [< 'Kwd(_) >] -> aux pos s
| [< 'Char(_) >] -> aux pos s
match Stream.next s with
| String(id) -> aux2 pos id s
| Ident(_) -> aux pos s
| Int(_) -> aux pos s
| Float(_) -> aux pos s
| Kwd("inputs") -> is_input:=true;aux pos s
| Kwd("outputs") -> is_input:=false;aux pos s
| Kwd(_) -> aux pos s
| Char(_) -> aux pos s
and aux2 pos id s = (* aux2 looks for the next ":" *)
let _ = debug_msg ("aux2: "^(string_of_int (Stream.count s))^" pos="^
(string_of_int pos)^" ; token='"^ (ftok2str s) ^"'\n") in
match s with parser
| [< 'Kwd( ":") >] -> aux3 pos id s
| [< 'Ident(_) >] -> aux pos s
| [< 'Int(_) >] -> aux pos s
| [< 'Float(_) >] -> aux pos s
| [< 'Kwd(_) >] -> aux pos s
| [< 'Char(_) >] -> aux pos s
(string_of_int pos)^" ; token='"^ (ftok2str s) ^"'\n") in
match Stream.next s with
| Kwd( ":") -> aux3 pos id s
| Ident(_) -> aux pos s
| Int(_) -> aux pos s
| Float(_) -> aux pos s
| Kwd(_) -> aux pos s
| Char(_) -> aux pos s
| String(_) -> aux pos s
and aux3 pos id s = (* aux3 looks for the next ident *)
let _ = debug_msg ("aux3: "^(string_of_int (Stream.count s))^" pos="^
(string_of_int pos)^" ; token='"^(ftok2str s)^"'\n") in
match s with parser
| [< 'Ident(t)>] -> tbl:=(id, (t, pos, !is_input))::!tbl; aux (pos+1) s
| [< 'Kwd(_) >] -> aux pos s
| [< 'Int(_) >] -> aux pos s
| [< 'Float(_) >] -> aux pos s
| [< 'String(_) >] -> aux pos s
| [< 'Char(_) >] -> aux pos s
(string_of_int pos)^" ; token='"^(ftok2str s)^"'\n") in
match Stream.next s with
| Ident(t)-> tbl:=(id, (t, pos, !is_input))::!tbl; aux (pos+1) s
| Kwd(_) -> aux pos s
| Int(_) -> aux pos s
| Float(_) -> aux pos s
| String(_) -> aux pos s
| Char(_) -> aux pos s
in
let rec aux_ignore_error pos s =
try aux pos s with
| Stream.Error _ ->
if !verbose then (
output_string stderr ("ignore (harmless?) stream errors at pos "^
(string_of_int (Stream.count s))^" in gnuplot-rif.\n");
flush stderr);
aux_ignore_error !pos_ref !s_ref
if !verbose then (
output_string stderr ("ignore (harmless?) stream errors at pos "^
(string_of_int (Stream.count s))^" in gnuplot-rif.\n");
flush stderr);
aux_ignore_error !pos_ref !s_ref
in
try
aux_ignore_error 0 !s_ref
with
| Stream.Failure -> List.rev !tbl
| Stream.Error(msg) ->
print_string ("gnuplot-rif:"^msg^"\n"); flush stdout;
List.rev !tbl
try
aux_ignore_error 0 !s_ref
with
| Stream.Failure -> List.rev !tbl
| Stream.Error(msg) ->
print_string ("gnuplot-rif:"^msg^"\n"); flush stdout;
List.rev !tbl
let ressource_file_usage = "
gnuplot-rif first reads the content of a file named .gnuplot-rif in the
......
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