Leaked source code of windows server 2003
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.

94 lines
1.9 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1997.
  5. //
  6. // File: parse.cxx
  7. //
  8. // Contents: Parser Object
  9. //
  10. // History:
  11. //----------------------------------------------------------------------------
  12. #define MAX_TOKEN_LENGTH MAX_PATH+1
  13. #define MAX_KEYWORDS 14
  14. typedef struct _kwdlist {
  15. DWORD dwTokenId;
  16. LPWSTR Keyword;
  17. } KWDLIST, *PKWDLIST;
  18. class FAR CLexer
  19. {
  20. public:
  21. CLexer();
  22. ~CLexer();
  23. // BOOL
  24. // CLexer::IsKeyword(LPWSTR szToken, LPDWORD pdwToken);
  25. HRESULT
  26. CLexer::Initialize(LPWSTR szBuffer);
  27. WCHAR
  28. CLexer::NextChar();
  29. void
  30. CLexer::PushbackChar();
  31. HRESULT
  32. CLexer::GetNextToken(LPWSTR szToken, LPDWORD pdwToken);
  33. HRESULT
  34. CLexer::PushBackToken();
  35. void
  36. CLexer::SetAtDisabler(BOOL bFlag);
  37. BOOL
  38. CLexer::GetAtDisabler();
  39. private:
  40. LPWSTR _ptr;
  41. LPWSTR _Buffer;
  42. DWORD _dwLastTokenLength;
  43. DWORD _dwLastToken;
  44. DWORD _dwEndofString;
  45. BOOL _bAtDisabled;
  46. };
  47. HRESULT
  48. ADsObject(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  49. HRESULT
  50. IISObject(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  51. HRESULT
  52. DsPathName(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  53. HRESULT
  54. PathName(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  55. HRESULT
  56. Component(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  57. HRESULT
  58. Type(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  59. HRESULT
  60. ProviderName(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  61. HRESULT
  62. AddTreeName(POBJECTINFO pObjectInfo, LPWSTR szToken);
  63. HRESULT
  64. SetType(POBJECTINFO pObjectInfo, DWORD dwToken);
  65. HRESULT
  66. SchemaPathName(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  67. HRESULT
  68. SchemaComponent(CLexer * pTokenizer, POBJECTINFO pObjectInfo);