//#####################################################################
// Copyright 2012.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYREGHT.txt.
//#####################################################################
// Class PROGRAM_PARSE_NODE
//#####################################################################
#ifndef __PROGRAM_PARSE_NODE__
#define __PROGRAM_PARSE_NODE__

#include <Core/Data_Structures/HASHTABLE.h>
#include <Core/Symbolics/CODE_BLOCK.h>
#include <Core/Symbolics/INSTRUCTION.h>
#include <Core/Symbolics/PROGRAM_CONTEXT.h>
#include <Core/Vectors/VECTOR.h>
#include <map>
#include <string>

namespace PhysBAM{

struct PROGRAM_PARSE_NODE
{
    int type;
    int val;
    PROGRAM_PARSE_NODE *a,*b;

    PROGRAM_PARSE_NODE(int type,int val,PROGRAM_PARSE_NODE *a,PROGRAM_PARSE_NODE *b)
        :type(type),val(val),a(a),b(b)
    {}

    ~PROGRAM_PARSE_NODE(){delete a;delete b;}
};

extern ARRAY<std::string> parse_identifiers;
extern ARRAY<double> parse_constants;
extern PROGRAM_PARSE_NODE* parse_root;

}
#endif
