|
From: Thomas H. <tho...@gm...> - 2009-01-16 07:02:03
|
-------- Original-Nachricht -------- > Datum: Thu, 15 Jan 2009 23:02:11 +0100 > Von: Hans-Peter Diettrich <DrD...@ao...> > An: "Discussion, announcements, questions concerning pasdoc" <pas...@li...> > Betreff: Re: [Pasdoc-main] [ pasdoc-Bugs-2500102 ] Error when parsing Delphi 2009 files with generics > Michalis Kamburelis schrieb: > > >> D2009 has more extensions to the grammar (local types...), for which a > >> grammar is required. PasDoc2 already has provisions to handle such > >> extensions, but any implementation deserves a grammar in the first > >> place, followed by a decision about the representation of the added > >> elements. > >> > >> DoDi > >> > > > > Indeed, contributions to Delphi 2009 syntax are welcome. I don't own any > > Delphi now, so I can only offer applying the patch if someone will > > submit one :) > > We also can wait for the FPC parser/grammar, compatible with D2009. > > I'd prefer to use the FPC parser immediately, as seems to be done in > FPDoc, but I'm not sure where that parser resides, and how it can be > used outside of FPC. > > > For starters, just to make it basically parsed, I would even accept a > > patch that parses it dumbly and places class name = > > "TObjectList<MyClass>". That is, the simplest approach to just treat > > whole "TObjectList<MyClass>" as a single identifier, without linking it > > to the generic TObjectList. Of course, a better patch would be most > > welcome ---I'm just saying that any crude solution will be accepted in > > the meantime (as long as it doesn't break any normal parsing of course). > > More extensions to the parser are required, new keywords like "generic" > and the related syntax, etc. This is not really correct. To use e.g. a generic TObjectList you need to include the unit "Generics.Collections" and may then write something like: type TMyList = TObjectList<TStringList>; This creates a generic descendant of TObjectList containing TStringLists. Michalis "dirty" solution isy at least be a solution for the most used new feature of Delphi 2009. Of course for other new things like anonymous methods, writing own generics (which needs a type called <T> as Placeholder for the later used class), a correct complete grammar ist needed - which I cannot provide, since I don't really understand how PasDoc works and how changes like these need to be planned and implemented. > > > DoDi: remember that bug submitters do not have to be subscribed to > > mailing list, so it's best to answer by adding a comment to the bug. (In > > this case Thomas is subscribed, just mentioning...). > > Thanks for the hint :-) > > DoDi > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Pasdoc-main mailing list > Pas...@li... > https://lists.sourceforge.net/lists/listinfo/pasdoc-main -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger |