aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Env.mli
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-03-03 10:22:27 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-03-03 10:22:27 +0000
commit891377ce1962cdb31357d6580d6546ec22df2b4f (patch)
tree4ff7c38749cc7a4c1af411c5aa3eb7225c4ae6a1 /cparser/Env.mli
parent018edf2d81bf94197892cf1df221f7eeac1f96f6 (diff)
downloadcompcert-kvx-891377ce1962cdb31357d6580d6546ec22df2b4f.tar.gz
compcert-kvx-891377ce1962cdb31357d6580d6546ec22df2b4f.zip
Switching to the new C parser/elaborator/simplifier
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1269 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cparser/Env.mli')
-rw-r--r--cparser/Env.mli69
1 files changed, 69 insertions, 0 deletions
diff --git a/cparser/Env.mli b/cparser/Env.mli
new file mode 100644
index 00000000..be9d6e85
--- /dev/null
+++ b/cparser/Env.mli
@@ -0,0 +1,69 @@
+(* *********************************************************************)
+(* *)
+(* 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. *)
+(* *)
+(* *********************************************************************)
+
+type error =
+ Unbound_identifier of string
+ | Unbound_tag of string * string
+ | Tag_mismatch of string * string * string
+ | Unbound_typedef of string
+ | No_member of string * string * string
+val error_message : error -> string
+exception Error of error
+
+val fresh_ident : string -> C.ident
+
+type composite_info = {
+ ci_kind : C.struct_or_union;
+ ci_incomplete : bool;
+ ci_members : C.field list;
+}
+
+type ident_info = II_ident of C.storage * C.typ | II_enum of int64
+
+type typedef_info = C.typ
+
+type t
+
+val empty : t
+
+val new_scope : t -> t
+val in_current_scope : t -> C.ident -> bool
+
+val lookup_ident : t -> string -> C.ident * ident_info
+val lookup_tag : t -> string -> C.ident * composite_info
+val lookup_struct : t -> string -> C.ident * composite_info
+val lookup_union : t -> string -> C.ident * composite_info
+val lookup_composite : t -> string -> (C.ident * composite_info) option
+val lookup_typedef : t -> string -> C.ident * typedef_info
+
+val ident_is_bound : t -> string -> bool
+
+val find_ident : t -> C.ident -> ident_info
+val find_tag : t -> C.ident -> composite_info
+val find_struct : t -> C.ident -> composite_info
+val find_union : t -> C.ident -> composite_info
+val find_member : C.field list -> string -> C.field
+val find_struct_member : t -> C.ident * string -> C.field
+val find_union_member : t -> C.ident * string -> C.field
+val find_typedef : t -> C.ident -> typedef_info
+
+val enter_ident : t -> string -> C.storage -> C.typ -> C.ident * t
+val enter_composite : t -> string -> composite_info -> C.ident * t
+val enter_enum_item : t -> string -> int64 -> C.ident * t
+val enter_typedef : t -> string -> typedef_info -> C.ident * t
+
+val add_ident : t -> C.ident -> C.storage -> C.typ -> t
+val add_composite : t -> C.ident -> composite_info -> t
+val add_typedef : t -> C.ident -> typedef_info -> t