XSBuilder::ParseSource(3) User Contributed Perl Documentation XSBuilder::ParseSource(3)

ExtUtils::XSBuilder::ParseSource - parse C source files

For more information, see ExtUtils::XSBuilder

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.

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.

Returns a reference to the list of directories that should be searched for include files which contain the functions, structures, etc. to be extracted.

Default: '.'

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.

Default: empty list ("[]")

Returns a reference to a list of include files that should not be processed.

Default: empty list ("[]")

Passed an array ref of include files, it allows the user to define the sort order, so includes are processed correctly.

Default: return the passed array reference.

Returns a list of include files to be processed.

Default: search directories given by "include_dirs" for all files and build a list of include files. All files starting with a word matched by "unwanted_includes" are not included in the list.

Passed a hash ref with the definition of a define, may modify it. Return false to discard it, return true to keep it.

Default: 1

Passed a hash ref with the definition of a enum value, may modify it. Return false to discard it, return true to keep it.

Default: 1

Passed a hash ref with the definition of a struct, may modify it. Return false to discard it, return true to keep it.

Default: 1

Passed a hash ref with the definition of a function, may modify it. Return false to discard it, return true to keep it.

Default: 1

Passed a hash ref with the definition of a callback, may modify it. Return false to discard it, return true to keep it.

Default: 1

Return package name for tables

Default: 'MY'

Return name of target directory where to write tables

Default: './xsbuilder/tables'

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

MyClass -> run ;
2024-07-13 perl v5.38.2