2 * Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
3 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
4 * This file is part of Coccinelle.
6 * Coccinelle is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, according to version 2 of the License.
10 * Coccinelle is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
18 * The authors reserve the right to distribute this or future versions of
19 * Coccinelle under other licenses.
23 type inherited
= bool (* true if inherited *)
24 type keep_binding
= Unitary
(* need no info *)
25 | Nonunitary
(* need an env entry *) | Saved
(* need a witness *)
28 ConstVol
of const_vol
* typeC
29 | BaseType
of baseType
30 | SignedT
of sign
* typeC
option
32 | FunctionPointer
of typeC
(* only return type *)
33 | Array
of typeC
(* drop size info *)
34 | EnumName
of bool (* true if a metaId *) * string
35 | StructUnionName
of structUnion
* bool (* true if type metavar *) * string
37 | MetaType
of (string * string) * keep_binding
* inherited
38 | Unknown
(* for metavariables of type expression *^* *)
40 and tagged_string
= string
42 and baseType
= VoidType
| CharType
| ShortType
| IntType
| DoubleType
43 | FloatType
| LongType
| LongLongType
| BoolType
45 and structUnion
= Struct
| Union
47 and sign
= Signed
| Unsigned
49 and const_vol
= Const
| Volatile
51 val type2c
: typeC
-> string
52 val typeC
: typeC
-> unit
54 val compatible
: typeC
-> typeC
option -> bool