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.

70 lines
2.0 KiB

  1. // Copyright (c)1997-1999 Microsoft Corporation, All Rights Reserved
  2. #ifndef __LEXHTML__
  3. #define __LEXHTML__
  4. #include "lex.h"
  5. #include "tokhtml.h"
  6. #define DS_HTML_IE3 _T("HTML - IE 3.0")
  7. #define DS_HTML_RFC1866 _T("HTML 2.0 (RFC 1866)")
  8. // token hints
  9. #define BASED_HINT 0x9000
  10. #define ERR BASED_HINT + 0 // error
  11. #define HWS BASED_HINT + 1 // white space
  12. #define HST BASED_HINT + 2 // string "..."
  13. #define HSL BASED_HINT + 3 // string alternate '...'
  14. #define HNU BASED_HINT + 5 // number
  15. #define HKW BASED_HINT + 6 // keyword
  16. #define HEN BASED_HINT + 7 // entity &...;
  17. #define HRN BASED_HINT + 8 // reserved name #...
  18. #define HEP BASED_HINT + 9 // parameter entity %...;
  19. #define HTA BASED_HINT + 10 // tag open <
  20. #define HTE BASED_HINT + 11 // tag end >
  21. #define HDB BASED_HINT + 12 // dbcs (> 128). HTMED CHANGE (walts)
  22. #define HAV BASED_HINT + 13 // valid attr value start char HTMED CHANGE (walts)
  23. // strictly single ops
  24. #define ODA tokOpDash
  25. #define OCO tokOpComma
  26. #define OPI tokOpPipe
  27. #define OPL tokOpPlus
  28. #define OEQ tokOpEqual
  29. #define OST tokOpStar
  30. #define OLP tokOpLP
  31. #define ORP tokOpRP
  32. #define OLB tokOpLB
  33. #define ORB tokOpRB
  34. #define OQU tokOpQuestion
  35. #define OLC tokDELI_LCBKT
  36. #define ORC tokDELI_RCBKT
  37. #define ONL tokNEWLINE
  38. #define EOS tokEOF
  39. typedef unsigned short HINT;
  40. typedef BYTE RWATT_T;
  41. //
  42. // Reserved Word Attributes - HTML variant
  43. //
  44. enum RWATT
  45. {
  46. HTML2 = 0x01, // RFC 1866
  47. // IEXP2 = 0x02, // Internet Explorer 2.0
  48. IEXP3 = 0x04, // Internet Explorer 3.0
  49. ALL = 0xff, // all browsers
  50. };
  51. #define IEXPn (IEXP3)
  52. #define IE40 (ALL)
  53. typedef struct ReservedWord
  54. {
  55. TCHAR * psz; // pointer to reserved word string
  56. BYTE cb; // length of reserved word
  57. RWATT_T att; // attributes
  58. } ReservedWord;
  59. #endif // __LEXHTML__