DDLParserBase.h

Go to the documentation of this file.
00001 //$$FILE$$
00002 //$$VERSION$$
00003 //$$DATE$$
00004 //$$LICENSE$$
00005 
00006 
00014 /* 
00015   PURPOSE:    A DDL 2.1 compliant CIF file parser.
00016 */
00017 
00018 
00019 #ifndef DDL_PARSER_BASE_H
00020 #define DDL_PARSER_BASE_H
00021 
00022 
00023 #include <iostream>
00024 #include <stdio.h>
00025 #include <stdlib.h>
00026 #include <string.h>
00027 #include "DDLScannerBase.h"
00028 #include "DDLParserInt.h"
00029 #include "CifFileReadDef.h"
00030 #include "ISTable.h"
00031 #include "DdlFile.h"
00032 
00033 
00043 class DDLParser : public DDLScanner
00044 {
00045     public:
00063         DDLParser(DdlFile* ddlFileP, bool verbose = false);
00064 
00082         void Parse(const string& fileName, string& diagnostics);
00083 
00097         virtual ~DDLParser();
00098 
00103         void Clear();
00104 
00109         void Error(const char*);
00110 
00115         void Reset();
00116 
00121         void ProcessLoopDeclaration(void);
00122 
00127         void ProcessItemNameList(void);
00128 
00133         void ProcessValueList(void);
00134 
00139         void ProcessItemValuePair(void);
00140 
00145         void ProcessLoopDeclarationSave(void);
00146 
00151         void ProcessItemNameListSave(void);
00152 
00157         void ProcessValueListSave(void);
00158 
00163         void ProcessItemValuePairSave(void);
00164 
00169         void ProcessAssignments(void);
00170 
00175         void ProcessOneAssignment(void);
00176 
00181         void ProcessItemNameListLoop(void);
00182 
00187         void ProcessItemNameListName(void);
00188 
00193         void ProcessValueListItem(void);
00194 
00199         void ProcessItemName(void);
00200 
00205         void ProcessLoop(void);
00206 
00211         void ProcessItemValue(void);
00212 
00217         void ProcessLsItemValue(void);
00218 
00223         void ProcessUnknownValue(void);
00224 
00229         void ProcessMissingValue(void);
00230 
00235         void ProcessSaveBegin(void);
00236 
00241         void ProcessSaveEnd(void);
00242 
00247         void ProcessDataBlockName(void);
00248 
00249     private:
00250         string _uString;
00251         string _mString;
00252         DdlFile *_fobj;
00253         ISTable *_tbl;
00254         int _afterLoop;
00255         DdlFile *_saveobj;
00256         ISTable *_savetbl;
00257         ISTable * format;
00258         int _nTablesInBlock;
00259         int _curItemNo, _curValueNo, _numDataBlocks, _fieldListAlloc,
00260           _curRow, _curCol;
00261         vector<string> _fieldList;
00262         string _pBufValue;
00263         vector<string>  * _rowBuf;
00264         string _tBufKeyword;
00265         string _curCategoryName;
00266         string _curDataBlockName;
00267         string _prevDataBlockName;
00268         int _nTablesInBlockSave;
00269         int _curItemNoSave, _curValueNoSave;
00270         int _numDataBlocksSave, _fieldListAllocSave;
00271         int _curRowSave, _curColSave;
00272         vector<string> _fieldListSave;
00273         vector<string>  * _rowBufSave;
00274         string _curCategoryNameSave;
00275         string _curDataBlockNameSave;
00276         string _prevDataBlockNameSave;
00277         string errorLog;
00278 
00279 };
00280  
00281 #endif /* DDL_PARSER_BASE_H */

Generated on Tue Apr 24 09:25:37 2007 for cifparse-obj-v7.0 by  doxygen 1.5.1