
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