Module C_abstree


module C_abstree: sig  end


type location = string * int

type properties = {
   p_loc : location;
}

type identifier = string

type union_flag =
| Struct
| Union


type binop =
| PbinTimes
| PbinDiv
| PbinPlus
| PbinMinus
| PbinModulo
| PbinLshift
| PbinRshift
| PbinLogAnd
| PbinLogOr
| PbinIntAnd
| PbinIntOr
| PbinIntXor
| PbinLessThan
| PbinLessEqual
| PbinGtrThan
| PbinGtrEqual
| PbinEqual
| PbinNotEqual


type unaryop =
| UnaryPlus
| UnaryMinus
| LogNot
| IntNot


type storage_class =
| Auto
| Register
| Inline
| Static
| Extern
| Typedef


type type_qualifier = C_types.type_qualifier =
| Const
| Volatile


type builtin_type_specifier =
| Void
| Char
| Short
| Int
| Long
| Float
| Double
| Signed
| Unsigned


type type_specifier =
| PtypespecBuiltin of builtin_type_specifier
| PtypespecAlias of identifier
| PtypespecEnumByDef of identifier option * enumerator list
| PtypespecEnumByName of identifier
| PtypespecStruct of union_flag * identifier option
* struct_declaration list option


type pointer_specifier =
| Pptrspec of type_qualifier list


type struct_declaration =
| PstructDecl of declaration_specifier list * struct_declarator list


type struct_declarator =
| PstructDeclNormal of declarator
| PstructDeclBitfield of declarator option * expr


type enumerator = identifier * expr option

type type_name =
| Ptypename of specifier_qualifier list * abstract_declarator


type specifier_qualifier = declaration_specifier

type program = declaration list

type declaration = {
   pdecl_t : declaration_desc;
   pdecl_pr : properties;
}

type declaration_desc =
| PdeclFunction of declaration_specifier list * declarator
* declaration list * statement
| PdeclVariable of declaration_specifier list * init_declarator list


type parameter_declaration =
| PpdeclConcrete of declaration_specifier list * declarator
| PpdeclAbstract of declaration_specifier list * abstract_declarator
| PpdeclVariant


type init_declarator =
| PinitDecl of declarator * c_initializer option


type c_initializer =
| PinitExp of expr
| PinitList of c_initializer list


type parameter_type = parameter_declaration

type abstract_declarator = declarator

type declarator =
| PdeclAnonymous
| PdeclIdent of identifier
| PdeclPointer of type_qualifier list * declarator
| PdeclArray of declarator * expr option
| PdeclFuncType of declarator * parameter_type list
| PdeclFuncIdent of declarator * identifier list


type declaration_specifier =
| StorageClass of storage_class
| TypeSpec of type_specifier
| TypeQualifier of type_qualifier


type statement = {
   pstmt_t : statement_desc;
   pstmt_pr : properties;
}

type statement_desc =
| PstmtExpr of expr option
| PstmtLabeled of identifier * statement
| PstmtCase_Labeled of expr * statement
| PstmtDefault_Labeled of statement
| PstmtCompound of declaration list * statement list
| PstmtIf of expr * statement * statement option
| PstmtSwitch of expr * statement
| PstmtWhile of expr * statement
| PstmtDoWhile of statement * expr
| PstmtFor of expr option * expr option * expr option
* statement
| PstmtGoto of identifier
| PstmtContinue
| PstmtBreak
| PstmtReturn of expr option


type expr = {
   pexp_t : expr_desc;
   pexp_pr : properties;
}

type expr_desc =
| PexpComma of expr * expr
| PexpAssign of expr * expr
| PexpBinAssign of binop * expr * expr
| PexpConditional of expr * expr * expr
| PexpBinExpr of binop * expr * expr
| PexpCast of type_name * expr
| PexpUnaryExpr of unaryop * expr
| PexpPreInc of expr
| PexpPreDec of expr
| PexpPostInc of expr
| PexpPostDec of expr
| PexpAddress of expr
| PexpPtrDeref of expr
| PexpSizeOfType of type_name
| PexpSizeOfExpr of expr
| PexpArrayRef of expr * expr
| PexpInvoke of expr * expr list
| PexpField of expr * identifier
| PexpPtrField of expr * identifier
| PexpConstant of c_constants
| PexpVar of identifier


type c_constants =
| PconstInteger of string
| PconstChar of string
| PconstFloat of string
| PconstString of string list