However, while this notation is convenient for describing the MOF syntax clearly, it should be noted that the MOF syntax has been defined so as to be expressible in an LL(1)-parsable grammar. This has been done to allow low-footprint implementations of MOF compilers.
In addition, the following points should be noted:
mofSpecification | *mofProduction | |
mofProduction | compilerDirective | | |
classDeclaration | | ||
assocDeclaration | | ||
qualifierDeclaration | | ||
instanceDeclaration | ||
compilerDirective | PRAGMA pragmaName "(" pragmaParameter ")" | |
pragmaName | IDENTIFIER | |
pragmaParameter | stringValue | |
classDeclaration | [ qualifierList ] | |
CLASS className [ alias ] [ superClass ] | ||
"{" *classFeature "}" ";" | ||
assocDeclaration | "[" ASSOCIATION *( "," qualifier ) "]" | |
CLASS className [ alias ] [ superClass ] | ||
"{" *associationFeature "}" ";" | ||
// Context: | ||
// The remaining qualifier list must not include | ||
// the ASSOCIATION qualifier again. If the | ||
// association has no super association, then at | ||
// least two references must be specified | ||
// ASSOCIATION qualifier may be omitted in | ||
// sub associations. | ||
className | schemaName "_" IDENTIFIER // NO whitespace | |
// Context: | ||
// Schema name must not include "_" | ||
alias | AS aliasIdentifer | |
aliasIdentifer | "$" IDENTIFIER // NO whitespace | |
superClass | ":" className | |
classFeature | propertyDeclaration | methodDeclaration | |
associationFeature | classFeature | referenceDeclaration | |
qualifierList | "[" qualifier *( "," qualifier ) "]" | |
qualifier | qualifierName [ qualifierParameter ] [ ":" 1*flavor ] | |
qualifierParameter | "(" constantValue ")" | arrayInitializer | |
flavor | ENABLEOVERRIDE | DISABLEOVERRIDE | RESTRICTED | | |
TOSUBCLASS | TRANSLATABLE | ||
propertyDeclaration | [ qualifierList ] dataType propertyName | |
[ array ] [ defaultValue ] ";" | ||
referenceDeclaration | [ qualifierList ] objectRef referenceName | |
[ defaultValue ] ";" | ||
methodDeclaration | [ qualifierList ] dataType methodName | |
"(" [ parameterList ] ")" ";" | ||
propertyName | IDENTIFIER | |
referenceName | IDENTIFIER | |
methodName | IDENTIFIER | |
dataType | DT_UINT8 | DT_SINT8 | DT_UINT16 | DT_SINT16 | | |
DT_UINT32 | DT_SINT32 | DT_UINT64 | DT_SINT64 | | ||
DT_REAL32 | DT_REAL64 | DT_CHAR16 | | ||
DT_STR | DT_BOOL | DT_DATETIME | ||
objectRef | className REF | |
parameterList | parameter *( "," parameter ) | |
parameter | [ qualifierList ] (dataType|objectRef) parameterName | |
[ array ] | ||
// Context: | ||
// The qualifier list for "parameter" is restricted | ||
// to IN, OUT, or both. | ||
parameterName | IDENTIFIER | |
array | "[" [positiveDecimalValue] "]" | |
positiveDecimalValue | positiveDecimalDigit *decimalDigit | |
defaultValue | "=" initializer | |
initializer | simpleInitializer | arrayInitializer | objectPath | |
simpleInitializer | constantValue | aliasIdentifier | |
arrayInitializer | "{" simpleInitializer *( "," simpleInitializer )"}" | |
constantValue | integerValue | realValue | charValue | stringValue | | |
booleanValue | nullValue | objectPath | ||
integerValue | binaryValue | octalValue | decimalValue | hexValue | |
qualifierDeclaration | QUALIFIER qualifierName qualifierType scope | |
[ defaultFlavor ] ";" | ||
qualifierName | IDENTIFIER | |
qualifierType | ":" dataType [ array ] [ defaultValue ] | |
scope | "," SCOPE "(" metaElement *( "," metaElement ) ")" | |
metaElement | SCHEMA | CLASS | ASSOCIATION | INDICATION | QUALIFIER | |
PROPERTY | REFERENCE | METHOD | PARAMETER | ANY | ||
defaultFlavor | "," FLAVOR "(" flavor *( "," flavor ) ")" | |
instanceDeclaration | [ qualifierList ] INSTANCE OF className [ alias ] | |
"{" 1*propertyInit "}" ";" | ||
propertyInit | [ qualifierList ] propertyName "=" initializer ";" | |
// Context: | ||
// Note that associations may be instantiated also, | ||
// and thus references may be initialized. The | ||
// assigned value must be compatible with the | ||
// feature type. For a reference, the assigned | ||
// value is either a string that holds an object | ||
// key or an alias that indirectly holds it. |
The following productions do not allow whitespaces between the terms:
namespacePath | """ [ host ] localNsPath """ | |
host | ( "\\" | "//" ) ( "." | hostName | address ) | |
hostName | 1*ucs2Character | |
// Context: | ||
// An unquoted string that specifies a host name | ||
// that can be resolved to a network address. | ||
// May not contain forward slash, backslash, or | ||
// colon. | ||
address | 1*ucs2Character | |
// Context: | ||
// An unquoted string that specifies a network | ||
// address in a standard format (for example, | ||
// an IPaddress in dotted decimal notation). | ||
localNsPath | 1*( ( "/" | "\" ) namespaceName ) | |
namespaceName | IDENTIFIER | |
schemaName | IDENTIFIER | |
// Context: | ||
// Schema name must not include "_" | ||
objectPath | stringValue | |
// Context: | ||
// A special string that serves as reference to | ||
// an object instance. It consists of an optional | ||
// namespace path followed by the object keys, | ||
// including the scoping hierarchy. See related | ||
// sections on object keys and naming for more | ||
// information. | ||
fileName | stringValue | |
binaryValue | [ "+" | "-" ] 1*binaryDigit ( "b" | "B" ) | |
binaryDigit | "0" | "1" | |
octalValue | [ "+" | "-" ] "0" 1*octalDigit | |
octalDigit | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | |
decimalValue | [ "+" | "-" ] ( positiveDecimalDigit *decimalDigit | "0" ) | |
decimalDigit | "0" | positiveDecimalDigit | |
positiveDecimalDigit | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | |
hexValue | [ "+" | "-" ] ( "0x" | "0X" ) 1*hexDigit | |
hexDigit | decimalDigit | "a" | "A" | "b" | "B" | "c" | "C" | | |
"d" | "D" | "e" | "E" | "f" | "F" | ||
realValue | [ "+" | "-" ] *decimalDigit "." 1*decimalDigit | |
[ ( "e" | "E" ) [ "+" | "-" ] 1*decimalDigit ] | ||
charValue | // any single-quoted Unicode-character, except | |
// single quotes | ||
stringValue | 1*( """ *ucs2Character """ ) | |
ucs2Character | // any valid UCS-2-character | |
booleanValue | TRUE | FALSE | |
nullValue | NULL |
ANY | "any" | |
AS | "as" | |
ASSOCIATION | "association" | |
CLASS | "class" | |
DISABLEOVERRIDE | "disableOverride" | |
DT_BOOL | "boolean" | |
DT_CHAR16 | "char16" | |
DT_DATETIME | "datetime" | |
DT_REAL32 | "real32" | |
DT_REAL64 | "real64" | |
DT_SINT16 | "sint16" | |
DT_SINT32 | "sint32" | |
DT_SINT64 | "sint64" | |
DT_SINT8 | "sint8" | |
DT_STR | "string" | |
DT_UINT16 | "uint16" | |
DT_UINT32 | "uint32" | |
DT_UINT64 | "uint64" | |
DT_UINT8 | "uint8" | |
ENABLEOVERRIDE | "enableoverride" | |
FALSE | "false" | |
FLAVOR | "flavor" | |
INDICATION | "indication" | |
INSTANCE | "instance" | |
METHOD | "method" | |
NULL | "null" | |
OF | "of" | |
PARAMETER | "parameter" | |
PRAGMA | "#pragma" | |
PROPERTY | "property" | |
QUALIFIER | "qualifier" | |
REF | "ref" | |
REFERENCE | "reference" | |
RESTRICTED | "restricted" | |
SCHEMA | "schema" | |
SCOPE | "scope" | |
TOSUBCLASS | "tosubclass" | |
TRANSLATABLE | "translatable" | |
TRUE | "true" |
Contents | Next section | Index |