librcsb-core-wrapper  1.005
DICScannerBase.h
Go to the documentation of this file.
1 //$$FILE$$
2 //$$VERSION$$
3 //$$DATE$$
4 //$$LICENSE$$
5 
6 
14 /*
15  PURPOSE: DDL 2.1 compliant CIF file lexer ...
16 */
17 
18 
19 #ifndef DICSCANNERBASE_H
20 #define DICSCANNERBASE_H
21 
22 
23 /*
24 #if !defined(DDL_FLEX_LEXER_INCLUDED)
25 #undef yyFlexLexer
26 #define yyFlexLexer DDLFlexLexer
27 #include <rcsb/FlexLexer.h>
28 #endif
29 */
30 
31 #include <string>
32 
33 
34 #include <fstream>
35 #include <stdio.h>
36 #include <string.h>
37 
38 #ifndef DEBUG
39 #define DEBUG 0
40 #endif
41 
42 
48 class DICScanner // : public DDLFlexLexer
49 {
50  protected:
51 
52  std::string *_tBuf;
53  int _isText;
54  int _i, _j, _len;
55 
56  protected:
57  std::ofstream log;
58  bool _verbose;
59  void alt_yymore(void);
60  void OpenLog(const std::string& logName, bool verboseLevel);
61 
62  public:
63  int NDBlineNo;
64  int isSave;
65  DICScanner(std::istream *yyin);
66  DICScanner();
67  void Clear();
68  void Reset();
69  int ProcessNone();
70  void ProcessWhiteSpace();
71  int ProcessData();
75  int ProcessLoopScanner();
76  void ProcessStop();
77  int ProcessDot();
78  int ProcessQuestion();
79  void ProcessComment();
84  int ProcessEof();
85  virtual int yylex();
86  virtual ~DICScanner() {Reset();};
87 };
88 
89 #endif
90 
DICScanner::ProcessLoopScanner
int ProcessLoopScanner()
DICScanner::_tBuf
std::string * _tBuf
Definition: DICScannerBase.h:52
DICScanner::_verbose
bool _verbose
Definition: DICScannerBase.h:58
DICScanner::ProcessEof
int ProcessEof()
DICScanner::ProcessNone
int ProcessNone()
DICScanner::DICScanner
DICScanner()
DICScanner::ProcessCategorySaveBegin
int ProcessCategorySaveBegin()
DICScanner::ProcessWhiteSpace
void ProcessWhiteSpace()
DICScanner::Reset
void Reset()
DICScanner::ProcessStop
void ProcessStop()
DICScanner::_j
int _j
Definition: DICScannerBase.h:54
DICScanner::isSave
int isSave
Definition: DICScannerBase.h:64
DICScanner::ProcessQuestion
int ProcessQuestion()
DICScanner::ProcessSaveEndScanner
int ProcessSaveEndScanner()
DICScanner::Clear
void Clear()
DICScanner::OpenLog
void OpenLog(const std::string &logName, bool verboseLevel)
DICScanner::yylex
virtual int yylex()
DICScanner::ProcessItemNameScanner
int ProcessItemNameScanner()
DICScanner::alt_yymore
void alt_yymore(void)
DICScanner::ProcessSQuotedString
int ProcessSQuotedString()
DICScanner::_i
int _i
Definition: DICScannerBase.h:54
DICScanner::_isText
int _isText
Definition: DICScannerBase.h:53
DICScanner::NDBlineNo
int NDBlineNo
Definition: DICScannerBase.h:63
DICScanner::~DICScanner
virtual ~DICScanner()
Definition: DICScannerBase.h:86
DICScanner::_len
int _len
Definition: DICScannerBase.h:54
DICScanner::ProcessItemSaveBegin
int ProcessItemSaveBegin()
DICScanner::ProcessDot
int ProcessDot()
DICScanner::ProcessData
int ProcessData()
DICScanner::ProcessComment
void ProcessComment()
DICScanner::log
std::ofstream log
Definition: DICScannerBase.h:57
DICScanner::ProcessDQuotedString
int ProcessDQuotedString()
DICScanner::ProcessUnquotedString
int ProcessUnquotedString()
DICScanner
Private class that represents a dictionary scanner.
Definition: DICScannerBase.h:48