Re: Re: [ANNOUNCEMENT] phpDocumentor 1.2.0rc1 (beta) Released

From: Date: Fri, 25 Apr 2003 18:12:07 +0000
Subject: Re: Re: [ANNOUNCEMENT] phpDocumentor 1.2.0rc1 (beta) Released
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-5067@lists.php.net to get a copy of this message
<alan@akbkhome.com> wrote : > I've been playing with the php parser a bit more - mainly due to the > desperate need for a quick class navigational tool on the desktop - > http://devel.akbkhome.com/classNav.jpg > > I've been finding that flipping from one file to another just to > remember the API for a class / either mine or something like quickforms > :).. In phpmole is just too annoying (and taking too much time.) > > It uses alot of the same principles as phpcodedoc - however it makes far > better use of parse caching. > > Thinking about your comments before about the general structure and > issues with phpdocu - from what I envision of a caching parser../ > outputter.. > > Pass 1: > select a directory or base file to start with. > foreach of the files found.. > - parse or grab the cached parse file. > - remember class+filename ** dump the details at this point.. - to > reduce memory consumption. > - this could be extended to store stuff like packages, extends array's, > last change dates.., > > .. this basically is enough to generate a list of files for outputting. > and menus.. > > > Pass 2; > output layer: > can do modification checks to see if the body needs outputing > - suggest caching the page bodies. > > each page output can reload from the parse the full class/funciton > details etc. - as they would be all cached in wddx files it should be > extremely quick. and since the data is dumped after each output, memory > consumption should be quite low. > > funily enought you could do alot of the hard work on the client side > with javascript and wddx :) > > ------------------------------------ > What i've not done - and dont really want to attack is the phpdoc > comment parser.. > Ideally A single/or group of classes that would take: > $r = PHP_Parser_Comment::parse( > "/** > * some comment > * > * @some tags.... > **/"); > > and return some kind of structured array? how easy would that be to > integrate into phpdocu - I have no idea if you have got a data structre > for this already in phpdocu - have you got a print_r example? > > ---------- > As far as the code goes - I managed to knock a second of the typical > parse time by changing from a huge switch/case to method_exists() - due > to the wonderfully way php handles big case statements internally.. :) > > something like DB_DataObjects takes 2 seconds to parse on a p3/1000, and > obviously milliseconds if it uses a cached version... > > thanks to the wonders of subversion - the current version should always > be at > real code: > http://www.akbkhome.com:81/svn/akpear/PHP_Parser/Parser.jay > generated file: > http://www.akbkhome.com:81/svn/akpear/PHP_Parser/Parser.php > > a pretty-print* wddx cache file > > http://www.akbkhome.com:81/svn/akpear/Gtk_ClassViewer/ClassViewer.php.wddx > * this is using a little patch that went to php-dev a few days ago.. > > -------------- > Any one want to +1 the PHP_Parser into PEAR? - although the output > structure is extremely up in the air at present.. - at least the docs > should be easy - it's only got two public methods ;) Alan, Do you think this code could be adapted to parse some other languages ? (java, smalltalk...) Bertrand Mansion Mamasam

« previous php.pear.general (#5067) next »