Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.8 KiB

  1. // Object Path BNF
  2. // ================
  3. // The first part of the grammar is the ns path.
  4. // =============================================
  5. <Parse> ::= BACKSLASH <ns_or_server>;
  6. <Parse> ::= IDENT <ns_or_class>; // Save initial IDENT, since we don't know what it is
  7. <Parse> ::= COLON <objref>;
  8. // In the case of a server or ns prefix, we allow the objref portion to be missing.
  9. // ================================================================================
  10. <ns_or_server> ::= BACKSLASH <dot_or_ident> BACKSLASH <ns_list> <optional_objref>;
  11. <ns_or_server> ::= <ns_list> <optional_objref>;
  12. <dot_or_ident> ::= IDENT;
  13. <dot_or_ident> ::= DOT;
  14. <optional_objref> ::= COLON <objref>;
  15. <optional_objref> ::= <>;
  16. <ns_or_class> ::= COLON <ident_becomes_ns> <objref>;
  17. <ns_or_class> ::= BACKSLASH <ident_becomes_ns> <ns_list> COLON <objref>;
  18. <ns_or_class> ::= <ident_becomes_class> <objref_rest>;
  19. <ns_list> ::= IDENT <ns_list_rest>;
  20. <ns_list_rest> ::= BACKSLASH <ns_list>;
  21. <ns_list_rest> ::= <>;
  22. <ident_becomes_ns> ::= <>; // <initial_ident> becomes a namespace
  23. <ident_becomes_class> ::= <>; // <initial_ident> becomes the class
  24. // The following portion is the object reference within the namespace.
  25. // ===================================================================
  26. <objref> ::= IDENT <objref_rest>; // IDENT is classname
  27. <objref_rest> ::= EQUALS <key_const>;
  28. <objref_rest> ::= DOT <keyref_list>;
  29. <objref_rest> ::= <>;
  30. <keyref_list> ::= <keyref> <keyref_term>;
  31. <keyref_term> ::= COMMA <keyref_list>; // Used for compound keys
  32. <keyref_term> ::= <>;
  33. <keyref> ::= <propname> EQUALS <key_const>;
  34. <propname> ::= IDENT;
  35. <key_const> ::= STRING_CONST;
  36. <key_const> ::= INTEGRAL_CONST;
  37. <key_const> ::= REAL_CONST;
  38. <key_const> ::= IDENT; // Where IDENT is "OBJECT"
  39. // This is for singleton classes