Re: [Doxygen-users] PHP alternative syntax (SOLVED)
Brought to you by:
dimitri
From: Willem B. <w-...@dd...> - 2013-12-18 20:19:29
|
> Doxygen has a pre-processor similar to the C/C++ pre-processor. Is your > Doxygen configuration, you can configure "macros" to replace the > alternate keywords with their primary equivalents. I wrote a little batch file (translate.sh) that calls "sed -f phpalt.sed $1" And phpalt.sed contains: /^\s*if\s*[(]/s/\:$/\{/ /^\s*while\s*[(]/s/\:$/\{/ /^\s*for\s*[(]/s/\:$/\{/ /^\s*foreach\s*[(]/s/\:$/\{/ /^\s*switch\s*[(]/s/\:$/\{/ /^\s*else:/s/else:/\}else\{/ /^\s*elseif\s*[(]/s/elseif/\}elseif/ s/endif;/\}/ s/endwhile;/\}/ s/endfor;/\}/ s/endforeach;/\}/ s/endswitch;/\}/ and set FILTER_PATTERNS to the value *.php=translate.sh That seems to do the trick. Thanks. |