Submitted by Jeroen van der Zijp on Wed, 21 Jul 1999
14:06:50 -0500
Hello,
I'm trying to use an input.flt filter, in order to
strip out linkage attributes [which have to
be inserted before the class name, as in:
class FXAPI FXApp {
jadajada
};
I use the following input filter, and for all
intents and purposes, it seems to work:
sub filter {
local($str)=@_;
$str =~ s/FXAPI//g;
return $str;
}
So far so good.
Now, if I document a class like:
//: A brief description
// A long description
class FXAPI FXApp {
jadajada
};
Then it seems the {brief} and {detail} document
statements no longer work
I looked at the perl code and I cannot figure out
where it goes wrong, but it seems its due to
input.flt because w/o input.flt it seems to work
fine
[Of course in that case the class is erroneously
named ``FXAPI'']
Could you look into that, or at least point me
where to look in the perce= ps code?
Thanks in advance,
Jeroen
Logged In: YES
user_id=1197
Submitted by Jeroen van der Zijp on Thu, 22 Jul 1999
07:43:43 -0500
I have traced the problem into the loop :
foreach $inputfile (@inputfiles) {
$sdesc_marker=$SDESC_MARKER;
$user_marker=$USER_MARKER;
$user_delim=$USER_DELIM;
$global_marker=$GLOBAL_MARKER;
$global_equals=$GLOBAL_EQUALS;
open(INPUT,"<$inputfile");
while(<INPUT>) {
if ($inputfile ne $oldinput) {
......
What seems to happen is when multiple header files
are being scanned I loose one line or so from the
top of the second file.
I have a comment block there like
/*******
* *
*******/
And since I loose the /***** the parser gets
derailed.
For the moment, I've replaced this routine with:
foreach $inputfile (@inputfiles) {
$sdesc_marker=$SDESC_MARKER;
$user_marker=$USER_MARKER;
$user_delim=$USER_DELIM;
$global_marker=$GLOBAL_MARKER;
$global_equals=$GLOBAL_EQUALS;
@fdata=stat("$inputfile");
open(INPUT,"<$inputfile");
$buffer="";
while (<INPUT>) {
$buffer.=$_;
}
#
# Clear Global Variables
#
foreach $gb (keys(%global)) {
$global{$gb}="";
}
if ($buffer) {
&PROCINPUT($fdata[9]);
}
}
Although this of course does not recurse down the
directories....
Also, I have a suggestion:
a statement like {break}
would be very useful in some situations like below:
{foreach protected}
{if func}
Protected member functions:
{break}
{endif}
{next protected}
The idea is to output the string "Protected member
functions:" only once.
Having a {break} would be very useful in order to
generate some output af= ter bracketing with a lot
if conditionals.
Note I can not use {if first} as the first
protected may not be a function.
{break} may be implemented through an extra return
value from GENTEXT which is passed up until the
nearest for loop. I believe it should be quite
easy to add.
Otherwise, I'm getting the hang of it, and I like
it. Please keep up the good work.
- Jeroen