Parameter WithPP.1-PP
val initial_state : state
Initial state of the preprocessor.
val update : state -> string -> int -> string -> state * string * int * bool
update st name lnum line
takes as input the statest
of the preprocessor, the file namename
, the number of the next input linelnum
and the next input lineline
itself. It returns a tuple of the new state, the new file name, the new line number, and a boolean. The new file name and line number can be used to implement line number directives. The boolean istrue
if the line should be part of the input (i.e. it is not a specific preprocessor line) andfalse
if it should be ignored. The function may raisePreprocessor_error
in case of error.
val check_final : state -> string -> unit
check_final st name
check thatst
indeed is a correct state of the preprocessor for the end of input of filename
. If it is not the case, then the exceptionPreprocessor_error
is raised.