package goblint-cil

  1. Overview
  2. Docs

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 = {
  1. lineno : int;
  2. filename : string;
  3. byteno : int;
  4. columnno : int;
  5. ident : int;
  6. endLineno : int;
  7. endByteno : int;
  8. endColumnno : int;
}
type typeSpecifier =
  1. | Tvoid
  2. | Tchar
  3. | Tbool
  4. | Tshort
  5. | Tint
  6. | Tlong
  7. | Tint64
  8. | Tint128
  9. | Tfloat
  10. | Tfloat32
  11. | Tfloat64
  12. | Tfloat128
  13. | Tfloat32x
  14. | Tfloat64x
  15. | Tdouble
  16. | Tsigned
  17. | Tsizet
  18. | Tunsigned
  19. | Tnamed of string
  20. | Tstruct of string * field_group list option * attribute list
  21. | Tunion of string * field_group list option * attribute list
  22. | Tenum of string * enum_item list option * attribute list
  23. | TtypeofE of expression
  24. | TtypeofT of specifier * decl_type
  25. | Tdefault
    (*

    "default" in generic associations

    *)
  26. | Tauto
    (*

    GCC __auto_type

    *)
and storage =
  1. | NO_STORAGE
  2. | AUTO
  3. | STATIC
  4. | EXTERN
  5. | REGISTER
and funspec =
  1. | INLINE
  2. | VIRTUAL
  3. | EXPLICIT
and cvspec =
  1. | CV_CONST
  2. | CV_VOLATILE
  3. | CV_RESTRICT
  4. | CV_COMPLEX
  5. | CV_ATOMIC
and spec_elem =
  1. | SpecTypedef
  2. | SpecCV of cvspec
  3. | SpecAttr of attribute
  4. | SpecStorage of storage
  5. | SpecInline
  6. | SpecNoreturn
  7. | SpecType of typeSpecifier
  8. | SpecPattern of string
and specifier = spec_elem list
and decl_type =
  1. | JUSTBASE
  2. | PARENTYPE of attribute list * decl_type * attribute list
  3. | ARRAY of decl_type * attribute list * expression
  4. | PTR of attribute list * decl_type
  5. | PROTO of decl_type * single_name list * bool
and name_group = specifier * name list
and field_group = specifier * (name * expression option) list
and init_name_group = specifier * init_name list
and name = string * decl_type * attribute list * cabsloc
and init_name = name * init_expression
and single_name = specifier * name
and enum_item = string * expression * cabsloc
and definition =
  1. | FUNDEF of single_name * block * cabsloc * cabsloc
  2. | DECDEF of init_name_group * cabsloc
  3. | TYPEDEF of name_group * cabsloc
  4. | ONLYTYPEDEF of specifier * cabsloc
  5. | GLOBASM of string * cabsloc
  6. | PRAGMA of expression * cabsloc
  7. | LINKAGE of string * cabsloc * definition list
  8. | TRANSFORMER of definition * definition list * cabsloc
  9. | EXPRTRANSFORMER of expression * expression * cabsloc
  10. | STATIC_ASSERT of expression * string * cabsloc
and file = string * definition list
and block = {
  1. blabels : string list;
  2. battrs : attribute list;
  3. bstmts : statement list;
}
and asm_details = {
  1. aoutputs : (string option * string * expression) list;
  2. ainputs : (string option * string * expression) list;
  3. aclobbers : string list;
}
and statement =
  1. | NOP of cabsloc
  2. | COMPUTATION of expression * cabsloc
  3. | BLOCK of block * cabsloc
  4. | SEQUENCE of statement * statement * cabsloc
  5. | IF of expression * statement * statement * cabsloc * cabsloc
  6. | WHILE of expression * statement * cabsloc * cabsloc
  7. | DOWHILE of expression * statement * cabsloc * cabsloc
  8. | FOR of for_clause * expression * expression * statement * cabsloc * cabsloc
  9. | BREAK of cabsloc
  10. | CONTINUE of cabsloc
  11. | RETURN of expression * cabsloc
  12. | SWITCH of expression * statement * cabsloc * cabsloc
  13. | CASE of expression * statement * cabsloc * cabsloc
  14. | CASERANGE of expression * expression * statement * cabsloc * cabsloc
  15. | DEFAULT of statement * cabsloc * cabsloc
  16. | LABEL of string * statement * cabsloc
  17. | GOTO of string * cabsloc
  18. | COMPGOTO of expression * cabsloc
  19. | DEFINITION of definition
  20. | ASM of attribute list * string list * asm_details option * cabsloc
