#include"scanner.h"

typedef double(*FuncPtr)(double);
//语法树的节点
struct ExprNode                  //type of syntax tree's node
{
    enum Token_Type OpCode;       //PLUS MINUS DIV POWER FUNC CONST_ID
    union
    {
        struct{ExprNode *Left,*Right;}CaseOperator;
        struct{ExprNode *Child;FuncPtr MathFuncPtr;}CaseFunc;
        double CaseConst;
        double * CaseParmPtr;
    }Content;
};

extern void Parser(char *SrcFilePtr);//参数为字符串
parser.h

相关文章:

  • 2021-09-06
  • 2021-07-27
  • 2021-09-03
  • 2022-12-23
  • 2021-08-26
  • 2021-10-17
  • 2022-02-23
猜你喜欢
  • 2022-12-23
  • 2022-01-07
  • 2021-08-10
  • 2021-09-17
  • 2022-02-13
  • 2021-09-23
  • 2021-08-06
相关资源
相似解决方案