Src_overlay.New_manager
Nanager module instantiation
module Id : sig ... end
val limits : Cobol_common.Srcloc.srcloc -> limit * limit
limits 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.srcloc
join_limits (start_limit, end_limit)
returns a source location that spans from start_limit
to end_limit
. start_limit
must have been built (via limits
) before end_limit
.
val restart : ?at:limit -> unit -> unit
restart ?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.