package parsley
Module ParsleySource
the different kinds of litteral corresponding to the (Pconst_int) ast node
the different kinds of base for litteral numbers
the different kind of notation for floats
raised when a string does not match the format defined by OCaml's lexer for floats and integer litterals
error msg utility
error msg utility
Removes all occurences of the character '_'
Categorizes a non-empty string into an integer_kind. Returns the pair formed by the string where the suffixes (n,l,L) where removed if present, and the corresponding integer_kind
categorizes a non-empty string into a base. Returns the pair formed by the string where the prefixes (0o,0x,0b) where removed if present, and the corresponding base
Given a non-empty string representation of a float, and a base (either hexa or decimal), computes the associated float_notation
Computes exactly the rational corresponding to the litteral in the given base. Works for both integers and floats, for all bases
Computes exactly the rational corresponding to the litteral in the given base. Works for both integers and floats, for all bases, and for both scientific and regular notation
builds the rationnal corresponding to a string following OCaml's lexical conventions : | (0…9) 0…9 ∣ _ | (0x) (0…9∣ A…F∣ a…f) 0…9∣ A…F∣ a…f∣ _ | (0o) (0…7) 0…7∣ _ | (0b) (0…1) 0…1∣ _
builds the rationnal corresponding to a string following OCaml's lexical conventions : | - (0…9) 0…9 ∣ _ | - (0x) (0…9∣ A…F∣ a…f) 0…9∣ A…F∣ a…f∣ _ | - (0o) (0…7) 0…7∣ _ | - (0b) (0…1) 0…1∣ _
builds an 'of_string' that convert a string representation of a value of a numeric type, to its corresponding value, while indicating if a loss of precision occured during the conversion
exactish string_of_float