1
// RCS-ID: $Id: LDPToken.h,v 1.4 2006/03/01 19:19:31 cecilios Exp $
2
//--------------------------------------------------------------------------------------
3
// LenMus Phonascus: The teacher of music
4
// Copyright (c) 2002-2006 Cecilio Salmeron
6
// This program is free software; you can redistribute it and/or modify it under the
7
// terms of the GNU General Public License as published by the Free Software Foundation;
8
// either version 2 of the License, or (at your option) any later version.
10
// This program is distributed in the hope that it will be useful, but WITHOUT ANY
11
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
// PARTICULAR PURPOSE. See the GNU General Public License for more details.
14
// You should have received a copy of the GNU General Public License along with this
15
// program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street,
16
// Fifth Floor, Boston, MA 02110-1301, USA.
18
// For any comment, suggestion or feature request, please contact the manager of
19
// the project at cecilios@users.sourceforge.net
21
//-------------------------------------------------------------------------------------
23
@brief Header file for class lmLDPToken
30
#ifndef __LMTOKEN_H //to avoid nested includes
45
//tokens for internal use
46
tkSpaces, //token separator
47
tkComment //to be filtered out in tokenizer routines
58
ETokenType GetType() { return m_Type; }
59
wxString GetValue() { return m_sValue; }
60
wxString GetDescription();
61
void Set(ETokenType nType, wxString sValue) {
72
class lmLDPTokenBuilder
75
lmLDPTokenBuilder(lmLDPParser* pParser);
76
~lmLDPTokenBuilder() {}
78
void RepeatToken() { m_fRepeatToken = true; }
79
lmLDPToken* ReadToken();
85
wxString Extract(long iFrom, long iTo=0);
86
bool IsLetter(wxChar ch);
87
bool IsNumber(wxChar ch);
91
lmLDPParser* m_pParser; //parser using this token builder
94
wxString m_sInBuf; // buffer being analised. It is different from the file
95
// reading buffer so that we can insert / alter its content: i.e.
96
// to expand macros, #define susbtitutions, etc.
98
long m_lastPos; // index of last character read by GNC() First char = 1.
99
// Zero means "no char read yet"
100
long m_maxPos; // buffer size - 1 = maximum value for m_lastPos
101
wxChar m_curChar; // character being processed. It is read by GNC()
106
#endif // __LMTOKEN_H
b'\\ No newline at end of file'