Src_overlay.New_managerManager module instantiation
module Config : sig ... endval limits : Cobol_common.Srcloc.srcloc -> limit * limitlimits loc creates and returns the left- and right-limit to the given location.
Note: if loc overlaps with locations that have already been fed to this function, then restart must first be called.
link_limits left right links the right limit of a token t to the left limit of the subsequent token t' (that is to be fed to the parser right after t).
val join_limits : (limit * limit) -> Cobol_common.Srcloc.srclocjoin_limits (s, e) returns a source location that spans between the two given limits s and e; returns a valid pointwise location if s and e are physically equal.
May print a warning on stderr and return Cobol_common.Srcloc.dummy in case s does not precede e (in the sense that there was no chain of alternating calls to limits and link_limits) that start from s and end in e)
val pointwise : limit -> Cobol_common.Srcloc.srclocpointwise l builds a source location that starts and ends at l.
May return Cobol_common.Srcloc.dummy in case the given limit is invalid (i.e, l does not result from a call to limits loc, for some loc).
val restart : ?at:limit -> unit -> unitrestart ?at () instructs the manager that the limits that are strictly at the right of at are now outdated and should not be relied upon. When given at should be a right limit. If at is not given, every managed limit is discarded.
Warning: when at = None, the manager resets all its internal tables. This may cause trouble in case it is shared among several independent parsers for various input files.
val forget : file_of:limit -> unitforget ~file_of proactively instructs the manager to forget any source location limit related to the file of the given limit. file_of should be the leftmost limit given to the manager when starting to parse a file. Limits related to this file should not be used or queried once a call to forget ~file_of returns.