.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "XSBuilder::ParseSource 3" .TH XSBuilder::ParseSource 3 2024-07-13 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME ExtUtils::XSBuilder::ParseSource \- parse C source files .SS DESCRIPTION .IX Subsection "DESCRIPTION" For more information, see ExtUtils::XSBuilder .SS "extent_parser (o)" .IX Subsection "extent_parser (o)" Allows the user to call the Extent or Replace method of the parser to add new syntax rules. This is mainly useful to include expansions for preprocessor macros. .SS "preprocess (o)" .IX Subsection "preprocess (o)" Allows the user to preprocess the source before it is given to the parser. You may modify the source, which is given as first argument in place. .SS "include_dirs (o)" .IX Subsection "include_dirs (o)" Returns a reference to the list of directories that should be searched for include files which contain the functions, structures, etc. to be extracted. .PP Default: \f(CW\*(Aq.\*(Aq\fR .SS "include_paths (o)" .IX Subsection "include_paths (o)" Returns a reference to a list of directories that are given as include directories to the C compiler. This is mainly used to strip these directories from filenames to convert absolute paths to relative paths. .PP Default: empty list (\f(CW\*(C`[]\*(C'\fR) .SS "unwanted_includes (o)" .IX Subsection "unwanted_includes (o)" Returns a reference to a list of include files that should not be processed. .PP Default: empty list (\f(CW\*(C`[]\*(C'\fR) .SS "sort_includes (o, include_list)" .IX Subsection "sort_includes (o, include_list)" Passed an array ref of include files, it allows the user to define the sort order, so includes are processed correctly. .PP Default: return the passed array reference. .SS "find_includes (o)" .IX Subsection "find_includes (o)" Returns a list of include files to be processed. .PP Default: search directories given by \f(CW\*(C`include_dirs\*(C'\fR for all files and build a list of include files. All files starting with a word matched by \&\f(CW\*(C`unwanted_includes\*(C'\fR are not included in the list. .SS "handle_define (o)" .IX Subsection "handle_define (o)" Passed a hash ref with the definition of a define, may modify it. Return false to discard it, return true to keep it. .PP Default: \f(CW1\fR .SS "handle_enum (o)" .IX Subsection "handle_enum (o)" Passed a hash ref with the definition of a enum value, may modify it. Return false to discard it, return true to keep it. .PP Default: \f(CW1\fR .SS "handle_struct (o)" .IX Subsection "handle_struct (o)" Passed a hash ref with the definition of a struct, may modify it. Return false to discard it, return true to keep it. .PP Default: \f(CW1\fR .SS "handle_function (o)" .IX Subsection "handle_function (o)" Passed a hash ref with the definition of a function, may modify it. Return false to discard it, return true to keep it. .PP Default: \f(CW1\fR .SS "handle_callback (o)" .IX Subsection "handle_callback (o)" Passed a hash ref with the definition of a callback, may modify it. Return false to discard it, return true to keep it. .PP Default: \f(CW1\fR .SS "package (o)" .IX Subsection "package (o)" Return package name for tables .PP Default: \f(CW\*(AqMY\*(Aq\fR .SS "targetdir (o)" .IX Subsection "targetdir (o)" Return name of target directory where to write tables .PP Default: \f(CW\*(Aq./xsbuilder/tables\*(Aq\fR .SS run .IX Subsection "run" Call this class method to parse your source. Before you can do so you must provide a class that overrides the defaults in ExtUtils::XSBuilder::ParseSource. After that you scan the source files with .PP .Vb 1 \& MyClass \-> run ; .Ve