NAME

Parse::QTEDI - Parse QT/KDE preprocessed headers

SYNOPSIS

use Parse::QTEDI qw($parser);
defined $parser->begin($in) or warn "parse failed";

COMMANDLINE USAGE

$cp header.h header.h.bak                            # backup
$sed -i -e 's/#include/ d' -e 's/#error/ d' header.h # strip
$gcc -E -DBLAH_BLAH header.h > header.i              # pre-process
$parse_qtedi_header header.i                         # parse

DESCRIPTION

Parse QT/KDE preprocessed headers to generate interface information.

WHAT IS INPUT

input stream should be the output of a preprocessor like `gcc -E -DBLAH_BLAH'.

NOTE: Normally one should strip #include and #error directives before invoking preprocessor, or else preprocessor will expand all include directives encountered and croak on error progma.

WHAT IS OUTPUT

YAML-ish output to STDOUT; debug info to STDERR if $DEBUG defined.

WHY IS PREPROCESSED

To solve macro, basically. There are both arch-specific and feature-specific macros. One should decide which feature-specific ones to enable. Besides, modern libtool normally records compile-time commandline options for later reference.

HOW TO DEBUG

Defining $Parse::QTEDI::DEBUG to true will enable parse-level debug information to STDERR.

WHAT ABOUT THE NAME

QTEDI is QT and QT-basEd Desktop environment Interface ;-)

EXPORT

An instance of Parse::RecDescent on demand

SEE ALSO

output spec and other dev info http://dongxu.googlecode.com/wiki/QTEDI

svn repos http://dongxu.googlecode.com/svn/trunk/Parse-QTEDI/

Also check my Perl QT4 binding project page http://code.google.com/p/dongxu/wiki/PerlQT

AUTHOR

Dongxu Ma, <dongxu.ma@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2007 by Dongxu Ma <dongxu@cpan.org>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://dev.perl.org/licenses/artistic.html