parser.h

来自「一个采用面向对象实现编译解释器,自己验证过绝对能用.」· C头文件 代码 · 共 19 行

H
19
字号
#ifndef PARSER_H
#define PARSER_H
#include "scanner.h"
typedef double(*FuncPtr)(double);
struct ExprNode
{
	enum Token_Type OpCode;
	//PLUS,MINUS,MUL,DIV
	union 
	{
		struct{ExprNode *Left,*Right;}CaseOperator;
		struct{ExprNode *Child;FuncPtr MathFuncPtr;}CaseFunc;
		double CaseConst;
		double *CaseParmPtr;
	}Content;
};
extern void Parser(char *SrcFilePtr);
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?