Home
last modified time | relevance | path

Searched refs:calculator (Results 1 – 25 of 92) sorted by relevance

1234

/third_party/boost/libs/proto/doc/
Dcalculator.qbk13 EDSL (embedded domain-specific language) for a lazily-evaluated calculator. We'll
60 behavior. In particular, it is not yet a calculator. Below we'll see how
61 to make it a calculator by defining an evaluation context.
78 // Define the result type of the calculator.
98 Now that we have an evaluation context for our calculator, we can use it to
119 Our calculator EDSL is already pretty useful, and for many EDSL scenarios, no more
121 calculator expressions overloaded `operator()` so that they could be used as
122 function objects. We can do that by creating a calculator /domain/ and telling
123 Proto that all expressions in the calculator domain have extra members. Here is how
124 to define a calculator domain:
[all …]
/third_party/boost/libs/spirit/classic/example/fundamental/
Dast_calc.cpp56 if (i->value.id() == calculator::integerID) in eval_expression()
65 else if (i->value.id() == calculator::factorID) in eval_expression()
71 else if (i->value.id() == calculator::termID) in eval_expression()
88 else if (i->value.id() == calculator::expressionID) in eval_expression()
118 calculator calc; in main()
138 rule_names[calculator::integerID] = "integer"; in main()
139 rule_names[calculator::factorID] = "factor"; in main()
140 rule_names[calculator::termID] = "term"; in main()
141 rule_names[calculator::expressionID] = "expression"; in main()
Dcalc_plain.cpp51 struct calculator : public grammar<calculator> struct
56 definition(calculator const& /*self*/) in definition() argument
100 calculator calc; // Our parser in main()
Dfull_calc.cpp101 struct calculator : public grammar<calculator> struct
103 calculator(stack<long>& eval_) in calculator() argument
109 definition(calculator const& self) in definition() argument
159 calculator calc(eval); // Our parser in main()
Dsubrule_calc.cpp52 struct calculator : public grammar<calculator> struct
57 definition(calculator const& /*self*/) in definition() argument
111 calculator calc; // Our parser in main()
Dcalc_debug.cpp105 struct calculator : public grammar<calculator> struct
107 calculator(stack<long>& eval_) in calculator() argument
113 definition(calculator const& self) in definition() argument
168 calculator calc(eval); // Our parser in main()
Dphoenix_calc.cpp44 struct calculator : public grammar<calculator, calc_closure::context_t> struct
49 definition(calculator const& self) in definition() argument
97 calculator calc; // Our parser in main()
/third_party/flutter/flutter/packages/flutter_tools/templates/package/test/
DprojectName_test.dart.tmpl7 final calculator = Calculator();
8 expect(calculator.addOne(2), 3);
9 expect(calculator.addOne(-7), -6);
10 expect(calculator.addOne(0), 1);
11 expect(() => calculator.addOne(null), throwsNoSuchMethodError);
/third_party/boost/libs/proto/test/
Dcalculator.cpp17 struct calculator : proto::callable_context<calculator const> struct
21 calculator(int i) in calculator() argument
91 BOOST_CHECK_EQUAL(10, proto::eval(((_1 + 42)-3)/4, calculator(1))); in test_calculator()
92 BOOST_CHECK_EQUAL(11, proto::eval(((_1 + 42)-3)/4, calculator(5))); in test_calculator()
94 BOOST_CHECK_EQUAL(10, as<calculator>(((_1 + 42)-3)/4)(1)); in test_calculator()
95 BOOST_CHECK_EQUAL(11, as<calculator>(((_1 + 42)-3)/4)(5)); in test_calculator()
/third_party/boost/libs/spirit/example/qi/compiler_tutorial/
Dcalc1.cpp39 struct calculator : qi::grammar<Iterator, ascii::space_type> struct
41 calculator() : calculator::base_type(expression) in calculator() function
83 typedef client::calculator<iterator_type> calculator; in main() argument
86 calculator calc; // Our grammar in main()
Dcalc2.cpp54 struct calculator : qi::grammar<Iterator, ascii::space_type> struct
56 calculator() : calculator::base_type(expression) in calculator() argument
98 typedef client::calculator<iterator_type> calculator; in main() argument
101 calculator calc; // Our grammar in main()
Dcalc3.cpp41 struct calculator : qi::grammar<Iterator, int(), ascii::space_type> struct
43 calculator() : calculator::base_type(expression) in calculator() function
87 typedef client::calculator<iterator_type> calculator; in main() argument
90 calculator calc; // Our grammar in main()
/third_party/boost/libs/spirit/repository/example/qi/
Dcalc1_sr.cpp34 struct calculator : qi::grammar<Iterator, ascii::space_type> struct
36 calculator() : calculator::base_type(entry) in calculator() argument
84 typedef client::calculator<iterator_type> calculator; in main() argument
86 calculator calc; // Our grammar in main()
/third_party/boost/libs/spirit/example/qi/
Dcalc_utree_naive.cpp47 struct calculator : qi::grammar<Iterator, ascii::space_type, spirit::utree()> struct
49 calculator() : calculator::base_type(expression) in calculator() argument
99 typedef client::calculator<iterator_type> calculator; in main() argument
101 calculator calc; // Our grammar in main()
Dcalc_utree.cpp80 struct calculator : qi::grammar<Iterator, ascii::space_type, spirit::utree()> struct
82 calculator() : calculator::base_type(expression) in calculator() argument
131 typedef client::calculator<iterator_type> calculator; in main() argument
133 calculator calc; // Our grammar in main()
Dcalc_utree_ast.cpp78 struct calculator : qi::grammar<Iterator, ascii::space_type, spirit::utree()> struct
80 calculator() : calculator::base_type(expression) in calculator() function
129 typedef client::calculator<iterator_type> calculator; in main() argument
131 calculator calc; // Our grammar in main()
/third_party/boost/libs/local_function/test/
Dfactorial_seq.cpp15 struct calculator;
16 BOOST_TYPEOF_REGISTER_TYPE(calculator) // Register before `bind this_` below.
18 struct calculator { struct
41 calculator calc; in main() argument
Dfactorial.cpp20 struct calculator;
21 BOOST_TYPEOF_REGISTER_TYPE(calculator) // Register before `bind this_` below.
24 struct calculator { struct
48 calculator calc; in main() argument
/third_party/boost/libs/spirit/example/karma/
Dcalc2_ast_dump.cpp36 struct calculator struct
39 calculator() : calculator::base_type(expression) in calculator() argument
116 typedef calculator<iterator_type> calculator; in main() typedef
118 calculator calc; in main()
Dcalc2_ast_rpn.cpp36 struct calculator struct
39 calculator() : calculator::base_type(expression) in calculator() argument
117 typedef calculator<iterator_type> calculator; in main() typedef
119 calculator calc; in main()
Dcalc2_ast_vm.cpp37 struct calculator struct
40 calculator() : calculator::base_type(expression) in calculator() argument
199 typedef calculator<iterator_type> calculator; in main() typedef
201 calculator calc; in main()
/third_party/boost/libs/spirit/repository/example/karma/
Dcalc2_ast_dump_sr.cpp39 struct calculator struct
42 calculator() : calculator::base_type(expression) in calculator() argument
127 typedef calculator<iterator_type> calculator; in main() typedef
129 calculator calc; in main()
/third_party/boost/libs/spirit/classic/test/
Dast_calc_tests.cpp29 struct calculator : public grammar<calculator> struct
39 definition(calculator const& /*self*/) in definition() argument
144 case calculator::integerID: in eval_expression()
162 case calculator::factorID: in eval_expression()
169 case calculator::termID: in eval_expression()
187 case calculator::expressionID: in eval_expression()
218 calculator calc; in parse()
/third_party/boost/libs/spirit/classic/example/fundamental/more_calculators/
Dphoenix_subrule_calc.cpp48 struct calculator : public grammar<calculator, calc_closure::context_t> struct
53 definition(calculator const& self) in definition() argument
107 calculator calc; // Our parser in main()
Dvmachine_calc.cpp195 struct calculator : public grammar<calculator> struct
197 calculator(vector<int>& code_) in calculator() argument
203 definition(calculator const& self) in definition() argument
255 calculator calc(code); // Our parser in main() argument

1234