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 */
CifFileReadDef.h
Header file for CifFileReadDef class.
DICParserInt.h
Header file for bison interfacing to DICParser class.
DICScannerBase.h
Header file for DICScanner class.
DicFile.h
Header file for DicFile class.
ISTable.h
Header file for ISTable class.
CifFile
Public class that represents a CIF file, composed of blocks with tables.
Definition CifFile.h:48
DICParser
Public class that respresents a dictionary parser.
Definition DICParserBase.h:44
DICParser::ProcessValueListItem
void ProcessValueListItem(void)
DICParser::ProcessUnknownValue
void ProcessUnknownValue(void)
DICParser::ProcessSaveEnd
void ProcessSaveEnd(void)
DICParser::ProcessItemNameListLoop
void ProcessItemNameListLoop(void)
DICParser::ProcessDataBlockName
void ProcessDataBlockName(void)
DICParser::ProcessItemName
void ProcessItemName(void)
DICParser::Clear
void Clear()
DICParser::ProcessAssignments
void ProcessAssignments(void)
DICParser::~DICParser
virtual ~DICParser()
DICParser::ProcessMissingValue
void ProcessMissingValue(void)
DICParser::ProcessLsItemValue
void ProcessLsItemValue(void)
DICParser::DICParser
DICParser(DicFile *dicFileP, CifFile *ddlFileP, bool verbose=false)
DICParser::Reset
void Reset()
DICParser::ProcessLoop
void ProcessLoop(void)
DICParser::Parse
void Parse(const string &fileName, string &diagnostics)
DICParser::ProcessItemValue
void ProcessItemValue(void)
DICParser::ProcessSaveBegin
void ProcessSaveBegin(void)
DICParser::ProcessOneAssignment
void ProcessOneAssignment(void)
DICParser::ProcessItemNameListName
void ProcessItemNameListName(void)
DICParser::Error
void Error(const char *)
DICScanner
Private class that represents a dictionary scanner.
Definition DICScannerBase.h:49
DicFile
Public class that represents a dictionary file, composed of blocks with tables.
Definition DicFile.h:37
ISTable
Public class that respresents a two-dimensional table of strings.
Definition ISTable.h:54