All,

As I am writing tools that parse OSGi metadata I've run across a minor issue that bothers me.

From the 4.1 version of the Core Specification, Section 3.2.1.12 gives the example Bundle-NativeCode:

    /lib/http.DLL; osname = QNX; osversion = 3.1

According to 3.2.3 Common Header Syntax:

    header ::= clause ( ',' clause ) *
    clause ::= ( ';' path ) * ( ';' parameter ) *

Thus the "osversion = 3.1" is a parameter.

According to 1.3.2 General Syntax Definitions

    parameter ::= directive | attribute
    attribute ::= token '=' argument

Thus "osversion = 3.1" is an attribute, and 3.1 is the argument.

Also according to 1.3.2 General Syntax Definitions

    argument ::= token | quoted-string

The argument 3.1 is not a quoted string, thus it is a token, which is

    token ::= ( alphanum | '_' | '-' )+
    alphanum ::= alpha | digit
    alpha ::= [a..zA..Z]
    digit ::= [0..9]

Well, 3.1 contains a period/dot, which is *not* a valid token character.

Shouldn't the 3.1 be in quotes, as in

    /lib/http.DLL; osname = QNX; osversion = "3.1"

Am I missing something? How rigorous or forgiving should a header parser be? How rigorous is OSGi metadata in practice?

/djk

_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev

Reply via email to