module Cudf_types_pp:CUDF type library: parsing and pretty printingsig..end
Implement parsing and pretty printing of CUDF types (see CUDF spec. ยง2.2.2).
For the actual CUDF type definition see Cudf_types.
For pretty printing of macro-components see Cudf_printer.
exception Type_error of Cudf_types.typ * Cudf_types.typed_value
All parsing function are granted to raise only Cudf_types_pp.Type_error,
lower lever exception (e.g. syntax errors) are wrapped into it
val parse_int : string -> intval parse_posint : string -> intval parse_nat : string -> intval parse_bool : string -> boolval parse_string : string -> stringval parse_pkgname : string -> Cudf_types.pkgnameval parse_ident : string -> stringval parse_enum : enums:string list -> string -> stringval parse_vpkg : string -> Cudf_types.vpkgval parse_vpkglist : string -> Cudf_types.vpkglistval parse_vpkgformula : string -> Cudf_types.vpkgformulaval parse_veqpkg : string -> Cudf_types.veqpkgval parse_veqpkglist : string -> Cudf_types.veqpkglistval parse_typedecl : string -> Cudf_types.typedecl
Mostly for application relying on CUDF conventions
val parse_qstring : string -> stringCudf_types_pp.parse_typedecl.Cudf_types.Syntax_error when the quoted string cannot be parsedval parse_type : string -> Cudf_types.typ
At present it can be either a typename or an enum with its values.
Raises Cudf_types.Syntax_error when the given string is not a valid type
expression
val parse_keep : string -> Cudf_types.enum_keepCudf_types.enum_keepval parse_value : Cudf_types.typ -> string -> Cudf_types.typed_valueval string_of_int : int -> stringval string_of_posint : int -> stringval string_of_nat : int -> stringval string_of_bool : bool -> stringval string_of_keep : Cudf_types.enum_keep -> stringval string_of_pkgname : Cudf_types.pkgname -> stringval string_of_version : Cudf_types.version -> stringval string_of_vpkg : Cudf_types.vpkg -> stringval string_of_vpkglist : Cudf_types.vpkglist -> stringval string_of_vpkgformula : Cudf_types.vpkgformula -> stringval string_of_veqpkg : Cudf_types.veqpkg -> stringval string_of_veqpkglist : Cudf_types.veqpkglist -> stringval string_of_typedecl : Cudf_types.typedecl -> stringval string_of_type : Cudf_types.typ -> stringval string_of_value : Cudf_types.typed_value -> string