Скачиваний:
11
Добавлен:
01.05.2014
Размер:
1.66 Кб
Скачать
//    Описание класса CLexAn - синтаксического анализатора входного языка
//-----------------------------------------------------------------------------


#include <string>
#include "TableMgr.h"
//-----------------------------------------------------------------------------


class CLexAn 
{
    unsigned m_LineNumber;
    static char Delims[];
    //----------------------------------------------------------------
    std::string             m_Buff;
    std::string             m_Src;
    std::string             m_ErrBuf;
    std::string::iterator   m_Iter;
    //----------------------------------------------------------------
    bool IsDelimiter( char Ch );
    //----------------------------------------------------------------
    void ToBuffer();
    void FlushBuffer( std::string &Target, ENUM_TOKEN_TYPES tot);
    //----------------------------------------------------------------
    void ExtractComment( std::string &Rcv );
    void ExtractString( std::string &Rcv );
    void ExtractIdentifier( std::string &Rcv );
    void ExtractNumber( std::string &Rcv );
    void ExtractDelimiter( std::string &Rcv );
    void ExtractColon( std::string &Rcv );
    void ExtractPeriod( std::string &Rcv );
    void ExtractGreater( std::string &Rcv );
    void ExtractLess( std::string &Rcv );

    void LookForErrors();
    //----------------------------------------------------------------
public:
    //----------------------------------------------------------------
    void ProcessText( std::string inText , std::string &outText );
    //----------------------------------------------------------------
};
Соседние файлы в папке Курсовая работа2