|
From: Michalis K. <mic...@gm...> - 2010-04-26 01:28:53
|
Hans-Peter Diettrich wrote: > Michalis Kamburelis schrieb: > >> One reason is that PasDoc cannot parse implementation at all now > > For this purpose IMO the FPC parser should be used, that tracks the > Delphi language development as well as the Free Pascal development. > That's why I stopped working on the implementation of new syntax > elements in the PasDoc2 parser, including the syntax in the > implementation section. > Unfortunately, the parser inside the compiler isn't really reusable. There is a separate package, fcl-passrc, that is a nice reusable library, but it got implementation support only recently and still doesn't support all FPC / Delphi features even for the interface. This is known (see the discussions this month on fpc-pascal list). I just tested the current version of fcl-passrc on PasDoc testcases, see my email on fpc-pascal with bugreports: http://lists.freepascal.org/lists/fpc-pascal/2010-April/024755.html . Well, actually that was kind of promising :), it failed on some difficult tests but managed to parse a lot of simpler testcases. For PasDoc we'll also need to modify it to gather the comments and attach them to the item (following PasDoc' logic of glueing // comments, back comments by //< and such), currently it just discards the comments as far as I can see. Also, if you want to keep PasDoc compileable with Delphi (not only FPC), you will have to test and eventually fix fcl-passrc compilation with Delphi. So: I'm all after using fcl-passrc :), but for now we have to use pasdoc's internal parser. Michalis |