43 #include "EST_cutils.h"
44 #include "EST_Token.h"
45 #include "EST_Wagon.h"
47 int wagon_ask_question(LISP question, LISP value)
49 const char *str_oper = wgn_ques_oper_str(question);
51 if (streq(
"is",str_oper))
53 if (streq(get_c_string(value),
54 get_c_string(wgn_ques_operand(question))))
59 else if (streq(
"=",str_oper))
60 if (get_c_float(value) == get_c_float(wgn_ques_operand(question)))
64 else if (streq(
"<",str_oper))
65 if (get_c_float(value) < get_c_float(wgn_ques_operand(question)))
69 else if (streq(
">",str_oper))
70 if (get_c_float(value) > get_c_float(wgn_ques_operand(question)))
74 else if (streq(
"matches",str_oper))
76 EST_Regex rgx(get_c_string(wgn_ques_operand(question)));
77 if (
EST_String(get_c_string(value)).matches(rgx))
82 else if (streq(
"in",str_oper))
83 if (siod_member_str(get_c_string(value),
84 wgn_ques_operand(question)) != NIL)
90 cerr <<
"WAGON: unknown question operator: \"" <<