package pfff

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tok = Parse_info.t
and 'a wrap = 'a * tok list
and 'a wrap2 = 'a * tok
and 'a paren = tok * 'a * tok
and 'a brace = tok * 'a * tok
and 'a bracket = tok * 'a * tok
and 'a angle = tok * 'a * tok
and 'a comma_list = 'a wrap list
and 'a comma_list2 = ('a, tok) Common.either list
type name = tok option * (qualifier * tok) list * ident
and ident =
  1. | IdIdent of simple_ident
  2. | IdTemplateId of simple_ident * template_arguments
  3. | IdDestructor of tok * simple_ident
  4. | IdOperator of tok * operator * tok list
  5. | IdConverter of tok * fullType
and simple_ident = string wrap2
and template_arguments = template_argument comma_list angle
and template_argument = (fullType, expression) Common.either
and qualifier =
  1. | QClassname of simple_ident
  2. | QTemplateId of simple_ident * template_arguments
and class_name = name
and namespace_name = name
and typedef_name = name
and enum_name = name
and ident_name = name
and fullType = typeQualifier * typeC
and typeC = typeCbis wrap
and typeCbis =
  1. | BaseType of baseType
  2. | Pointer of fullType
  3. | Reference of fullType
  4. | Array of constExpression option bracket * fullType
  5. | FunctionType of functionType
  6. | EnumName of tok * simple_ident
  7. | StructUnionName of structUnion wrap2 * simple_ident
  8. | TypeName of name
  9. | TypenameKwd of tok * name
  10. | TypeOf of tok * (fullType, expression) Common.either paren
  11. | EnumDef of enum_definition
  12. | StructDef of class_definition
  13. | ParenType of fullType paren
and baseType =
  1. | Void
  2. | IntType of intType
  3. | FloatType of floatType
and intType =
  1. | CChar
  2. | Si of signed
  3. | CBool
  4. | WChar_t
and signed = sign * base
and base =
  1. | CChar2
  2. | CShort
  3. | CInt
  4. | CLong
  5. | CLongLong
and sign =
  1. | Signed
  2. | UnSigned
and floatType =
  1. | CFloat
  2. | CDouble
  3. | CLongDouble
and typeQualifier = {
  1. const : tok option;
  2. volatile : tok option;
}
and expression = expressionbis wrap
and expressionbis =
  1. | Id of name * ident_info
  2. | C of constant
  3. | Call of expression * argument comma_list paren
  4. | CondExpr of expression * expression option * expression
  5. | Sequence of expression * expression
  6. | Assignment of expression * assignOp * expression
  7. | Postfix of expression * fixOp
  8. | Infix of expression * fixOp
  9. | Unary of expression * unaryOp
  10. | Binary of expression * binaryOp * expression
  11. | ArrayAccess of expression * expression bracket
  12. | RecordAccess of expression * name
  13. | RecordPtAccess of expression * name
  14. | RecordStarAccess of expression * expression
  15. | RecordPtStarAccess of expression * expression
  16. | SizeOfExpr of tok * expression
  17. | SizeOfType of tok * fullType paren
  18. | Cast of fullType paren * expression
  19. | StatementExpr of compound paren
  20. | GccConstructor of fullType paren * initialiser comma_list brace
  21. | This of tok
  22. | ConstructedObject of fullType * argument comma_list paren
  23. | TypeId of tok * (fullType, expression) Common.either paren
  24. | CplusplusCast of cast_operator wrap2 * fullType angle * expression paren
  25. | New of tok option * tok * argument comma_list paren option * fullType * argument comma_list paren option
  26. | Delete of tok option * expression
  27. | DeleteArray of tok option * expression
  28. | Throw of expression option
  29. | ParenExpr of expression paren
  30. | Ellipses of tok
  31. | ExprTodo
and ident_info = {
  1. mutable i_scope : Scope_code.t;
}
and weird_argument =
  1. | ArgType of fullType
  2. | ArgAction of action_macro
and action_macro =
  1. | ActMisc of tok list
and constant =
  1. | Int of string
  2. | Float of string * floatType
  3. | Char of string * isWchar
  4. | String of string * isWchar
  5. | MultiString
  6. | Bool of bool
and isWchar =
  1. | IsWchar
  2. | IsChar
and unaryOp =
  1. | GetRef
  2. | DeRef
  3. | GetRefLabel
  4. | UnPlus
  5. | UnMinus
  6. | Tilde
  7. | Not
and assignOp =
  1. | SimpleAssign
  2. | OpAssign of arithOp
and fixOp =
  1. | Dec
  2. | Inc
and binaryOp =
  1. | Arith of arithOp
  2. | Logical of logicalOp
and arithOp =
  1. | Plus
  2. | Minus
  3. | Mul
  4. | Div
  5. | Mod
  6. | DecLeft
  7. | DecRight
  8. | And
  9. | Or
  10. | Xor
