00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "skAlist.h"
00022
00023 const int MAXBUFFER=20000;
00024
00025
00026 EXTERN_TEMPLATE template class CLASSEXPORT skTAList<skTreeNode>;
00027
00031 class CLASSEXPORT skTreeNodeList : public skTAList<skTreeNode>
00032 {
00033 public:
00035 skTreeNodeList();
00039 skTreeNodeList(const skTreeNodeList& list);
00041 virtual ~skTreeNodeList();
00046 skTreeNode * findItem(const skString& label) const;
00052 skTreeNode * findItem(const skString& label,const skString& data) const;
00057 skTreeNode * nthElt(USize i) const;
00061 skTreeNodeList& operator=(const skTreeNodeList& list);
00062 };
00063
00064 #define USECLASSBUFFER
00065
00066 class P_TreeNodeReader
00067 {
00068 public:
00070 P_TreeNodeReader(skInputSource& in);
00071 enum Lexeme { L_IDENT, L_TEXT, L_LBRACE, L_RBRACE, L_EOF, L_ERROR };
00073 void grabBuffer();
00075 void error(const skString& msg);
00084 Lexeme lex();
00086 void unLex();
00091 skTreeNode * parseTreeNode(skTreeNode * pparent);
00095 void parseTreeNodeList(skTreeNode * list);
00097 void addToLexText(Char c);
00099 skString m_FileName;
00101 bool m_UnLex;
00103 Lexeme m_LastLexeme;
00105 Char * m_LexText;
00107 unsigned short m_LineNum;
00109 unsigned short m_Pos;
00111 skInputSource& m_In;
00113 bool m_Error;
00114 #ifdef USECLASSBUFFER
00115
00116 bool m_UsingClassLexText;
00118 static Char g_ClassLexText[MAXBUFFER];
00120 static bool g_LexTextUsed;
00121 #endif
00122 };
00123
00124
00125
00126
00127
00128
00129
00130