
Hi Mark,
FYI, MIB Designer (http://www.mibdesigner.com) also supports editing of comments around object definitions and at the beginning and the end of a MIB file.
In addition, it supports exporting of MIBs into XML using the SMI DTD DRAFT Juergen Schoenwaelder proposed. I also missed ASN.1 comments in the DTD, while understanding and agreeing to the arguments against supporting ASN.1 comments in higher level representations of SMI definitions.
My idea is to create a XSLT based converter from XML to PDF. I hope I get some time within the next months to implement it.
Best regards, Frank
Mark Kaplun wrote:
From practical point of view, the need for preserving comments may arise
when designing a MIB editor. It is usualy unexceptable for an editor to omit information which was at the original file.
There is at least one editor (MG-SOFT MIB builder) which lets the MIB designer to add comments to the MIB before or after a node.
Another practical application is the generation of HTML with syntax coloring out of MIBs.
I agree that the implementation is probably not a trivial one. What I would have done, is to start with an easy case (multiple lines of comments between nodes) while trying to lay out an infrastructure, and handle all other cases when the need arises (the case where comments are placed between "SYNTAX" and "INTEGER" will be delayed till infinity ;-).
----- Original Message ----- From: "David T. Perkins" dperkins@dsperkins.com To: "Mark Kaplun" markk5@bezeqint.net; "Frank Strauss" strauss@ibr.cs.tu-bs.de Cc: libsmi@ibr.cs.tu-bs.de Sent: Thursday, May 30, 2002 12:48 AM Subject: Re: [libsmi] preserving comments
HI Mark,
In SMICng, I have a flag to "capture" comments. Its been in there for many years. However, the hard part is associating the comments with the proper item(s). How to do this varies with the style of writing comments. For example, one of the reasons for capturing comments is to get the description of enumerated values, such as SYNTAX INTEGER { a(1), -- when condition a b(2), -- when condition b c(3), -- when condition c d(4) -- when condition d } As shown above, this is the simple and easy case. Here is another example: SYNTAX INTEGER { -- values that can only be written a(1), -- when condition a b(2), -- when condition b -- values that can only be read c(3), -- when condition c -- values that can be written and read d(4) -- when condition d }
And how do you write comments that are over multiple lines? For example: SYNTAX INTEGER { -- when condition a, and blah, blah, blah a(1), -- more about a, blah, blah
-- or this way b(2) -- when condition b, and blah, blah, blah -- more about b, blah, blah }
Many years ago, I made several proposals to extend the syntax of MIB modules to capture more of text that is associated with different parts. They were not well received because of the additional work that would be needed to MIB modules. For example: SYNTAX ENUM { WRITE-ONLY { VALUE a(1) DESCRIPTION "when condition a", VALUE b(2) DESCRIPTION "when condition b" } READ-ONLY { VALUE c(3) DESCRIPTION "when condition c" } READ-WRITE { VALUE d(4) DESCRIPTION "when condition d" } }
And by the way on SMICng, yes, it can save the comments, but doesn't do anything with them yet (other than print them out, if requested).
At 11:57 PM 5/29/2002 +0200, Mark Kaplun wrote:
----- Original Message ----- From: "Frank Strauss" strauss@ibr.cs.tu-bs.de To: "Mark Kaplun" markk5@bezeqint.net Cc: libsmi@ibr.cs.tu-bs.de Sent: Saturday, May 25, 2002 2:48 PM Subject: Re: [libsmi] preserving comments
[snip part which should be disccused at IETF WG]
Mark> The way I see libsmi, it is a generic tool to compile MIB files Mark> to other formats/langauges, therefor I don't see the point of Mark> limiting the generated format to "formats which do not contain Mark> comment information".
I agree. But I think, that's not the point.
This is realy my only point. I will leave the IETF to worry about whether comments are needed at all, and how to standertise the data in the descriptions, but while they are here and people are adding comments to
MIB
files, I think that libsmi should to something with them and not just
ignore
the text contained in them.
I would gladly contribute some time for adding comment support to libsmi, but the last time I have done any YACC/LEX coding was sometime at the prehistoric times. so I will require help at that aspect. If there is
anyone
who feels it is a worthy cuase and have some YACC experience he can
contact
me.
Mark.
-- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or
adjust
!! your settings, send a mail message to libsmi-request@ibr.cs.tu-bs.de !! or look at https://www.ibr.cs.tu-bs.de/mailman/listinfo/libsmi.
Regards, /david t. perkins
-- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or
adjust
!! your settings, send a mail message to libsmi-request@ibr.cs.tu-bs.de !! or look at https://www.ibr.cs.tu-bs.de/mailman/listinfo/libsmi.
-- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to libsmi-request@ibr.cs.tu-bs.de !! or look at https://www.ibr.cs.tu-bs.de/mailman/listinfo/libsmi.