Public Types | |
enum | TOKEN { TK_EOS, TK_UNKNOWN, TK_QUALIFIER, TK_NUMBER } |
Public Member Functions | |
Parser (const StringBase &ParseString) | |
BOOL | PrepareForParse () |
Prepares the parser to parse the string given in the constructor from the beginning. Scope: public. | |
TOKEN | GetToken () |
Retrieves a TOKEN from the input string to be used by some parser somewhere. Scope: public See Also: class Parser. | |
String_256 | GetSemanticValue () |
UINT32 | GetCurrentIndex () |
Protected Attributes | |
const StringBase & | m_pParseString |
UINT32 | m_uParsePosition |
String_256 | m_SemVal |
Private Member Functions | |
CC_DECLARE_MEMDUMP (Parser) |
Definition at line 1416 of file scunit.cpp.
|
Definition at line 1422 of file scunit.cpp. 01423 { 01424 TK_EOS, 01425 TK_UNKNOWN, 01426 TK_QUALIFIER, 01427 TK_NUMBER 01428 };
|
|
Definition at line 1420 of file scunit.cpp. 01420 : m_pParseString(ParseString), m_uParsePosition(0) {}
|
|
|
|
Definition at line 1433 of file scunit.cpp. 01433 { return m_uParsePosition; }
|
|
Definition at line 1432 of file scunit.cpp. 01432 { return m_SemVal; }
|
|
Retrieves a TOKEN from the input string to be used by some parser somewhere. Scope: public See Also: class Parser.
Definition at line 1483 of file scunit.cpp. 01484 { 01485 m_SemVal.Empty(); 01486 UINT32 Length = m_pParseString.Length(); 01487 while (m_uParsePosition < Length) 01488 { 01489 TCHAR c = m_pParseString[m_uParsePosition]; 01490 if (Convert::IsCharUnitType(c)) 01491 { 01492 do 01493 { 01494 m_SemVal += c; 01495 ++m_uParsePosition; 01496 c = m_pParseString[m_uParsePosition]; 01497 } while (Convert::IsCharUnitType(c) && m_uParsePosition < Length); 01498 return TK_QUALIFIER; 01499 } 01500 else if (StringBase::IsNumeric(c) || (c == Convert::GetDecimalPointChar())) 01501 { 01502 do 01503 { 01504 m_SemVal += c; 01505 ++m_uParsePosition; 01506 c = m_pParseString[m_uParsePosition]; 01507 } while ((StringBase::IsNumeric(c) || (c == Convert::GetDecimalPointChar())) 01508 && m_uParsePosition < Length); 01509 01510 return TK_NUMBER; 01511 } 01512 else if (camIsspace(c)) 01513 { 01514 ++m_uParsePosition; 01515 continue; 01516 } 01517 else 01518 { 01519 ++m_uParsePosition; 01520 return TK_UNKNOWN; 01521 } 01522 } 01523 return TK_EOS; 01524 }
|
|
Prepares the parser to parse the string given in the constructor from the beginning. Scope: public.
Definition at line 1456 of file scunit.cpp. 01457 { 01458 m_uParsePosition = 0; 01459 return TRUE; 01460 }
|
|
Definition at line 1436 of file scunit.cpp. |
|
Definition at line 1438 of file scunit.cpp. |
|
Definition at line 1437 of file scunit.cpp. |