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 
int ProcessUnquotedString()
void ProcessWhiteSpace()
int _i
Definition: DICScannerBase.h:54
int ProcessEof()
int _j
Definition: DICScannerBase.h:54
std::ofstream log
Definition: DICScannerBase.h:57
int ProcessSQuotedString()
void ProcessStop()
void Reset()
int ProcessData()
int ProcessItemSaveBegin()
int ProcessDQuotedString()
int ProcessDot()
void ProcessComment()
int ProcessNone()
int ProcessCategorySaveBegin()
int ProcessQuestion()
void alt_yymore(void)
Private class that represents a dictionary scanner.
Definition: DICScannerBase.h:48
void OpenLog(const std::string &logName, bool verboseLevel)
bool _verbose
Definition: DICScannerBase.h:58
int ProcessLoopScanner()
virtual ~DICScanner()
Definition: DICScannerBase.h:86
std::string * _tBuf
Definition: DICScannerBase.h:52
int _len
Definition: DICScannerBase.h:54
int _isText
Definition: DICScannerBase.h:53
virtual int yylex()
void Clear()
int ProcessSaveEndScanner()
int isSave
Definition: DICScannerBase.h:64
int ProcessItemNameScanner()
int NDBlineNo
Definition: DICScannerBase.h:63