//*************************************************************************** // // (c) 1995-2001 by Microsoft Corp. // // MOF.BNF // // BNF definition for MOF syntax. This grammar is suitable for // recursive descent or LL(1) parsing. Terminals are in upper case, // nonterminals are enclosed in angle brackets. // // a-raymcc 03-Oct-95 Created. // a-raymcc 26-Jan-96 New syntax for references, aliases, and // 'Interface' declarations // //*************************************************************************** // Start symbol. // ============= ::= ; ::= ; ::= ; ::= <>; // Preprocessor commands // ===================== ::= ; ::= ; ::= TOK_PRAGMA ; ::= TOK_LINE TOK_UNSIGNED_NUMERIC_CONST TOK_LPWSTR; ::= TOK_INCLUDE ; ::= TOK_DEFINE TOK_SIMPLE_IDENT ; // where the string is always "namespace" ::= TOK_SIMPLE_IDENT TOK_OPEN_PAREN TOK_LPWSTR TOK_CLOSE_PAREN; ::= TOK_AMENDMENT TOK_OPEN_PAREN TOK_LPWSTR TOK_CLOSE_PAREN; ::= TOK_CLASSFLAGS TOK_OPEN_PAREN TOK_CLOSE_PAREN; ::= TOK_INSTANCEFLAGS TOK_OPEN_PAREN TOK_CLOSE_PAREN; ::= TOK_AUTORECOVER; ::= TOK_DELETECLASS TOK_OPEN_PAREN TOK_LPWSTR TOK_COMMA TOK_CLOSE_PAREN; ::= TOK_INSTANCELOCALE TOK_OPEN_PAREN TOK_LPWSTR TOK_CLOSE_PAREN; ::= TOK_LOCALE TOK_OPEN_PAREN TOK_LPWSTR TOK_CLOSE_PAREN; ::= TOK_NONLOCALTYPE TOK_OPEN_PAREN TOK_LPWSTR TOK_CLOSE_PAREN; ::= TOK_NONLOCAL TOK_OPEN_PAREN TOK_LPWSTR TOK_CLOSE_PAREN; ::= TOK_SOURCE TOK_OPEN_PAREN TOK_LPWSTR TOK_CLOSE_PAREN; ::= TOK_SOURCETYPE TOK_OPEN_PAREN TOK_LPWSTR TOK_CLOSE_PAREN; ::= FAIL; ::= NOFAIL; ::= TOK_LPWSTR ; ::= TOK_UNSIGNED_NUMERIC_CONST; ::= <>; ::= <>; ::= TOK_COMMA TOK_LPWSTR ; ::= ; ::= ; ::= TOK_SEMI; ::= TOK_SEMI; ///////////////////////////////////////// // // Typedef support // ::= TOK_TYPEDEF TOK_SIMPLE_IDENT TOK_SEMI; ::= ; ::= ; ::= TOK_ENUM TOK_OPEN_BRACE TOK_CLOSE_BRACE; ::= ; ::= ; ::= TOK_LPWSTR ; ::= <>; ::= TOK_COMMA ; ::= ; ::= <>; ::= TOK_COMMA ; ::= TOK_LPWSTR; ::= <>; ::= TOK_SIMPLE_IDENT TOK_EQUALS; ::= <>; ::= TOK_SUBRANGE TOK_OPEN_PAREN TOK_DOT TOK_DOT TOK_CLOSE_PAREN; //////////////////////////////////////////////////////////// // // Class declaration // ::= TOK_CLASS TOK_SIMPLE_IDENT // Class name ; ::= TOK_OPEN_BRACE TOK_CLOSE_BRACE; ::= <>; ::= ; ::= <>; ::= TOK_COLON ; ::= <>; ::= TOK_SIMPLE_IDENT; ::= TOK_SYSTEM_IDENT; //////////////////////////////////////////////////////////// // // Property/Method declarations. // ::= ; ::= ; ::= TOK_VOID TOK_SIMPLE_IDENT ; ::= ; ::= ; ::= TOK_SEMI; ::= TOK_OPEN_PAREN TOK_CLOSE_PAREN TOK_SEMI; ::= TOK_SIMPLE_IDENT; ::= ; ::= <>; ::= ; ::= TOK_COMMA ; ::= <>; ::= TOK_REF; ::= <>; ::= TOK_OPEN_BRACKET ; ::= <>; ::= TOK_UNSIGNED_NUMERIC_CONST TOK_CLOSE_BRACKET; ::= TOK_CLOSE_BRACKET; ::= <>; ::= TOK_EQUALS ; //////////////////////////////////////////////////////////// // // Instances. // ::= TOK_INSTANCE TOK_OF TOK_OPEN_BRACE TOK_CLOSE_BRACE; ::= ; ::= <>; ::= TOK_SIMPLE_IDENT TOK_EQUALS TOK_SEMI; ::= TOK_AS ; ::= <>; //////////////////////////////////////////////////////////// // // Qualifiers. // // This allows comma delimited identifiers, or identifiers // in functional notation with a const parm list. // ::= TOK_OPEN_BRACKET TOK_CLOSE_BRACKET; ::= <>; ::= ; ::= TOK_COMMA ; ::= <>; ::= TOK_SIMPLE_IDENT ; ::= TOK_EXTERNAL; ::= TOK_OPEN_PAREN TOK_CLOSE_PAREN TOK_COLON ; ::= TOK_OPEN_BRACE TOK_CLOSE_BRACE TOK_COLON ; ::= ; ::= TOK_COLON ; ::= <>; ::= ; ::= ; ::= <>; ::= TOK_TOINSTANCE; ::= TOK_NOTTOINSTANCE; ::= TOK_TOSUBCLASS; ::= TOK_NOTTOSUBCLASS; ::= TOK_ENABLEOVERRIDE; ::= TOK_DISABLEOVERRIDE; ::= TOK_RESTRICTED; ::= TOK_AMENDED; ///////////////////////////////////////////////////////////////////////////// // ::= TOK_PLUS; ::= <>; ::= ; ::= TOK_SIGNED_NUMERIC_CONST; ::= TOK_UNSIGNED_NUMERIC_CONST; ::= TOK_SIGNED64_NUMERIC_CONST; ::= TOK_UNSIGNED64_NUMERIC_CONST; ::= TOK_LPSTR; ::= TOK_LPWSTR; ::= TOK_CHAR; ::= TOK_WCHAR; ::= ; ::= ; ::= ; ::= TOK_UUID; ::= TOK_KEYWORD_NULL; ::= ; ::= TOK_EXTERNAL; ::= TOK_OPEN_BRACE TOK_CLOSE_BRACE; ::= ; ::= ; ::= ; ::= ; ::= ; ::= TOK_COMMA ; ::= <>; ::= TOK_DOLLAR_SIGN TOK_SIMPLE_IDENT; ///////////////////////////////////////////////////////////////////////// // // Qualifier defaults // ::= TOK_QUALIFIER TOK_SIMPLE_IDENT TOK_COLON ; ::= ; ::= TOK_EQUALS TOK_COMMA TOK_SCOPE TOK_OPEN_PAREN TOK_CLOSE_PAREN ; ::= TOK_COMMA TOK_FLAVOR OK_OPEN_PAREN TOK_CLOSE_PAREN; ::= <>; ::= ; ::= TOK_COMMA ; ::= <>; ::= TOK_ANY; ::= TOK_ASSOCIATION; ::= TOK_INSTANCE; ::= TOK_CLASS; ::= TOK_METHOD; ::= TOK_PARAMETER; ::= TOK_PROPERTY; ::= ; ::= TOK_COMMA ; ::= <>;