Module Flx_cil_cabs


module Flx_cil_cabs: sig .. end
This file was originally part of Hugues Casee's frontc 2.0, and has been * extensively changed since. ** ** 1.0 3.22.99 Hugues Cassé First version. ** 2.0 George Necula 12/12/00: Many extensions *


type cabsloc = {
   lineno : int;
   filename : string;
   byteno : int;
}
type lang_t = [ `C | `Cxx ] 

type typeSpecifier =
| Tvoid
| Tbool
| Tchar
| Tshort
| Tint
| Tlong
| Tint64
| Tfloat
| Tdouble
| Tsigned
| Tunsigned
| Tcomplex
| Timaginary
| Tnamed of string
| Tstruct of string * field_group list option * attribute list
| Tunion of string * field_group list option * attribute list
| Tenum of string * enum_item list option * attribute list
| TtypeofE of expression
| TtypeofT of specifier * decl_type

type storage =
| NO_STORAGE
| AUTO
| STATIC
| EXTERN
| REGISTER

type funspec =
| INLINE
| VIRTUAL
| EXPLICIT

type cvspec =
| CV_CONST
| CV_VOLATILE
| CV_RESTRICT

type spec_elem =
| SpecTypedef
| SpecCV of cvspec
| SpecAttr of attribute
| SpecStorage of storage
| SpecInline
| SpecType of typeSpecifier
| SpecPattern of string
type specifier = spec_elem list 

type decl_type =
| JUSTBASE
| PARENTYPE of attribute list * decl_type
* attribute list
| ARRAY of decl_type * attribute list
* expression
| PTR of attribute list * decl_type
| PROTO of decl_type * single_name list * bool
type name_group = specifier * name list 
type field_group = specifier *
(name * expression option) list
type init_name_group = specifier * init_name list 
type name = string * decl_type * attribute list *
cabsloc
type init_name = name * init_expression 
type single_name = specifier * name 
type enum_item = string * expression * cabsloc 
type base_spec = [ `Private of string
| `Private_virtual of string
| `Protected of string
| `Protected_virtual of string
| `Public of string
| `Public_virtual of string ]

type definition =
| FUNDEF of single_name * block * cabsloc
* cabsloc
| DECDEF of init_name_group * cabsloc
| TYPEDEF of name_group * cabsloc
| ONLYTYPEDEF of specifier * cabsloc
| GLOBASM of string * cabsloc
| PRAGMA of expression * cabsloc
| LINKAGE of string * cabsloc * definition list
| NAMESPACE of string * cabsloc * definition list
| TRANSFORMER of definition * definition list * cabsloc
| EXPRTRANSFORMER of expression * expression * cabsloc
type file = string * definition list 

type block = {
   blabels : string list;
   battrs : attribute list;
   bstmts : statement list;
}
type statement =
| NOP of cabsloc
| COMPUTATION of expression * cabsloc
| BLOCK of block * cabsloc
| SEQUENCE of statement * statement * cabsloc
| IF of expression * statement * statement
* cabsloc
| WHILE of expression * statement * cabsloc
| DOWHILE of expression * statement * cabsloc
| FOR of for_clause * expression * expression
* statement * cabsloc
| BREAK of cabsloc
| CONTINUE of cabsloc
| RETURN of expression * cabsloc
| SWITCH of expression * statement * cabsloc
| CASE of expression * statement * cabsloc
| CASERANGE of expression * expression * statement
* cabsloc
| DEFAULT of statement * cabsloc
| LABEL of string * statement * cabsloc
| GOTO of string * cabsloc
| COMPGOTO of expression * cabsloc
| DEFINITION of definition
| ASM of attribute list * string list
* (string * expression) list
* (string * expression) list * string list
* cabsloc
| TRY_EXCEPT of block * expression * block
* cabsloc
| TRY_FINALLY of block * block * cabsloc

type for_clause =
| FC_EXP of expression
| FC_DECL of definition

type binary_operator =
| ADD
| SUB
| MUL
| DIV
| MOD
| AND
| OR
| BAND
| BOR
| XOR
| SHL
| SHR
| EQ
| NE
| LT
| GT
| LE
| GE
| ASSIGN
| ADD_ASSIGN
| SUB_ASSIGN
| MUL_ASSIGN
| DIV_ASSIGN
| MOD_ASSIGN
| BAND_ASSIGN
| BOR_ASSIGN
| XOR_ASSIGN
| SHL_ASSIGN
| SHR_ASSIGN

type unary_operator =
| MINUS
| PLUS
| NOT
| BNOT
| MEMOF
| ADDROF
| PREINCR
| PREDECR
| POSINCR
| POSDECR

type expression =
| NOTHING
| UNARY of unary_operator * expression
| LABELADDR of string
| BINARY of binary_operator * expression
* expression
| QUESTION of expression * expression * expression
| CAST of (specifier * decl_type)
* init_expression
| CALL of expression * expression list
| COMMA of expression list
| CONSTANT of constant
| VARIABLE of string
| EXPR_SIZEOF of expression
| TYPE_SIZEOF of specifier * decl_type
| EXPR_ALIGNOF of expression
| TYPE_ALIGNOF of specifier * decl_type
| INDEX of expression * expression
| MEMBEROF of expression * string
| MEMBEROFPTR of expression * string
| GNU_BODY of block
| EXPR_PATTERN of string

type constant =
| CONST_INT of string
| CONST_FLOAT of string
| CONST_CHAR of int64 list
| CONST_WCHAR of int64 list
| CONST_STRING of string
| CONST_WSTRING of int64 list

type init_expression =
| NO_INIT
| SINGLE_INIT of expression
| COMPOUND_INIT of (initwhat * init_expression) list

type initwhat =
| NEXT_INIT
| INFIELD_INIT of string * initwhat
| ATINDEX_INIT of expression * initwhat
| ATINDEXRANGE_INIT of expression * expression
type attribute = string * expression list