
Marcin/Juergen, Thank you for your prompt replies to my question and for the link to the ASN.1 standard,
Kristine Adamson IBM z/OS Communications Server: TCP/IP Development Phone: (919) 254-7911 T/L 444-7911 Internet e-mail:adamson@us.ibm.com
Marcin Cieslak saper@saper.info Sent by: libsmi-bounces@ibr.cs.tu-bs.de 03/05/2010 06:43 PM
To Juergen Schoenwaelder j.schoenwaelder@jacobs-university.de cc "libsmi@ibr.cs.tu-bs.de" libsmi@ibr.cs.tu-bs.de, Kristine Adamson/Raleigh/IBM@IBMUS Subject Re: [libsmi] smilint - missed syntax error?
On Sat, 6 Mar 2010, Juergen Schoenwaelder wrote:
On Fri, Mar 05, 2010 at 09:33:38PM +0100, Kristine Adamson wrote:
We have been using the smilint function of libsmi for a while to validate changes to our enterprise-specific MIB modules. A MIB browser recently raised a syntax error when processing one of our MIB modules.
The
error applied to this definition:
ibmProd1Compliances OBJECT IDENTIFIER ::= { ibmProd1Conformance 1 }
The MIB browser required all the parts of this definition to be on one line in the MIB module. But smilint did not flag this definition as a syntax error. Should MIB browsers be able to process this definition successfully? I have read "Understanding SNMP MIBs" by Perkins and McGinnis, and they seem to indicate that white space includes line terminators.
As far as I know, this is legal ASN.1 and if so this is legal SMIv2. The snacc compiler considers this valid ASN.1 as well. I do not have an ASN.1 specification handy so I can't give an authoritative answer.
X.680 ( http://www.itu.ch/rec/dologin_pub.asp?lang=e&id=T-REC-X.680-200811-I!!PD... ) says:
5.6 Layout
Each production used in this Recommendation | International Standard is preceded and followed by an empty line. Empty lines do not appear within productions. The production may be on a single line, or may be spread over several lines. Layout is not significant.
12 ASN.1 lexical items 12.1 General rules 12.1.1 The following subclauses specify the characters in lexical items. In each case the name of the lexical item is given, together with the definition of the character sequences which form the lexical item. 12.1.2 The lexical items specified in the subclauses of this clause 12 (except multiple-line "comment", "bstring", "hstring" and "cstring") shall not contain white-space (see 12.6, 12.10, 12.12 and 12.14). 12.1.3 The length of a line is not restricted. 12.1.4 Lexical items may be separated by one or more occurrences of white-space (see 12.1.6) or comments (see 12.6) except when the non-spacing indicator "&" (see 5.4) is used. Within an "XMLTypedValue" production (see 16.2), white-space may appear between lexical items, but the "comment" lexical item shall not be present. NOTE ? This is to avoid ambiguity resulting from the presence of adjacent hyphens or asterisk and solidus within an "xmlcstring" lexical item. Such characters never indicate the start of a "comment" lexical item when they appear within an "XMLTypedValue" production. 12.1.5 A lexical item shall be separated from a following lexical item by one or more instances of white-space or comment if the initial character (or characters) of the following lexical item is a permitted character (or characters) for inclusion at the end of the characters in the earlier lexical item. 12.1.6 This Recommendation | International Standard uses the terms "newline", and "white-space". In representing white-space and newline (end of line) in machine-readable specifications, any one or more of the following characters may be used in any combination (for each character, the character name and character code specified in The Unicode Standard are given):
For white-space: HORIZONTAL TABULATION (9) LINE FEED (10) VERTICAL TABULATION (11) FORM FEED (12) CARRIAGE RETURN (13) SPACE (32) For newline: LINE FEED (10) VERTICAL TABULATION (11) FORM FEED (12) CARRIAGE RETURN (13)
NOTE ? Any character or character sequence that is a valid newline is also a valid white-space.
Sounds okay to me
--Marcin-- !! 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://mail.ibr.cs.tu-bs.de/mailman/listinfo/libsmi.