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.

83 lines
1.7 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 4
  14. typedef struct _kwdlist {
  15. DWORD dwTokenId;
  16. LPWSTR Keyword;
  17. } KWDLIST, *PKWDLIST;
  18. class FAR CLexer
  19. {
  20. public:
  21. CLexer(LPWSTR szBuffer);
  22. ~CLexer();
  23. BOOL
  24. CLexer::IsKeyword(LPWSTR szToken, LPDWORD pdwToken);
  25. WCHAR
  26. CLexer::NextChar();
  27. void
  28. CLexer::PushbackChar();
  29. HRESULT
  30. CLexer::GetNextToken(LPWSTR szToken, LPDWORD pdwToken);
  31. HRESULT
  32. CLexer::PushBackToken();
  33. void
  34. CLexer::SetAtDisabler(BOOL bFlag);
  35. BOOL
  36. CLexer::GetAtDisabler();
  37. private:
  38. LPWSTR _ptr;
  39. LPWSTR _Buffer;
  40. DWORD _dwLastTokenLength;
  41. DWORD _dwLastToken;
  42. DWORD _dwEndofString;
  43. BOOL _bAtDisabled;
  44. };
  45. HRESULT
  46. ADsObject(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  47. HRESULT
  48. IISObject(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  49. HRESULT
  50. PathName(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  51. HRESULT
  52. Component(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  53. HRESULT
  54. Type(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  55. HRESULT
  56. ProviderName(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  57. HRESULT
  58. AddTreeName(POBJECTINFO pObjectInfo, LPWSTR szToken);
  59. HRESULT
  60. AddClassName(POBJECTINFO pObjectInfo, LPWSTR szToken);
  61. HRESULT
  62. SetType(POBJECTINFO pObjectInfo, DWORD dwToken);