📄 pascalfile.h
字号:
// PascalFile.h: interface for the PascalFile class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_PascalFile_H__ED287132_F69E_4FA9_9A5C_C4611AE81EE9__INCLUDED_)
#define AFX_PascalFile_H__ED287132_F69E_4FA9_9A5C_C4611AE81EE9__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// used header file
#include "iostream.h"
#include "fstream.h"
#include "stringtable.h"
// flags' max number
#define MAX_NUM 100
class PascalFile : public ifstream
{
private: // static element
static StringTable s_flagTable;
// flags table
private: // object element
StringTable stirngTable;
// store all strings that was detected
StringTable symbleTable;
// store all exist symble, include pascal system symbles
int i_row;
// row index
int i_line;
// line index
public:
PascalFile();
virtual ~PascalFile();
void open(const char* filename,
int iostype = ios::in, int filebuffer = filebuf::openprot);
// open a file
int peek();
// get next char but don't move read header
public:
//int GetSYSFlag(char* word, int type);
// get system flag
CString FlagsTableToString();
// get flags table' string
CString StringTableToString();
// get string table's string
CString SymbleTableToString();
// get symble table's string
void WordsTranslate();
// translate all words in the file, close file
private:
char GetChar();
// get one char from file
static void LoadFlagsTable();
// load flags table
CString GetSYM();
// get word
};
#endif // !defined(AFX_PascalFile_H__ED287132_F69E_4FA9_9A5C_C4611AE81EE9__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -