Subject: RE: DocBook function synopsis From: "Frank A. Christoph" <christo@xxxxxxxxxxxxxxxxxx> Date: Thu, 9 Jul 1998 16:53:22 +0900 |
>> I added three attributes to FuncDef in the declaration subset, "Class" which >> indicates what class the function is a member of (I'm not using it, but it >> seems potentially useful); "Dispatch" which would be "pure" for pure virtual >> functions, "virtual" for regular dynamically dispatched functions, and >> "static" for statically dispatched functions; and finally "Const" which is >> "const" for functions that don't modify the state, or "mutable" for those >> that do. > >I'm not sure if this breaks the spirit of DocBook but I'm sure this is not >scalable enough to handle any other language than C and C++. >I already had this problem with DocBook when I wrote some Java classes >documentation using it as a base DTD. Think of how you would define that the >function throws an exception. Of course. It's not intended to handle the general case. It's not even sufficient to handle C++ very well, since there should at least be a way of making a class synopsis. >I think a good solution would have to start from the grammars of the various >targeted languages and extract some generic pieces of information in a >function declaration to define the appropriate elements (not attributes) in a ><funcsynopsis>. Yes, but then you need something equivalent to a pretty printer and the situation becomes much more complex. One advantage of the current representation is that you don't have to deal with the deranged concrete syntax that C has for types. Even if I thought it were possible, I don't think it's worthwhile to generalize the situation to the point where every language could be encoded. But, granted, providing support for C, C++ and Java is a worthy goal. --FC DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: DocBook function synopsis, Mitch C. Amiano | Thread | RE: DocBook function synopsis, Frank A. Christoph |
Re: DocBook function synopsis, Lionel Mallet | Date | DSSSL -> Adept Screen FOSI, Chuck Darney |
Month |