File: idltypes.mli

package info (click to toggle)
camlidl 1.12-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,592 kB
  • sloc: ml: 5,238; ansic: 945; cpp: 908; makefile: 358; xml: 213; sh: 74
file content (116 lines) | stat: -rw-r--r-- 3,682 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
(***********************************************************************)
(*                                                                     *)
(*                              CamlIDL                                *)
(*                                                                     *)
(*            Xavier Leroy, projet Cristal, INRIA Rocquencourt         *)
(*                                                                     *)
(*  Copyright 1999 Institut National de Recherche en Informatique et   *)
(*  en Automatique.  All rights reserved.  This file is distributed    *)
(*  under the terms of the GNU Lesser General Public License LGPL v2.1 *)
(*                                                                     *)
(***********************************************************************)

(* $Id: idltypes.mli,v 1.23 2002-01-16 16:15:31 xleroy Exp $ *)

type integer_kind =
    Int | Long | Hyper | Small | Short | Char
  | UInt | ULong | UHyper | USmall | UShort | UChar
  | SChar | Byte | Boolean

type integer_repr =
    Iunboxed | Inative | I32 | I64

type pointer_kind = Ref | Unique | Ptr | Ignore

type idltype =
    Type_int of integer_kind * integer_repr
  | Type_float
  | Type_double
  | Type_void
  | Type_pointer of pointer_kind * idltype
  | Type_array of array_attributes * idltype
  | Type_bigarray of bigarray_attributes * idltype
  | Type_struct of struct_decl
  | Type_union of union_decl * union_attributes
  | Type_enum of enum_decl * enum_attributes
  | Type_named of string * string (* module name, type name *)
  | Type_interface of string * string (* module name, interface name *)
  | Type_const of idltype

and array_attributes =
  { bound: lexpr option;
    size: lexpr option;
    length: lexpr option;
    is_string: bool;
    is_bytes: bool;
    maybe_null: bool;
    null_terminated: bool }

and bigarray_attributes =
  { dims: array_attributes list;
    fortran_layout: bool;
    mutable malloced: bool;
    bigarray_maybe_null: bool }

and union_attributes =
  { discriminant: lexpr }

and enum_attributes =
  { bitset: bool }

and field =
  { field_name: string; field_mlname: string; field_typ: idltype }

and union_case =
  { case_labels: string list; case_field: field option }

and enum_const =
  { const_name: string; const_val: lexpr option }

and struct_decl =
  { sd_name: string; sd_mod: string; mutable sd_stamp: int;
     mutable sd_fields: field list }

and union_decl =
  { ud_name: string; ud_mod: string; mutable ud_stamp: int;
    mutable ud_cases: union_case list }

and enum_decl =
  { en_name: string; en_mod: string; mutable en_stamp: int;
    mutable en_consts: enum_const list }

and lexpr =
    Expr_ident of string
  | Expr_int of int64
  | Expr_string of string
  | Expr_cond of lexpr * lexpr * lexpr
  | Expr_sequand of lexpr * lexpr
  | Expr_sequor of lexpr * lexpr
  | Expr_logor of lexpr * lexpr
  | Expr_logxor of lexpr * lexpr
  | Expr_logand of lexpr * lexpr
  | Expr_eq of lexpr * lexpr
  | Expr_ne of lexpr * lexpr
  | Expr_lt of lexpr * lexpr
  | Expr_gt of lexpr * lexpr
  | Expr_le of lexpr * lexpr
  | Expr_ge of lexpr * lexpr
  | Expr_lshift of lexpr * lexpr
  | Expr_rshift of lexpr * lexpr
  | Expr_rshift_unsigned of lexpr * lexpr
  | Expr_plus of lexpr * lexpr
  | Expr_minus of lexpr * lexpr
  | Expr_times of lexpr * lexpr
  | Expr_div of lexpr * lexpr
  | Expr_mod of lexpr * lexpr
  | Expr_neg of lexpr
  | Expr_lognot of lexpr
  | Expr_boolnot of lexpr
  | Expr_deref of lexpr
  | Expr_addressof of lexpr
  | Expr_cast of idltype * lexpr
  | Expr_sizeof of idltype
  | Expr_subscript of lexpr * lexpr
  | Expr_dereffield of lexpr * string
  | Expr_field of lexpr * string