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.

80 lines
1.4 KiB

  1. #define MAX_TOKEN_LENGTH 257 // group names can be upto 256 chars, plus one byte for string terminator
  2. #define MAX_KEYWORDS 16
  3. typedef struct _kwdlist {
  4. DWORD dwTokenId;
  5. LPWSTR Keyword;
  6. } KWDLIST, *PKWDLIST;
  7. class FAR CLexer
  8. {
  9. public:
  10. CLexer(LPWSTR szBuffer);
  11. ~CLexer();
  12. BOOL
  13. CLexer::IsKeyword(LPWSTR szToken, LPDWORD pdwToken);
  14. WCHAR
  15. CLexer::NextChar();
  16. void
  17. CLexer::PushbackChar();
  18. HRESULT
  19. CLexer::GetNextToken(LPWSTR szToken, LPDWORD pdwToken);
  20. HRESULT
  21. CLexer::GetNextToken(LPWSTR szToken, LPWSTR szDisplayToken, LPDWORD pdwToken);
  22. HRESULT
  23. CLexer::PushBackToken();
  24. void
  25. CLexer::SetAtDisabler(BOOL bFlag);
  26. BOOL
  27. CLexer::GetAtDisabler();
  28. HRESULT
  29. CLexer::SetBuffer(LPWSTR pszBuffer);
  30. private:
  31. LPWSTR _ptr;
  32. LPWSTR _Buffer;
  33. DWORD _dwLastTokenLength;
  34. DWORD _dwLastToken;
  35. DWORD _dwEndofString;
  36. BOOL _bAtDisabled;
  37. };
  38. HRESULT
  39. Object(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  40. HRESULT
  41. DsPathName(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  42. HRESULT
  43. PathName(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  44. HRESULT
  45. Component(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  46. HRESULT
  47. Type(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  48. HRESULT
  49. ProviderName(CLexer * pTokenizer, POBJECTINFO pObjectInfo);
  50. HRESULT
  51. GetDisplayName(
  52. LPWSTR szName,
  53. LPWSTR *ppszDisplayName
  54. );