/third_party/boost/libs/proto/doc/ |
D | calculator.qbk | 13 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/ |
D | ast_calc.cpp | 56 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()
|
D | calc_plain.cpp | 51 struct calculator : public grammar<calculator> struct 56 definition(calculator const& /*self*/) in definition() argument 100 calculator calc; // Our parser in main()
|
D | full_calc.cpp | 101 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()
|
D | subrule_calc.cpp | 52 struct calculator : public grammar<calculator> struct 57 definition(calculator const& /*self*/) in definition() argument 111 calculator calc; // Our parser in main()
|
D | calc_debug.cpp | 105 struct calculator : public grammar<calculator> struct 107 calculator(stack<long>& eval_) in calculator() function 113 definition(calculator const& self) in definition() argument 168 calculator calc(eval); // Our parser in main()
|
D | phoenix_calc.cpp | 44 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/ |
D | projectName_test.dart.tmpl | 7 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/ |
D | calculator.cpp | 17 struct calculator : proto::callable_context<calculator const> struct 21 calculator(int i) in calculator() function 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/ |
D | calc1.cpp | 39 struct calculator : qi::grammar<Iterator, ascii::space_type> struct 41 calculator() : calculator::base_type(expression) in calculator() argument 83 typedef client::calculator<iterator_type> calculator; in main() argument 86 calculator calc; // Our grammar in main()
|
D | calc2.cpp | 54 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()
|
D | calc3.cpp | 41 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/ |
D | calc1_sr.cpp | 34 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/ |
D | calc_utree_naive.cpp | 47 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()
|
D | calc_utree.cpp | 80 struct calculator : qi::grammar<Iterator, ascii::space_type, spirit::utree()> struct 82 calculator() : calculator::base_type(expression) in calculator() function 131 typedef client::calculator<iterator_type> calculator; in main() typedef 133 calculator calc; // Our grammar in main()
|
D | calc_utree_ast.cpp | 78 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() typedef 131 calculator calc; // Our grammar in main()
|
/third_party/boost/libs/local_function/test/ |
D | factorial_seq.cpp | 15 struct calculator; 16 BOOST_TYPEOF_REGISTER_TYPE(calculator) // Register before `bind this_` below. 18 struct calculator { struct 41 calculator calc; in main() argument
|
D | factorial.cpp | 20 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/ |
D | calc2_ast_dump.cpp | 36 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()
|
D | calc2_ast_rpn.cpp | 36 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()
|
D | calc2_ast_vm.cpp | 37 struct calculator struct 40 calculator() : calculator::base_type(expression) in calculator() function 199 typedef calculator<iterator_type> calculator; in main() typedef 201 calculator calc; in main()
|
/third_party/boost/libs/spirit/repository/example/karma/ |
D | calc2_ast_dump_sr.cpp | 39 struct calculator struct 42 calculator() : calculator::base_type(expression) in calculator() function 127 typedef calculator<iterator_type> calculator; in main() typedef 129 calculator calc; in main()
|
/third_party/boost/libs/spirit/classic/test/ |
D | ast_calc_tests.cpp | 29 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/ |
D | phoenix_subrule_calc.cpp | 48 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()
|
D | vmachine_calc.cpp | 195 struct calculator : public grammar<calculator> struct 197 calculator(vector<int>& code_) in calculator() function 203 definition(calculator const& self) in definition() argument 255 calculator calc(code); // Our parser in main() argument
|