and logicalOp =
  1. | Inf
  2. | Sup
  3. | InfEq
  4. | SupEq
  5. | Eq
  6. | NotEq
  7. | AndLog
  8. | OrLog
and ptrOp =
  1. | PtrStarOp
  2. | PtrOp
and allocOp =
  1. | NewOp
  2. | DeleteOp
  3. | NewArrayOp
  4. | DeleteArrayOp
and accessop =
  1. | ParenOp
  2. | ArrayOp
and operator =
  1. | BinaryOp of binaryOp
  2. | AssignOp of assignOp
  3. | FixOp of fixOp
  4. | PtrOpOp of ptrOp
  5. | AccessOp of accessop
  6. | AllocOp of allocOp
  7. | UnaryTildeOp
  8. | UnaryNotOp
  9. | CommaOp
and cast_operator =
  1. | Static_cast
  2. | Dynamic_cast
  3. | Const_cast
  4. | Reinterpret_cast
and constExpression = expression
and statement = statementbis wrap
and statementbis =
  1. | Compound of compound
  2. | ExprStatement of exprStatement
  3. | Labeled of labeled
  4. | Selection of selection
  5. | Iteration of iteration
  6. | Jump of jump
  7. | DeclStmt of block_declaration
  8. | Try of tok * compound * handler list
  9. | NestedFunc of func_definition
  10. | MacroStmt
  11. | StmtTodo
and compound = statement_sequencable list brace
and exprStatement = expression option
and labeled =
  1. | Label of string * statement
  2. | Case of expression * statement
  3. | CaseRange of expression * expression * statement
  4. | Default of statement
and selection =
  1. | If of tok * expression paren * statement * tok option * statement
  2. | Switch of tok * expression paren * statement
and iteration =
  1. | While of tok * expression paren * statement
  2. | DoWhile of tok * statement * tok * expression paren * tok
  3. | For of tok * (exprStatement wrap * exprStatement wrap * exprStatement wrap) paren * statement
  4. | MacroIteration of simple_ident * argument comma_list paren * statement
and jump =
  1. | Goto of string
  2. | Continue
  3. | Break
  4. | Return
  5. | ReturnExpr of expression
  6. | GotoComputed of expression
and exception_declaration =
  1. | ExnDeclEllipsis of tok
  2. | ExnDecl of parameter
and statement_sequencable =
  1. | StmtElem of statement
  2. | CppDirectiveStmt of cpp_directive
  3. | IfdefStmt of ifdef_directive
and block_declaration =
  1. | DeclList of onedecl comma_list * tok
  2. | MacroDecl of tok list * simple_ident * argument comma_list paren * tok
  3. | UsingDecl of tok * name * tok
  4. | UsingDirective of tok * tok * namespace_name * tok
  5. | NameSpaceAlias of tok * simple_ident * tok * namespace_name * tok
  6. | Asm of tok * tok option * asmbody paren * tok
and asmbody = tok list * colon wrap list
and colon =
  1. | Colon of colon_option comma_list
and colon_option = colon_optionbis wrap
and colon_optionbis =
  1. | ColonMisc
  2. | ColonExpr of expression paren
and onedecl = {
  1. v_namei : (name * init option) option;
  2. v_type : fullType;
  3. v_storage : storage;
}
and storage =
  1. | NoSto
  2. | StoTypedef of tok
  3. | Sto of storageClass wrap2
and storageClass =
  1. | Auto
  2. | Static
  3. | Register
  4. | Extern
and _func_specifier =
  1. | Inline
  2. | Virtual
and init =
  1. | EqInit of tok * initialiser
  2. | ObjInit of argument comma_list paren
and initialiser =
  1. | InitExpr of expression
  2. | InitList of initialiser comma_list brace
  3. | InitDesignators of designator list * tok * initialiser
  4. | InitFieldOld of simple_ident * tok * initialiser
  5. | InitIndexOld of expression bracket * initialiser
and designator =
  1. | DesignatorField of tok * simple_ident
  2. | DesignatorIndex of expression bracket
  3. | DesignatorRange of (expression * tok * expression) bracket
and func_definition = {
  1. f_name : name;
  2. f_type : functionType;
  3. f_storage : storage;
  4. f_body : compound;
}
and functionType = {
  1. ft_ret : fullType;
  2. ft_params : parameter comma_list paren;
  3. ft_dots : (tok * tok) option;
  4. ft_const : tok option;
  5. ft_throw : exn_spec option;
}
and parameter = {
  1. p_name : simple_ident option;
  2. p_type : fullType;
  3. p_register : tok option;
  4. p_val : (tok * expression) option;
}
and exn_spec = tok * name comma_list2 paren
and func_or_else =
  1. | FunctionOrMethod of func_definition
  2. | Constructor of func_definition
  3. | Destructor of func_definition
