--- Modules/HeaderDoc/BlockParse.pm.orig 2009-04-10 14:10:44.000000000 -0700 +++ Modules/HeaderDoc/BlockParse.pm 2010-07-30 11:56:51.000000000 -0700 @@ -1307,6 +1307,8 @@ # Here be the parser. Abandon all hope, ye who enter here. $treepart = ""; + my $tempInIf = 0; + if ((!$parserState->{inComment}) && (!$parserState->{inInlineComment}) && ($part ne $ilc) && (($part ne $soc) || $nextpart eq "!")) { if ($parserState->{inProtocol} == 1) { print STDERR "INPROTOCOL: 1\n" if ($parseDebug || $classDebug); if ($part =~ /\w/) { @@ -1320,7 +1322,11 @@ $parserState->{extendsProtocol} = ""; $parserState->{inProtocol} = 3; } elsif ($part =~ /\S/) { + # PUSH PARSER STATE + # Don't do this if the next thing is a non-HeaderDoc + # comment, though. + print STDERR "parserState pushed onto stack[PROTOCOL]\n" if ($parserStackDebug); $parserState->{inProtocol} = -1; $parserState->{lastTreeNode} = $treeCur; @@ -1552,7 +1558,6 @@ # print STDERR "NO CHANEC: PART \"$part\" ILC \"$ilc\" ILC_B: \"ilc_b\" LANG: \"$lang\" LASTTOKEN: \"$lasttoken\"\n"; # } - my $tempInIf = 0; if ($HeaderDoc::parseIfElse && (!$parserState->{inMacro} && !$parserState->{inMacroLine} && !($parserState->{inString} || $parserState->{inComment} || $parserState->{inInlineComment} || $parserState->{inChar}))) { if (!(scalar(@braceStack) - $parserState->{initbsCount})) { if ($part eq "if" || $part eq "else") { @@ -1593,6 +1598,7 @@ # print STDERR "DEBUG $pushParserStateAfterToken $pushParserStateAfterWordToken $pushParserStateAtBrace $occPushParserStateOnWordTokenAfterNext\n"; } } + } SWITCH: { # Blank declaration handlers (mostly for misuse of --- Modules/HeaderDoc/BlockParse.pm.orig 2010-08-02 11:53:44.000000000 -0700 +++ Modules/HeaderDoc/BlockParse.pm 2010-08-02 11:55:50.000000000 -0700 @@ -1101,8 +1101,9 @@ } } elsif ($occPushParserStateOnWordTokenAfterNext) { # if ($part !~ /(\s|<)/) - if ($part =~ /(\/\/|\/\*|\-|\+|\w|\@)/) { + if (($part =~ /(\-|\+|\w|\@)/ || ($part eq "/*" && $nextpart eq "!")) && !$parserState->{inComment} && !$parserState->{inInlineComment}) { + # die("PART: $part NP: $nextpart\n"); $parserState->{lastTreeNode} = $treeCur; print STDERR "parserState pushed onto stack[occPushParserStateOnWordTokenAfterNext]\n" if ($parserStackDebug); $curline = ""; $parserState->{storeDec} = $declaration;