and for_clause =
  1. | FC_EXP of expression
  2. | FC_DECL of definition
and binary_operator =
  1. | ADD
  2. | SUB
  3. | MUL
  4. | DIV
  5. | MOD
  6. | AND
  7. | OR
  8. | BAND
  9. | BOR
  10. | XOR
  11. | SHL
  12. | SHR
  13. | EQ
  14. | NE
  15. | LT
  16. | GT
  17. | LE
  18. | GE
  19. | ASSIGN
  20. | ADD_ASSIGN
  21. | SUB_ASSIGN
  22. | MUL_ASSIGN
  23. | DIV_ASSIGN
  24. | MOD_ASSIGN
  25. | BAND_ASSIGN
  26. | BOR_ASSIGN
  27. | XOR_ASSIGN
  28. | SHL_ASSIGN
  29. | SHR_ASSIGN
and unary_operator =
  1. | MINUS
  2. | PLUS
  3. | NOT
  4. | BNOT
  5. | MEMOF
  6. | ADDROF
  7. | PREINCR
  8. | PREDECR
  9. | POSINCR
  10. | POSDECR
and expression =
  1. | NOTHING
  2. | UNARY of unary_operator * expression
  3. | LABELADDR of string
  4. | BINARY of binary_operator * expression * expression
  5. | QUESTION of expression * expression * expression
  6. | CAST of specifier * decl_type * init_expression
  7. | CALL of expression * expression list
  8. | COMMA of expression list
  9. | CONSTANT of constant
  10. | PAREN of expression
  11. | VARIABLE of string
  12. | REAL of expression
  13. | IMAG of expression
  14. | CLASSIFYTYPE of expression
  15. | EXPR_SIZEOF of expression
  16. | TYPE_SIZEOF of specifier * decl_type
  17. | EXPR_ALIGNOF of expression
  18. | TYPE_ALIGNOF of specifier * decl_type
  19. | INDEX of expression * expression
  20. | MEMBEROF of expression * string
  21. | MEMBEROFPTR of expression * string
  22. | GNU_BODY of block
  23. | EXPR_PATTERN of string
  24. | GENERIC of expression * ((specifier * decl_type) * expression) list
and constant =
  1. | CONST_INT of string
  2. | CONST_FLOAT of string
  3. | CONST_COMPLEX of string
  4. | CONST_CHAR of int64 list
  5. | CONST_WCHAR of int64 list * wchar_type
  6. | CONST_STRING of string * encoding
  7. | CONST_WSTRING of int64 list * wchar_type
and wchar_type =
  1. | WCHAR_T
  2. | CHAR16_T
  3. | CHAR32_T
  4. | CHAR
  5. | CHAR_UTF8
and encoding =
  1. | NO_ENCODING
  2. | UTF8
and init_expression =
  1. | NO_INIT
  2. | SINGLE_INIT of expression
  3. | COMPOUND_INIT of (initwhat * init_expression) list
and initwhat =
  1. | NEXT_INIT
  2. | INFIELD_INIT of string * initwhat
  3. | ATINDEX_INIT of expression * initwhat
  4. | ATINDEXRANGE_INIT of expression * expression
and attribute = string * expression list
OCaml

Innovation. Community. Security.