aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Readconfig.mli
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-02-19 17:25:29 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2015-02-19 17:25:29 +0100
commit8b56dc911f1042a0954140c61d302d8be9a9def7 (patch)
treed0a538c4ccee557195b4de7df5b44d4a01dd5f5a /lib/Readconfig.mli
parent959542e4cf126c4f46f00c764b5365804de637c6 (diff)
parente51ffb6c1d9411515facc5e97a4e8dba5d8b55ab (diff)
downloadcompcert-8b56dc911f1042a0954140c61d302d8be9a9def7.tar.gz
compcert-8b56dc911f1042a0954140c61d302d8be9a9def7.zip
Merge branch 'no-shell' of github.com:AbsInt/CompCert into compcert_windows
Diffstat (limited to 'lib/Readconfig.mli')
-rw-r--r--lib/Readconfig.mli39
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/Readconfig.mli b/lib/Readconfig.mli
new file mode 100644
index 00000000..c81e7786
--- /dev/null
+++ b/lib/Readconfig.mli
@@ -0,0 +1,39 @@
+(* *********************************************************************)
+(* *)
+(* The Compcert verified compiler *)
+(* *)
+(* Xavier Leroy, INRIA Paris-Rocquencourt *)
+(* *)
+(* Copyright Institut National de Recherche en Informatique et en *)
+(* Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the GNU General Public License as published by *)
+(* the Free Software Foundation, either version 2 of the License, or *)
+(* (at your option) any later version. This file is also distributed *)
+(* under the terms of the INRIA Non-Commercial License Agreement. *)
+(* *)
+(* *********************************************************************)
+
+(* Reading configuration files *)
+
+(* The format of a configuration file is a list of lines
+ variable=value
+ The "value" on the right hand side is a list of whitespace-separated
+ words. Quoting is honored with the same rules as POSIX shell:
+ \<newline> for multi-line values
+ single quotes no escapes within
+ double quotes \$ \` \<doublequote> \\ \<newline> as escapes
+ Finally, lines starting with '#' are comments.
+*)
+
+val read_config_file: string -> unit
+ (** Read (key, value) pairs from the given file name. Raise [Error]
+ if file is ill-formed. *)
+
+val key_val: string -> string list option
+ (** [key_val k] returns the value associated with key [k], if any.
+ Otherwise, [None] is returned. *)
+
+exception Error of string * int * string
+ (** Raised in case of error.
+ First argument is file name, second argument is line number,
+ third argument is an explanation of the error. *)