parse.h
上传用户:xhy777
上传日期:2007-02-14
资源大小:24088k
文件大小:1k
源码类别:

系统编程

开发平台:

Visual C++

  1. #ifndef _PARSE_H_
  2. #define _PARSE_H_
  3. #ifdef __cplusplus
  4. #define CHAR_EOF    -1
  5. class CParseFile
  6. {
  7. public:
  8.     void    Parse(FILE * pfileSrc, FILE * pfileDest, DWORD dwFlags);
  9.     
  10.     CParseFile();
  11.     ~CParseFile() {};
  12.     
  13. private:
  14.     void    _ParseInf(void);
  15.     void    _ParseHtml(void);
  16.     void    _ParseJS(void);
  17.     void    _ParseHtc(void);
  18.     
  19.     char    _ReadChar(DWORD dwFlags);
  20.     char    _SniffChar(int ichAhead);
  21.     BOOL    _IsTagEqual(LPSTR pszTag);
  22.     
  23.     void    _WriteChar(char);
  24.     void    _FlushWriteBuffer(void);
  25.     
  26.     void    _WriteTag(void);
  27.     void    _SkipCommentTag(void);
  28.     BOOL    _SkipComment(int * pcNestedComment);
  29.     BOOL    _SkipWhitespace(void);
  30.     void    _ParseInnerStyle(void);
  31.     FILE *  _pfileSrc;
  32.     FILE *  _pfileDest;
  33.     
  34.     char    _ch;
  35.     int     _ichRead;
  36.     int     _cchRead;
  37.     int     _ichWrite;
  38.     BITBOOL _bSkipWhitespace: 1;        // TRUE: skip whitespace
  39.     BITBOOL _bFirstChar: 1;             // TRUE: current character is first one on a new line
  40.     
  41.     char    _szReadBuf[512];
  42.     char    _szWriteBuf[512];
  43. };
  44. #endif // __cplusplus
  45. #endif // _PARSE_H_