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
-
SSylvain Chiron
-
LLoïc Correnson
-
JJulien Crétin
-
PPascal Cuoq
-
ZZaynah Dargaye
-
BBasile Desloges
-
JJean-Christophe Filliâtre
-
PPhilippe Herrmann
-
MMaxime Jacquemin
-
BBenjamin Jorge
-
FFlorent Kirchner
-
AAlexander Kogtenkov
-
RRemi Lazarini
-
TTristan Le Gall
-
KKilyan Le Gallic
-
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
-
CCécile Ruet-Cros
-
JJulien Signoles
-
NNicolas Stouls
-
KKostyantyn Vorobyov
-
BBoris Yakobowski
Maintainers
Sources
sha256=a94384f00d53791cbb4b4d83ab41607bc71962d42461f02d71116c4ff6dca567
doc/frama-c.kernel/Frama_c_kernel/Rich_text/index.html
Module Frama_c_kernel.Rich_text
Text with Tags
val size : message -> int
val char_at : message -> int -> char
val string : message -> string
val substring : message -> int -> int -> string
val tags_at : message -> int -> (Stdlib.Format.stag * int * int) list
Returns the list of tags at the given position. Inner tags come first, outer tags last.
val visit :
?output:(string -> int -> int -> unit) ->
?open_tag:(Stdlib.Format.stag -> int -> int -> unit) ->
?close_tag:(Stdlib.Format.stag -> int -> int -> unit) ->
message ->
unit
Visit the message, with depth-first recursion on tags. All methods are called with text or tag, position and length.
val pretty : ?vbox:int -> Stdlib.Format.formatter -> message -> unit
Pretty-print the message onto the given formatter, with the tags. The original message has been already laidout with respect to horizontal and vertical boxes, and this layout will be output as-it-is into the formatter.
Here, you have two different strategies to render the message properly. If ~vbox
is specified, a vertical box is opened around the message, and newlines are emitted with a "@\n"
and the given indentation. Otherwise, no box is used and newlines are emitted as "\n"
, which only makes sense if there is no current indentation in the output formatter.
Message Buffer
Buffer for creating messages.
The buffer grows on demand, but is protected against huge mesages. Maximal size is around 2 billions ASCII characters, which sould be enough to store more than 25kloc source text.
val create : ?indent:int -> ?margin:int -> unit -> buffer
Create a buffer.
The right-margin is set to ~margin
and maximum indentation to ~indent
. Default values are those of Format.make_formatter
, which are ~indent:68
and ~margin:78
in OCaml 4.05.
val add_char : buffer -> char -> unit
Buffer-like
val add_string : buffer -> string -> unit
Buffer-like
val add_substring : buffer -> string -> int -> int -> unit
Buffer-like
val formatter : buffer -> Stdlib.Format.formatter
val bprintf : buffer -> ('a, Stdlib.Format.formatter, unit) Stdlib.format -> 'a
val kprintf :
(Stdlib.Format.formatter -> 'a) ->
buffer ->
('b, Stdlib.Format.formatter, unit, 'a) Stdlib.format4 ->
'b
val contents : buffer -> string
Similar to Buffer.contents
val sub : buffer -> int -> int -> string
Similar to Buffer.sub
val range : buffer -> int -> int -> string
Sub-string with range. range b p q
is sub b p (q+1-p)
val trim : buffer -> int * int
Range of non-blank leading and trailing characters.
val shrink : buffer -> unit
Resize the buffer to roughly fit its actual content.
val truncate : buffer -> int -> bool
truncate buffer size
truncates the content of buffer
if longer than size
characters. Returns true if the bufffer has been truncated.
Printer