Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
FrontcSource* FrontC is an OCAML library providing facilities for parsing source file * in C language. * * Although it is designed for parsing ANSI C, it provides also support for * old K&R C style and for some GCC extensions. * * It provides also a limited degraded mode allowing to parse file although * all type information is not available and preprocessor directives are still * in the source. * *
type parsing_arg = | FROM_STDINParse the standard input.
*)| FROM_CHANNEL of in_channelParse the given channel.
*)| FROM_FILE of stringParse the given file.
*)| USE_CPPUse the C preprocessor.
*)| PREPROC of stringPath to the preprocessor.
*)| DEF of stringPass this definition to CPP.
*)| UNDEF of stringUndefine the given symbol for CPP.
*)| INCLUDE of stringInclude the given file by the CPP.
*)| INCLUDE_DIR of stringUse the given directory for retrieving includes.
*)| OPTION of stringPass the given option directl to the CPP.
*)| ERROR of out_channelUse the given channel for outputting errors.
*)| INTERACTIVE of boolIs this session interactive (from console).
*)| GCC_SUPPORT of boolSupport some extensions of the GCC compiler (default to true).
*)| LINE_RECORD of boolRecord line numbers in the C abstract trees (default to false).
*)* Parameters for building the reader handler.
type parsing_result = | PARSING_ERRORParsing failure. Error outputted.
*)| PARSING_OK of Cabs.definition listSuccess. Return list of read definitions.
*)* Result of a parsing.
val trans_old_fun_def :
(Cabs.single_name * Cabs.name_group list * Cabs.body) ->
Cabs.definition* Transform an old K&R C function definition into a new ANSI one. *
* Transform all old function definition into new ones. *
* Convert the given C file abstract repersentation into XML. *
* Parse the input channel in interactive way, that is, as coming from the * console. Error are displayed in a specific way. *
* Parse the C source from the console. It exactly equals to * "parse_interactive stdin stderr". *
* Parse the C source from a non-interactive channel. It may be useful when * the source come from a piped channel from the C preprocessor, for example.* *
* Parse a C source passed as a file path. *