Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

extutils::xsbuilder::parsesource(3pm) [debian man page]

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

NAME
ExtUtils::XSBuilder::ParseSource - parse C source files DESCRIPTION For more information, see ExtUtils::XSBuilder 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. 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. 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. Default: '.' 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. Default: empty list ("[]") unwanted_includes (o) Returns a reference to a list of include files that should not be processed. Default: empty list ("[]") 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. Default: return the passed array reference. find_includes (o) 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. 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. Default: 1 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. Default: 1 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. Default: 1 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. Default: 1 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. Default: 1 package (o) Return package name for tables Default: 'MY' targetdir (o) Return name of target directory where to write tables Default: './xsbuilder/tables' 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 MyClass -> run ; perl v5.10.1 2005-08-22 XSBuilder::ParseSource(3pm)

Check Out this Related Man Page

ExtUtils::ParseXS::Utilities(3pm)			User Contributed Perl Documentation			 ExtUtils::ParseXS::Utilities(3pm)

NAME
ExtUtils::ParseXS::Utilities - Subroutines used with ExtUtils::ParseXS SYNOPSIS
use ExtUtils::ParseXS::Utilities qw( standard_typemap_locations trim_whitespace tidy_type C_string valid_proto_string process_typemaps make_targetable map_type standard_XS_defs assign_func_args analyze_preprocessor_statements set_cond Warn blurt death check_conditional_preprocessor_statements escape_file_for_line_directive report_typemap_failure ); SUBROUTINES
The following functions are not considered to be part of the public interface. They are documented here for the benefit of future maintainers of this module. "standard_typemap_locations()" o Purpose Provide a list of filepaths where typemap files may be found. The filepaths -- relative paths to files (not just directory paths) -- appear in this list in lowest-to-highest priority. The highest priority is to look in the current directory. 'typemap' The second and third highest priorities are to look in the parent of the current directory and a directory called lib/ExtUtils underneath the parent directory. '../typemap', '../lib/ExtUtils/typemap', The fourth through ninth highest priorities are to look in the corresponding grandparent, great-grandparent and great-great-grandparent directories. '../../typemap', '../../lib/ExtUtils/typemap', '../../../typemap', '../../../lib/ExtUtils/typemap', '../../../../typemap', '../../../../lib/ExtUtils/typemap', The tenth and subsequent priorities are to look in directories named ExtUtils which are subdirectories of directories found in @INC -- provided a file named typemap actually exists in such a directory. Example: '/usr/local/lib/perl5/5.10.1/ExtUtils/typemap', However, these filepaths appear in the list returned by "standard_typemap_locations()" in reverse order, i.e., lowest-to-highest. '/usr/local/lib/perl5/5.10.1/ExtUtils/typemap', '../../../../lib/ExtUtils/typemap', '../../../../typemap', '../../../lib/ExtUtils/typemap', '../../../typemap', '../../lib/ExtUtils/typemap', '../../typemap', '../lib/ExtUtils/typemap', '../typemap', 'typemap' o Arguments my @stl = standard_typemap_locations( @INC ); Reference to @INC. o Return Value Array holding list of directories to be searched for typemap files. "trim_whitespace()" o Purpose Perform an in-place trimming of leading and trailing whitespace from the first argument provided to the function. o Argument trim_whitespace($arg); o Return Value None. Remember: this is an in-place modification of the argument. "tidy_type()" o Purpose Rationalize any asterisks ("*") by joining them into bunches, removing interior whitespace, then trimming leading and trailing whitespace. o Arguments ($ret_type) = tidy_type($_); String to be cleaned up. o Return Value String cleaned up. "C_string()" o Purpose Escape backslashes ("") in prototype strings. o Arguments $ProtoThisXSUB = C_string($_); String needing escaping. o Return Value Properly escaped string. "valid_proto_string()" o Purpose Validate prototype string. o Arguments String needing checking. o Return Value Upon success, returns the same string passed as argument. Upon failure, returns 0. "process_typemaps()" o Purpose Process all typemap files. o Arguments my $typemaps_object = process_typemaps( $args{typemap}, $pwd ); List of two elements: "typemap" element from %args; current working directory. o Return Value Upon success, returns an ExtUtils::Typemaps object. "make_targetable()" o Purpose Populate %targetable. This constitutes a refinement of the output of "process_typemaps()" with respect to its fourth output, $output_expr_ref. o Arguments %targetable = make_targetable($output_expr_ref); Single hash reference: the fourth such ref returned by "process_typemaps()". o Return Value Hash. "map_type()" o Purpose Performs a mapping at several places inside "PARAGRAPH" loop. o Arguments $type = map_type($self, $type, $varname); List of three arguments. o Return Value String holding augmented version of second argument. "standard_XS_defs()" o Purpose Writes to the ".c" output file certain preprocessor directives and function headers needed in all such files. o Arguments None. o Return Value Returns true. "assign_func_args()" o Purpose Perform assignment to the "func_args" attribute. o Arguments $string = assign_func_args($self, $argsref, $class); List of three elements. Second is an array reference; third is a string. o Return Value String. "analyze_preprocessor_statements()" o Purpose Within each function inside each Xsub, print to the .c output file certain preprocessor statements. o Arguments ( $self, $XSS_work_idx, $BootCode_ref ) = analyze_preprocessor_statements( $self, $statement, $XSS_work_idx, $BootCode_ref ); List of four elements. o Return Value Modifed values of three of the arguments passed to the function. In particular, the "XSStack" and "InitFileCode" attributes are modified. "set_cond()" o Purpose o Arguments o Return Value "current_line_number()" o Purpose Figures out the current line number in the XS file. o Arguments $self o Return Value The current line number. "Warn()" o Purpose o Arguments o Return Value "blurt()" o Purpose o Arguments o Return Value "death()" o Purpose o Arguments o Return Value "check_conditional_preprocessor_statements()" o Purpose o Arguments o Return Value "escape_file_for_line_directive()" o Purpose Escapes a given code source name (typically a file name but can also be a command that was read from) so that double-quotes and backslashes are escaped. o Arguments A string. o Return Value A string with escapes for double-quotes and backslashes. "report_typemap_failure" o Purpose Do error reporting for missing typemaps. o Arguments The "ExtUtils::ParseXS" object. An "ExtUtils::Typemaps" object. The string that represents the C type that was not found in the typemap. Optionally, the string "death" or "blurt" to choose whether the error is immediately fatal or not. Default: "blurt" o Return Value Returns nothing. Depending on the arguments, this may call "death" or "blurt", the former of which is fatal. perl v5.14.2 2012-02-02 ExtUtils::ParseXS::Utilities(3pm)
Man Page