and method_decl =
  1. | MethodDecl of onedecl * (tok * tok) option * tok
  2. | ConstructorDecl of simple_ident * parameter comma_list paren * tok
  3. | DestructorDecl of tok * simple_ident * tok option paren * exn_spec option * tok
and enum_definition = tok * simple_ident option * enum_elem comma_list brace
and enum_elem = {
  1. e_name : simple_ident;
  2. e_val : (tok * constExpression) option;
}
and class_definition = {
  1. c_kind : structUnion wrap2;
  2. c_name : ident_name option;
  3. c_inherit : (tok * base_clause comma_list) option;
  4. c_members : class_member_sequencable list brace;
}
and structUnion =
  1. | Struct
  2. | Union
  3. | Class
and base_clause = {
  1. i_name : class_name;
  2. i_virtual : tok option;
  3. i_access : access_spec wrap2 option;
}
and access_spec =
  1. | Public
  2. | Private
  3. | Protected
and class_member =
  1. | Access of access_spec wrap2 * tok
  2. | MemberField of fieldkind comma_list * tok
  3. | MemberFunc of func_or_else
  4. | MemberDecl of method_decl
  5. | QualifiedIdInClass of name * tok
  6. | TemplateDeclInClass of tok * template_parameters * declaration
  7. | UsingDeclInClass of tok * name * tok
  8. | EmptyField of tok
and fieldkind =
  1. | FieldDecl of onedecl
  2. | BitField of simple_ident option * tok * fullType * constExpression
and class_member_sequencable =
  1. | ClassElem of class_member
  2. | CppDirectiveStruct of cpp_directive
  3. | IfdefStruct of ifdef_directive
and cpp_directive =
  1. | Define of tok * simple_ident * define_kind * define_val
  2. | Include of tok * inc_kind * string
  3. | Undef of simple_ident
  4. | PragmaAndCo of tok
and define_kind =
  1. | DefineVar
  2. | DefineFunc of string wrap comma_list paren
and define_val =
  1. | DefineExpr of expression
  2. | DefineStmt of statement
  3. | DefineType of fullType
  4. | DefineFunction of func_definition
  5. | DefineInit of initialiser
  6. | DefineText of string wrap
  7. | DefineEmpty
  8. | DefineDoWhileZero of statement wrap
  9. | DefinePrintWrapper of tok * expression paren * name
  10. | DefineTodo
and inc_kind =
  1. | Local
  2. | Standard
  3. | Weird
and ifdef_directive = ifdefkind wrap2
and ifdefkind =
  1. | Ifdef
  2. | IfdefElse
  3. | IfdefElseif
  4. | IfdefEndif
and declaration =
  1. | BlockDecl of block_declaration
  2. | Func of func_or_else
  3. | TemplateDecl of tok * template_parameters * declaration
  4. | TemplateSpecialization of tok * unit angle * declaration
  5. | ExternC of tok * tok * declaration
  6. | ExternCList of tok * tok * declaration_sequencable list brace
  7. | NameSpace of tok * simple_ident * declaration_sequencable list brace
  8. | NameSpaceExtend of string * declaration_sequencable list
  9. | NameSpaceAnon of tok * declaration_sequencable list brace
  10. | EmptyDef of tok
  11. | DeclTodo
and template_parameter = parameter
and template_parameters = template_parameter comma_list angle
and declaration_sequencable =
  1. | DeclElem of declaration
  2. | CppDirectiveDecl of cpp_directive
  3. | IfdefDecl of ifdef_directive
  4. | MacroTop of simple_ident * argument comma_list paren * tok option
  5. | MacroVarTop of simple_ident * tok
  6. | NotParsedCorrectly of tok list
and program = toplevel list
and any =
  1. | Program of program
  2. | Toplevel of toplevel
  3. | Cpp of cpp_directive
  4. | Stmt of statement
  5. | Expr of expression
  6. | Type of fullType
  7. | Name of name
  8. | BlockDecl2 of block_declaration
  9. | ClassDef of class_definition
  10. | FuncDef of func_definition
  11. | FuncOrElse of func_or_else
  12. | ClassMember of class_member
  13. | OneDecl of onedecl
  14. | Init of initialiser
  15. | Stmts of statement list
  16. | Constant of constant
  17. | Argument of argument
  18. | Parameter of parameter
  19. | Body of compound
  20. | Info of tok
  21. | InfoList of tok list
val nQ : typeQualifier
val noIdInfo : unit -> ident_info
val noii : 'a list
val noQscope : 'a list
val unwrap : ('a * 'b) -> 'a
val uncomma : ('a * 'b) list -> 'a list
val unparen : ('a * 'b * 'c) -> 'b
val unbrace : ('a * 'b * 'c) -> 'b
val unwrap_typeC : ('a * ('b * 'c)) -> 'b
val string_of_name_tmp : name -> string
val ii_of_id_name : name -> tok list
OCaml

Innovation. Community. Security.