CUDF type library: parsing and pretty printing
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.
All parsing function are granted to raise only Cudf_types_pp.Type_error, lower lever exception (e.g. syntax errors) are wrapped into it
Mostly for application relying on CUDF conventions
Parse a quoted string, enclosed by double quotes as it happens within the "property" property of preamble stanzas. The only place where such strings are allowed in CUDF are within type declarations; see Cudf_types_pp.parse_typedecl.
Cudf_types.Syntax_error
when the quoted string cannot be parsed
Parse a CUDF type expression.
At present it can be either a typename or an enum with its values.
Cudf_types.Syntax_error
when the given string is not a valid type
expression
Parse the enum value corresponding to the "keep" core property of package stanzas. Shorthand to avoid parsing the corresponding `Enum and then casting to Cudf_types.enum_keep