86 ExpressionNumberSetter number_s(
self.
exprStack);
92 ComparisonSetter<less_equal<double> > less_equal_s(
self.
cmpStack);
93 ComparisonSetter<less<double> > less_s(
self.
cmpStack);
94 ComparisonSetter<equal_to<double> > equal_to_s(
self.
cmpStack);
95 ComparisonSetter<greater_equal<double> > greater_equal_s(
self.
cmpStack);
96 ComparisonSetter<greater<double> > greater_s(
self.
cmpStack);
97 ComparisonSetter<not_equal_to<double> > not_equal_to_s(
self.
cmpStack);
114 BinaryCutSetter<logical_and<bool> > and_s(
self.
selStack);
115 BinaryCutSetter<logical_or<bool> > or_s(
self.
selStack);
116 UnaryCutSetter<logical_not<bool> > not_s(
self.
selStack);
119 ExpressionBinaryOperatorSetter<plus<double> > plus_s(
self.
exprStack);
120 ExpressionBinaryOperatorSetter<minus<double> > minus_s(
self.
exprStack);
121 ExpressionBinaryOperatorSetter<multiplies<double> > multiplies_s(
self.
exprStack);
122 ExpressionBinaryOperatorSetter<divides<double> > divides_s(
self.
exprStack);
123 ExpressionBinaryOperatorSetter<power_of<double> > power_of_s(
self.
exprStack);
124 ExpressionUnaryOperatorSetter<negate<double> > negate_s(
self.
exprStack);
127 BOOST_SPIRIT_DEBUG_RULE(
var);
129 BOOST_SPIRIT_DEBUG_RULE(
method);
134 BOOST_SPIRIT_DEBUG_RULE(
number);
135 BOOST_SPIRIT_DEBUG_RULE(
metharg);
140 BOOST_SPIRIT_DEBUG_RULE(
term);
141 BOOST_SPIRIT_DEBUG_RULE(
power);
142 BOOST_SPIRIT_DEBUG_RULE(
factor);
143 BOOST_SPIRIT_DEBUG_RULE(
or_op);
144 BOOST_SPIRIT_DEBUG_RULE(
and_op);
148 BOOST_SPIRIT_DEBUG_RULE(
cut);
149 BOOST_SPIRIT_DEBUG_RULE(
fun);
152 boost::spirit::classic::assertion<SyntaxErrors> expect(
kSyntaxError);
156 metharg = ( strict_real_p [ methodArg_s ] ) |
157 ( int_p [ methodArg_s ] ) |
158 ( ch_p(
'"' ) >> *(~ch_p(
'"' )) >> ch_p(
'"' ) ) [ methodArg_s ] |
159 ( ch_p(
'\'') >> *(~ch_p(
'\'')) >> ch_p(
'\'') ) [ methodArg_s ];
161 (lexeme_d[alpha_p >> * chset<>(
"a-zA-Z0-9_")] >>
162 ch_p(
'(') >>
metharg >> * (ch_p(
',') >>
metharg ) >> expectParenthesis(ch_p(
')'))) [ method_s ] |
163 ( (lexeme_d[alpha_p >> * chset<>(
"a-zA-Z0-9_")]) [ method_s ] >> ! (ch_p(
'(') >> ch_p(
')')) ) ;
168 chseq_p(
"abs") [ abs_s ] | chseq_p(
"acos") [ acos_s ] | chseq_p(
"asin") [ asin_s ] |
169 chseq_p(
"atan") [ atan_s ] | chseq_p(
"cosh") [ cosh_s ] | chseq_p(
"cos") [ cos_s ] |
170 chseq_p(
"exp") [ exp_s ] | chseq_p(
"log") [ log_s ] | chseq_p(
"log10") [ log10_s ] |
171 chseq_p(
"sinh") [ sinh_s ] | chseq_p(
"sin") [ sin_s ] | chseq_p(
"sqrt") [ sqrt_s ] |
172 chseq_p(
"tanh") [ tanh_s ] | chseq_p(
"tan") [ tan_s ];
174 chseq_p(
"atan2") [ atan2_s ] | chseq_p(
"chi2prob") [ chi2prob_s ] | chseq_p(
"pow") [ pow_s ] |
175 chseq_p(
"min") [ min_s ] | chseq_p(
"max") [ max_s ] | chseq_p(
"deltaPhi") [deltaPhi_s] | chseq_p(
"hypot") [hypot_s] | chseq_p(
"test_bit") [test_bit_s] ;
177 chseq_p(
"deltaR") [deltaR_s];
182 term >> (* ((
'+' >> expect(
term)) [ plus_s ] |
183 (
'-' >> expect(
term)) [ minus_s ]));
187 power >> * ((
'*' >> expect(
power)) [ multiplies_s ] |
188 (
'/' >> expect(
power)) [ divides_s ]);
193 (
function1 >> ch_p(
'(') [funOk_s ] >> expect(
expression) >> expectParenthesis(ch_p(
')'))) [ fun_s ] |
195 expect(ch_p(
',')) >> expect(
expression) >> expectParenthesis(ch_p(
')'))) [ fun_s ] |
197 expect(ch_p(
',')) >> expect(
expression) >> expectParenthesis(ch_p(
')'))) [ fun_s ] |
208 (ch_p(
'-') >>
factor) [ negate_s ] |
211 (ch_p(
'<') >> ch_p(
'=') [ less_equal_s ]) |
212 (ch_p(
'<') [ less_s ]) |
213 (ch_p(
'=') >> ch_p(
'=') [ equal_to_s ]) |
214 (ch_p(
'=') [ equal_to_s ]) |
215 (ch_p(
'>') >> ch_p(
'=') [ greater_equal_s ]) |
216 (ch_p(
'>') [ greater_s ]) |
217 (ch_p(
'!') >> ch_p(
'=') [ not_equal_to_s ]);
222 or_op = ch_p(
'|') >> ch_p(
'|') | ch_p(
'|');
223 and_op = ch_p(
'&') >> ch_p(
'&') | ch_p(
'&');
232 (ch_p(
'!') >> expect(logical_factor)) [ not_s ] |
237 this->start_parsers(
cut,
fun);
LazyMethodStack lazyMethStack
FunctionStack finalFunStack
MethodArgumentStack methArgStack
ExpressionStack exprStack