#ifndef CEVAL
#define CEVAL
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<ctype.h>
#include<stdarg.h>
ceval_node_id;
ceval_token_prec_specifiers;
ceval_token_type;
ceval_token_info_;
ceval_token_info_ ceval_token_info[] = …;
#ifndef CEVAL_TOKEN_TABLE_SIZE
#define CEVAL_TOKEN_TABLE_SIZE …
#endif
int ceval_is_binary_opr(ceval_node_id id) { … }
int ceval_is_binary_fun(ceval_node_id id) { … }
const char * ceval_token_symbol(ceval_node_id id) { … }
ceval_node_id ceval_token_id(char * symbol) { … }
double ceval_token_prec(ceval_node_id id) { … }
ceval_node;
#ifdef __cplusplus
#define CEVAL_CXX
#include<iostream>
#include<string>
#endif
#ifdef M_PI
#define CEVAL_PI …
#else
#define CEVAL_PI …
#endif
#ifdef M_E
#define CEVAL_E …
#else
#define CEVAL_E …
#endif
#ifndef CEVAL_EPSILON
#define CEVAL_EPSILON …
#endif
#ifndef CEVAL_DELTA
#define CEVAL_DELTA …
#endif
#ifndef CEVAL_MAX_DIGITS
#define CEVAL_MAX_DIGITS …
#endif
void ceval_error(const char * , ...);
double ceval_gcd_binary(int, int);
char * ceval_shrink(char * );
double ceval_signum(double);
double ceval_asin(double);
double ceval_acos(double);
double ceval_atan(double);
double ceval_sin(double);
double ceval_cos(double);
double ceval_tan(double);
double ceval_sinh(double);
double ceval_cosh(double);
double ceval_tanh(double);
double ceval_rad2deg(double);
double ceval_deg2rad(double);
double ceval_int_part(double);
double ceval_frac_part(double);
double ceval_log10(double);
double ceval_ln(double);
double ceval_exp(double);
double ceval_factorial(double);
double ceval_positive_sign(double);
double ceval_negative_sign(double);
double ceval_abs(double);
double ceval_sqrt(double);
double ceval_sqrt(double);
double ceval_cbrt(double);
double ceval_ceil(double);
double ceval_floor(double);
double ceval_not(double);
double ceval_bit_not(double);
double ceval_sum(double, double, int);
double ceval_diff(double, double, int);
double ceval_prod(double, double, int);
double ceval_div(double, double, int);
double ceval_quotient(double, double, int);
double ceval_modulus(double, double, int);
double ceval_gcd(double, double, int);
double ceval_hcf(double, double, int);
double ceval_lcm(double, double, int);
double ceval_log(double, double, int);
double ceval_are_equal(double, double, int);
double ceval_not_equal(double, double, int);
double ceval_lesser(double, double, int);
double ceval_greater(double, double, int);
double ceval_lesser_s(double, double, int);
double ceval_greater_s(double, double, int);
double ceval_comma(double, double, int);
double ceval_power(double, double, int);
double ceval_atan2(double, double, int);
double ceval_sci2dec(double, double, int);
double ceval_and(double, double, int);
double ceval_or(double, double, int);
double ceval_bit_and(double, double, int);
double ceval_bit_xor(double, double, int);
double ceval_bit_or(double, double, int);
double ceval_bit_lshift(double, double, int);
double ceval_bit_rshift(double, double, int);
void ceval_error(const char* error_format_string, ...) { … }
double ceval_gcd_binary(int a, int b) { … }
char * ceval_shrink(char * x) { … }
double( * single_arg_fun[])(double) = …;
double ceval_signum(double x) { … }
double ceval_asin(double x) { … }
double ceval_acos(double x) { … }
double ceval_atan(double x) { … }
double ceval_sin(double x) { … }
double ceval_cos(double x) { … }
double ceval_tan(double x) { … }
double ceval_rad2deg(double x) { … }
double ceval_deg2rad(double x) { … }
double ceval_int_part(double x) { … }
double ceval_frac_part(double x) { … }
double ceval_log10(double x) { … }
double ceval_ln(double x) { … }
double ceval_exp(double x) { … }
double ceval_factorial(double x) { … }
double ceval_positive_sign(double x) { … }
double ceval_negative_sign(double x) { … }
double ceval_abs(double x) { … }
double ceval_sqrt(double x) { … }
double ceval_cbrt(double x) { … }
double ceval_ceil(double x) { … }
double ceval_floor(double x) { … }
double ceval_sinh(double x) { … }
double ceval_cosh(double x) { … }
double ceval_tanh(double x) { … }
double ceval_not(double x) { … }
double ceval_bit_not(double x) { … }
double( * double_arg_fun[])(double, double, int) = …;
double ceval_sum(double a, double b, int arg_check) { … }
double ceval_diff(double a, double b, int arg_check) { … }
double ceval_prod(double a, double b, int arg_check) { … }
double ceval_div(double a, double b, int arg_check) { … }
double ceval_modulus(double a, double b, int arg_check) { … }
double ceval_quotient(double a, double b, int arg_check) { … }
double ceval_gcd(double a, double b, int arg_check) { … }
double ceval_hcf(double a, double b, int arg_check) { … }
double ceval_lcm(double a, double b, int arg_check) { … }
double ceval_log(double b, double x, int arg_check) { … }
double ceval_are_equal(double a, double b, int arg_check) { … }
double ceval_not_equal(double a, double b, int arg_check) { … }
double ceval_lesser(double a, double b, int arg_check) { … }
double ceval_greater(double a, double b, int arg_check) { … }
double ceval_lesser_s(double a, double b, int arg_check) { … }
double ceval_greater_s(double a, double b, int arg_check) { … }
double ceval_comma(double x, double y, int arg_check) { … }
double ceval_power(double x, double y, int arg_check) { … }
double ceval_atan2(double x, double y, int arg_check) { … }
double ceval_sci2dec(double m, double e, int arg_check) { … }
double ceval_and(double x, double y, int arg_check) { … }
double ceval_or(double x, double y, int arg_check) { … }
double ceval_bit_and(double x, double y, int arg_check) { … }
double ceval_bit_xor(double x, double y, int arg_check) { … }
double ceval_bit_or(double x, double y, int arg_check) { … }
double ceval_bit_lshift(double x, double y, int arg_check) { … }
double ceval_bit_rshift(double x, double y, int arg_check) { … }
void * ceval_make_tree(char * );
ceval_node * ceval_insert_node(ceval_node * , ceval_node, int);
void ceval_print_tree(const void * );
void ceval_print_node(const ceval_node * , int);
void ceval_delete_node(ceval_node * );
void ceval_delete_tree(void * );
void ceval_delete_node(ceval_node * node) { … }
void ceval_delete_tree(void * tree) { … }
ceval_node * ceval_insert_node(ceval_node * current, ceval_node item, int isRightAssoc) { … }
void * ceval_make_tree(char * expression) { … }
void ceval_print_node(const ceval_node * node, int indent) { … }
void ceval_print_tree(const void * tree) { … }
double ceval_evaluate_tree_(const ceval_node * );
double ceval_evaluate_tree(const void * );
double ceval_evaluate_tree_(const ceval_node * node) { … }
double ceval_evaluate_tree(const void * node) { … }
double ceval_result(char * expr) { … }
void ceval_tree(char * expr) { … }
#ifdef CEVAL_CXX
double ceval_result(std::string expr) { … }
void ceval_tree(std::string expr) { … }
#endif
#endif