package frama-c
Install
Dune Dependency
Authors
-
MMichele Alberti
-
TThibaud Antignac
-
GGergö Barany
-
PPatrick Baudin
-
NNicolas Bellec
-
TThibaut Benjamin
-
AAllan Blanchard
-
LLionel Blatter
-
FFrançois Bobot
-
RRichard Bonichon
-
VVincent Botbol
-
QQuentin Bouillaguet
-
DDavid Bühler
-
ZZakaria Chihani
-
LLoïc Correnson
-
JJulien Crétin
-
PPascal Cuoq
-
ZZaynah Dargaye
-
BBasile Desloges
-
JJean-Christophe Filliâtre
-
PPhilippe Herrmann
-
MMaxime Jacquemin
-
FFlorent Kirchner
-
AAlexander Kogtenkov
-
RRemi Lazarini
-
TTristan Le Gall
-
JJean-Christophe Léchenet
-
MMatthieu Lemerre
-
DDara Ly
-
DDavid Maison
-
CClaude Marché
-
AAndré Maroneze
-
TThibault Martin
-
FFonenantsoa Maurica
-
MMelody Méaulle
-
BBenjamin Monate
-
YYannick Moy
-
PPierre Nigron
-
AAnne Pacalet
-
VValentin Perrelle
-
GGuillaume Petiot
-
DDario Pinto
-
VVirgile Prevosto
-
AArmand Puccetti
-
FFélix Ridoux
-
VVirgile Robles
-
JJan Rochel
-
MMuriel Roger
-
JJulien Signoles
-
NNicolas Stouls
-
KKostyantyn Vorobyov
-
BBoris Yakobowski
Maintainers
Sources
sha256=d2fbb3b8d0ff83945872e9e6fa258e934a706360e698dae3b4d5f971addf7493
doc/frama-c.kernel/Frama_c_kernel/Errorloc/index.html
Module Frama_c_kernel.Errorloc
The module stores the current file,line, and working directory in a hidden internal state, modified by the three following functions.
val currentLoc : unit -> Cil_datatype.Location.t
This function is used especially when the preprocessor has generated linemarkers in the output that let us know the current working directory at the time of preprocessing (option -fworking-directory for GNU CPP).
val startParsing :
string ->
(Lexing.lexbuf -> 'a) ->
Lexing.lexbuf * (Lexing.lexbuf -> 'a)
Call this function to start parsing.
val pp_context_from_file :
?ctx:int ->
Format.formatter ->
Cil_types.location ->
unit
prints the line(s) identified by the location, together with ctx
lines of context before and after. ctx
defaults to 2. If the location expands to multiple lines, those lines will be separated from context by blank lines. Otherwise, the portion of the line that is between the two positions of the location will be underlined with ^
NB: if the two positions in the location refer to different files, the first position will not be considered.
val pp_location : Format.formatter -> Cil_types.location -> unit
prints a readable description of a location
val parse_error :
?loc:Cil_types.location ->
('a, Format.formatter, unit, 'b) format4 ->
'a
Emits the corresponding error message with some location information. If not given, location
will be considered to be between the end of the forelast token read by the parser and the start of the last token, i.e. we assume the parser has read an unexpected token.
Has an error been raised since the last call to clear_errors
?
Parse errors are usually fatal, but their reporting is sometimes delayed until the end of the current parsing phase. Functions that intend to ultimately fail should call clear_errors
when they start, and check had_errors
when they end, then call parse_error
if needed.