2 BobToolz plugin for GtkRadiant
3 Copyright (C) 2001 Gordon Biggans
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef _SCRIPTPARSER_H_
22 #define _SCRIPTPARSER_H_
24 //#include "interfaces/IScriptParser.h"
26 #define SP_MAX_BREAKCHARS 16
28 class CScriptParser //: public IScriptParser
34 char m_breakChars[SP_MAX_BREAKCHARS];
36 char* m_pScriptSection;
37 char* m_pLastScriptSection;
40 void SkipWhitespace(bool* pbNewLines);
41 void ClearBuffer(void);
42 const char* MakeToken(const char* pToken);
43 bool IsBreakChar(char c);
45 const char* GetToken(bool bAllowLinebreaks);
46 void SkipBracedSection(void);
47 void SkipRestOfLine(void);
48 void UndoGetToken(void);
49 void ResetParseSession(void);
51 char* GetBufferCopy(void);
52 int GetTokenOffset(void);
54 void LoadScript(const char* pScript);
55 void SetScript(char* pScript);
57 void AddBreakChar(char c);