?? lexclass.h
字號:
//////////////////////////////////////////////////////////////////////
//
// By Liutao
// Xi'an JiaoTong University, 2000.11
//
// LexClass.h: interface for the LexClass class.
//
//////////////////////////////////////////////////////////////////////
#include <afxtempl.h>
#if !defined(AFX_LEXCLASS_H__20BBA6B9_8618_4F70_AC2C_BDACFEB296E8__INCLUDED_)
#define AFX_LEXCLASS_H__20BBA6B9_8618_4F70_AC2C_BDACFEB296E8__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
struct _element
{
union _u
{
double num;
char op;
}u;
int flag, p, p1;
};
class Lex
{
public:
CString GetString();
BOOL IsWrong();
double GetResult();
void GetFormula(CString str);
Lex();
virtual ~Lex();
protected:
BOOL IsOp();
BOOL pGreat();
void Cal();
void Push();
int GetP();
enum {NUM, OP, RAW=100, NOTRAW};
int GetNextElement();
_element element;
CList<_element, _element> opStack, numStack;
CString formula;
CString result_str;
private:
BOOL WithWrong;
CString pStr;
long i;
};
#endif // !defined(AFX_LEXCLASS_H__20BBA6B9_8618_4F70_AC2C_BDACFEB296E8__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -