librcsb-core-wrapper  1.005
CifScannerBase.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 CIFSCANNERBASE_H
20 #define CIFSCANNERBASE_H
21 
22 
23 /*
24 #if !defined(FLEX_LEXER_INCLUDED)
25 #undef yyFlexLexer
26 #define yyFlexLexer CifFlexLexer
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 CifScanner // : public CifFlexLexer
49 {
50  protected:
51 
52  std::string *_tBuf;
53  int _isText;
54  int _i, _j, _len;
55 
56  protected:
57  std::ofstream log;
58  std::string errorLog;
59  bool _verbose;
60  void alt_yymore(void);
61  void OpenLog(const std::string& logName, bool verboseLevel);
62 
63  public:
64  int NDBlineNo;
65  CifScanner(std::istream *yyin);
67  int ProcessNone();
69  int ProcessData();
71  void ProcessStop();
72  int ProcessDot();
79  int ProcessEof();
80  void Clear();
81  void Reset();
82  virtual int yylex();
83  virtual ~CifScanner() {Reset();};
84 };
85 
86 #endif /* CIFSCANNERBASE_H */
Private class that represents a CIF scanner.
Definition: CifScannerBase.h:49
int ProcessEof()
int ProcessBadStrings()
int _i
Definition: CifScannerBase.h:54
int ProcessDot()
int ProcessLoopScanner()
std::string * _tBuf
Definition: CifScannerBase.h:52
void alt_yymore(void)
void ProcessComment()
int ProcessQuestion()
void Clear()
void OpenLog(const std::string &logName, bool verboseLevel)
int _len
Definition: CifScannerBase.h:54
void ProcessWhiteSpace()
std::ofstream log
Definition: CifScannerBase.h:57
int ProcessDQuotedStrings()
int NDBlineNo
Definition: CifScannerBase.h:64
int ProcessData()
virtual int yylex()
void Reset()
bool _verbose
Definition: CifScannerBase.h:59
int ProcessUnderscore()
CifScanner(std::istream *yyin)
void ProcessStop()
int _isText
Definition: CifScannerBase.h:53
std::string errorLog
Definition: CifScannerBase.h:58
virtual ~CifScanner()
Definition: CifScannerBase.h:83
int ProcessNone()
int _j
Definition: CifScannerBase.h:54
int ProcessSQuotedStrings()