DICParserBase.h
Go to the documentation of this file.
//$$FILE$$
//$$VERSION$$
//$$DATE$$
//$$LICENSE$$
/*
PURPOSE: A DDL 2.1 compliant CIF file parser.
*/
#ifndef DIC_PARSER_BASE_H
#define DIC_PARSER_BASE_H
#include <iostream>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <rcsb/DICScannerBase.h>
#include <rcsb/DICParserInt.h>
#include <rcsb/CifFileReadDef.h>
#include <rcsb/ISTable.h>
#include <rcsb/DicFile.h>
class DICParser : public DICScanner
{
public:
DICParser(DicFile* dicFileP, CifFile* ddlFileP, bool verbose = false);
void Parse(const string& fileName, string& diagnostics);
virtual ~DICParser();
void Error(const char*);
void Clear();
void Reset();
void ProcessAssignments(void);
void ProcessOneAssignment(void);
void ProcessItemNameListLoop(void);
void ProcessItemNameListName(void);
void ProcessValueListItem(void);
void ProcessItemName(void);
void ProcessLoop(void);
void ProcessItemValue(void);
void ProcessLsItemValue(void);
void ProcessUnknownValue(void);
void ProcessMissingValue(void);
void ProcessSaveBegin(void);
void ProcessSaveEnd(void);
void ProcessDataBlockName(void);
private:
DicFile *_fobj;
ISTable *_tbl;
int _afterLoop;
CifFile *_saveobj;
ISTable *_savetbl;
ISTable *_prevtbl;
ISTable * format;
ISTable * cattbl;
ISTable * itemtbl;
CifFile *ddl;
vector<string> listcat, listitem;
vector<string> listitem2;
int _nTablesInBlock;
int _curItemNo, _curValueNo, _numDataBlocks, _fieldListAlloc, _curRow;
vector<string> _fieldList;
string _pBufValue;
string _tBufKeyword;
string _curCategoryName;
string _curDataBlockName;
string _prevDataBlockName;
int _nTablesInBlockSave;
int _curItemNoSave, _curValueNoSave;
int _fieldListAllocSave;
int _curRowSave;
vector<string> _fieldListSave;
string _curCategoryNameSave;
string _curDataBlockNameSave;
string _prevDataBlockNameSave;
string _tmpDataBlockNameSave;
string errorLog;
std::set<string> _saveFrames;
void ProcessLoopDeclaration(void);
void ProcessItemNameList(void);
void ProcessValueList(void);
void ProcessItemValuePair(void);
void ProcessLoopDeclarationSave(void);
void ProcessItemNameListSave(void);
void ProcessValueListSave(void);
void ProcessItemValuePairSave(void);
void CheckDDL(void);
void AfterParseProcessing();
void InsertImplicitOrdinalItems();
};
#endif /* DIC_PARSER_BASE_H */
DICParser
Public class that respresents a dictionary parser.
Definition: DICParserBase.h:43
DicFile.h
Header file for DicFile class.
DICParser::Parse
void Parse(const string &fileName, string &diagnostics)
DICParser::ProcessLoop
void ProcessLoop(void)
CifFileReadDef.h
Header file for CifFileReadDef class.
DICParser::ProcessDataBlockName
void ProcessDataBlockName(void)
DICParserInt.h
Header file for bison interfacing to DICParser class.
DICParser::ProcessUnknownValue
void ProcessUnknownValue(void)
DICParser::ProcessItemName
void ProcessItemName(void)
DICScanner
Private class that represents a dictionary scanner.
Definition: DICScannerBase.h:48
DICParser::Clear
void Clear()
DICParser::Error
void Error(const char *)
ISTable.h
Header file for ISTable class.
DICParser::Reset
void Reset()
CifFile
Public class that represents a CIF file, composed of blocks with tables.
Definition: CifFile.h:47
DICParser::ProcessSaveEnd
void ProcessSaveEnd(void)
DICParser::ProcessItemNameListLoop
void ProcessItemNameListLoop(void)
DICParser::ProcessOneAssignment
void ProcessOneAssignment(void)
DICParser::ProcessSaveBegin
void ProcessSaveBegin(void)
DICParser::ProcessItemValue
void ProcessItemValue(void)
DICParser::ProcessAssignments
void ProcessAssignments(void)
DICParser::~DICParser
virtual ~DICParser()
DICParser::DICParser
DICParser(DicFile *dicFileP, CifFile *ddlFileP, bool verbose=false)
DICScannerBase.h
Header file for DICScanner class.
DICParser::ProcessMissingValue
void ProcessMissingValue(void)
ISTable
Public class that respresents a two-dimensional table of strings.
Definition: ISTable.h:53
DICParser::ProcessLsItemValue
void ProcessLsItemValue(void)
DICParser::ProcessValueListItem
void ProcessValueListItem(void)
DICParser::ProcessItemNameListName
void ProcessItemNameListName(void)
DicFile
Public class that represents a dictionary file, composed of blocks with tables.
Definition: DicFile.h:36