From 8d6bf11334562d7781b339cf822a93ff42fee2b5 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 5 Mar 2012 01:48:21 -0600 Subject: All tests are working again but one --- test/regress/25A099C9.test | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/regress/25A099C9.test') diff --git a/test/regress/25A099C9.test b/test/regress/25A099C9.test index fc06449b..48b6814e 100644 --- a/test/regress/25A099C9.test +++ b/test/regress/25A099C9.test @@ -2,16 +2,16 @@ test -f $sourcepath/src/amount.h reg -> 7 __ERROR__ While parsing file "$sourcepath/src/amount.h", line 66: Error: No quantity specified for amount -While parsing file "$sourcepath/src/amount.h", line 726: +While parsing file "$sourcepath/src/amount.h", line 731: Error: Invalid date/time: line amount_t amoun -While parsing file "$sourcepath/src/amount.h", line 732: +While parsing file "$sourcepath/src/amount.h", line 737: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 738: +While parsing file "$sourcepath/src/amount.h", line 743: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 744: +While parsing file "$sourcepath/src/amount.h", line 749: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 750: +While parsing file "$sourcepath/src/amount.h", line 755: Error: Invalid date/time: line std::ostream& -While parsing file "$sourcepath/src/amount.h", line 757: +While parsing file "$sourcepath/src/amount.h", line 762: Error: Invalid date/time: line std::istream& end test -- cgit v1.2.3 From ca8f702a1b18f2f114cd580abe59f03fb85e4803 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 9 Mar 2012 03:19:38 -0600 Subject: Added amount_t::commodity_ptr() --- src/amount.cc | 9 +++++++-- src/amount.h | 1 + test/regress/25A099C9.test | 12 ++++++------ 3 files changed, 14 insertions(+), 8 deletions(-) (limited to 'test/regress/25A099C9.test') diff --git a/src/amount.cc b/src/amount.cc index c80ca14e..d1aa1655 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -867,10 +867,15 @@ bool amount_t::fits_in_long() const return mpfr_fits_slong_p(tempf, GMP_RNDN); } -commodity_t& amount_t::commodity() const +commodity_t * amount_t::commodity_ptr() const { return (has_commodity() ? - *commodity_ : *commodity_pool_t::current_pool->null_commodity); + commodity_ : commodity_pool_t::current_pool->null_commodity); +} + +commodity_t& amount_t::commodity() const +{ + return *commodity_ptr(); } bool amount_t::has_commodity() const diff --git a/src/amount.h b/src/amount.h index 09256b5d..7bf4fe51 100644 --- a/src/amount.h +++ b/src/amount.h @@ -533,6 +533,7 @@ public: number() returns a commodity-less version of an amount. This is useful for accessing just the numeric portion of an amount. */ + commodity_t * commodity_ptr() const; commodity_t& commodity() const; bool has_commodity() const; diff --git a/test/regress/25A099C9.test b/test/regress/25A099C9.test index 48b6814e..c43deb21 100644 --- a/test/regress/25A099C9.test +++ b/test/regress/25A099C9.test @@ -2,16 +2,16 @@ test -f $sourcepath/src/amount.h reg -> 7 __ERROR__ While parsing file "$sourcepath/src/amount.h", line 66: Error: No quantity specified for amount -While parsing file "$sourcepath/src/amount.h", line 731: +While parsing file "$sourcepath/src/amount.h", line 732: Error: Invalid date/time: line amount_t amoun -While parsing file "$sourcepath/src/amount.h", line 737: +While parsing file "$sourcepath/src/amount.h", line 738: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 743: +While parsing file "$sourcepath/src/amount.h", line 744: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 749: +While parsing file "$sourcepath/src/amount.h", line 750: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 755: +While parsing file "$sourcepath/src/amount.h", line 756: Error: Invalid date/time: line std::ostream& -While parsing file "$sourcepath/src/amount.h", line 762: +While parsing file "$sourcepath/src/amount.h", line 763: Error: Invalid date/time: line std::istream& end test -- cgit v1.2.3 From 363670d35bf451ff8ce636c071da73a0d93c514a Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 11 Mar 2012 03:55:25 -0500 Subject: Tighten up argument passing related to fn_market() --- src/amount.cc | 19 +++++------ src/amount.h | 8 +++-- src/annotate.cc | 16 +++++----- src/annotate.h | 6 ++-- src/balance.cc | 4 +-- src/balance.h | 4 +-- src/commodity.cc | 78 ++++++++++++++++++++++------------------------ src/commodity.h | 22 ++++++------- src/history.cc | 55 ++++++++++++++++---------------- src/history.h | 23 +++++++------- src/pool.h | 3 +- src/py_amount.cc | 6 ++-- src/py_balance.cc | 6 ++-- src/py_value.cc | 6 ++-- src/quotes.cc | 2 +- src/quotes.h | 2 +- src/report.cc | 9 +++--- src/value.cc | 16 +++++----- src/value.h | 10 +++--- test/regress/25A099C9.test | 12 +++---- test/unit/t_commodity.cc | 6 ++-- 21 files changed, 153 insertions(+), 160 deletions(-) (limited to 'test/regress/25A099C9.test') diff --git a/src/amount.cc b/src/amount.cc index 46eb5531..5fa58528 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -728,16 +728,16 @@ void amount_t::in_place_unreduce() } optional -amount_t::value(const optional& moment, - const optional& in_terms_of) const +amount_t::value(const datetime_t& moment, + const commodity_t * in_terms_of) const { if (quantity) { #if defined(DEBUG_ON) DEBUG("commodity.price.find", "amount_t::value of " << commodity().symbol()); - if (moment) + if (! moment.is_not_a_date_time()) DEBUG("commodity.price.find", - "amount_t::value: moment = " << *moment); + "amount_t::value: moment = " << moment); if (in_terms_of) DEBUG("commodity.price.find", "amount_t::value: in_terms_of = " << in_terms_of->symbol()); @@ -745,7 +745,7 @@ amount_t::value(const optional& moment, if (has_commodity() && (in_terms_of || ! commodity().has_flags(COMMODITY_PRIMARY))) { optional point; - optional comm(in_terms_of); + const commodity_t * comm(in_terms_of); if (has_annotation() && annotation().price) { if (annotation().has_flags(ANNOTATION_PRICE_FIXATED)) { @@ -755,7 +755,7 @@ amount_t::value(const optional& moment, "amount_t::value: fixated price = " << point->price); } else if (! comm) { - comm = annotation().price->commodity(); + comm = annotation().price->commodity_ptr(); } } @@ -869,15 +869,10 @@ bool amount_t::fits_in_long() const commodity_t * amount_t::commodity_ptr() const { - return (has_commodity() ? + return (commodity_ ? commodity_ : commodity_pool_t::current_pool->null_commodity); } -commodity_t& amount_t::commodity() const -{ - return *commodity_ptr(); -} - bool amount_t::has_commodity() const { return commodity_ && commodity_ != commodity_->pool().null_commodity; diff --git a/src/amount.h b/src/amount.h index 7bf4fe51..903a01cd 100644 --- a/src/amount.h +++ b/src/amount.h @@ -404,8 +404,8 @@ public: $100.00. */ optional - value(const optional& moment = none, - const optional& in_terms_of = none) const; + value(const datetime_t& moment = datetime_t(), + const commodity_t * in_terms_of = NULL) const; optional price() const; @@ -534,7 +534,9 @@ public: useful for accessing just the numeric portion of an amount. */ commodity_t * commodity_ptr() const; - commodity_t& commodity() const; + commodity_t& commodity() const { + return *commodity_ptr(); + } bool has_commodity() const; void set_commodity(commodity_t& comm) { diff --git a/src/annotate.cc b/src/annotate.cc index d2c7f983..2b118e76 100644 --- a/src/annotate.cc +++ b/src/annotate.cc @@ -241,16 +241,16 @@ bool annotated_commodity_t::operator==(const commodity_t& comm) const } optional -annotated_commodity_t::find_price(const optional& commodity, - const optional& moment, - const optional& oldest) const +annotated_commodity_t::find_price(const commodity_t * commodity, + const datetime_t& moment, + const datetime_t& oldest) const { DEBUG("commodity.price.find", "annotated_commodity_t::find_price(" << symbol() << ")"); datetime_t when; - if (moment) - when = *moment; + if (! moment.is_not_a_date_time()) + when = moment; else if (epoch) when = *epoch; else @@ -258,7 +258,7 @@ annotated_commodity_t::find_price(const optional& commodity, DEBUG("commodity.price.find", "reference time: " << when); - optional target; + const commodity_t * target = NULL; if (commodity) target = commodity; @@ -272,7 +272,7 @@ annotated_commodity_t::find_price(const optional& commodity, } else if (! target) { DEBUG("commodity.price.find", "setting target commodity from price"); - target = details.price->commodity(); + target = details.price->commodity_ptr(); } } @@ -285,7 +285,7 @@ annotated_commodity_t::find_price(const optional& commodity, return find_price_from_expr(const_cast(*details.value_expr), commodity, when); - return commodity_t::find_price(commodity, moment, oldest); + return commodity_t::find_price(target, moment, oldest); } commodity_t& diff --git a/src/annotate.h b/src/annotate.h index 606c6a60..044ebc4d 100644 --- a/src/annotate.h +++ b/src/annotate.h @@ -256,9 +256,9 @@ public: } optional - virtual find_price(const optional& commodity = none, - const optional& moment = none, - const optional& oldest = none) const; + virtual find_price(const commodity_t * commodity = NULL, + const datetime_t& moment = datetime_t(), + const datetime_t& oldest = datetime_t()) const; virtual commodity_t& strip_annotations(const keep_details_t& what_to_keep); virtual void write_annotations(std::ostream& out, diff --git a/src/balance.cc b/src/balance.cc index 08368dd8..f87e8bbd 100644 --- a/src/balance.cc +++ b/src/balance.cc @@ -185,8 +185,8 @@ balance_t& balance_t::operator/=(const amount_t& amt) } optional -balance_t::value(const optional& moment, - const optional& in_terms_of) const +balance_t::value(const datetime_t& moment, + const commodity_t * in_terms_of) const { balance_t temp; bool resolved = false; diff --git a/src/balance.h b/src/balance.h index 921f87ef..5f0d52ed 100644 --- a/src/balance.h +++ b/src/balance.h @@ -384,8 +384,8 @@ public: } optional - value(const optional& moment = none, - const optional& in_terms_of = none) const; + value(const datetime_t& moment = datetime_t(), + const commodity_t * in_terms_of = NULL) const; /** * Truth tests. An balance may be truth test in two ways: diff --git a/src/commodity.cc b/src/commodity.cc index 963fb646..8f0dc100 100644 --- a/src/commodity.cc +++ b/src/commodity.cc @@ -71,12 +71,12 @@ void commodity_t::remove_price(const datetime_t& date, commodity_t& commodity) } void commodity_t::map_prices(function fn, - const optional& moment, - const optional& _oldest) + const datetime_t& moment, + const datetime_t& _oldest) { datetime_t when; - if (moment) - when = *moment; + if (! moment.is_not_a_date_time()) + when = moment; else if (epoch) when = *epoch; else @@ -86,8 +86,7 @@ void commodity_t::map_prices(function fn, } optional -commodity_t::find_price_from_expr(expr_t& expr, - const optional& commodity, +commodity_t::find_price_from_expr(expr_t& expr, const commodity_t * commodity, const datetime_t& moment) const { #if defined(DEBUG_ON) @@ -114,31 +113,30 @@ commodity_t::find_price_from_expr(expr_t& expr, } optional -commodity_t::find_price(const optional& commodity, - const optional& moment, - const optional& oldest) const +commodity_t::find_price(const commodity_t * commodity, + const datetime_t& moment, + const datetime_t& oldest) const { DEBUG("commodity.price.find", "commodity_t::find_price(" << symbol() << ")"); - optional target; + const commodity_t * target = NULL; if (commodity) target = commodity; else if (pool().default_commodity) - target = *pool().default_commodity; + target = &*pool().default_commodity; - if (target && *this == *target) + if (target && this == target) return none; - optional - entry(base_t::memoized_price_entry(moment, oldest, - commodity ? &(*commodity) : NULL)); + base_t::memoized_price_entry entry(moment, oldest, + commodity ? commodity : NULL); DEBUG("commodity.price.find", "looking for memoized args: " - << (moment ? format_datetime(*moment) : "NONE") << ", " - << (oldest ? format_datetime(*oldest) : "NONE") << ", " + << (! moment.is_not_a_date_time() ? format_datetime(moment) : "NONE") << ", " + << (! oldest.is_not_a_date_time() ? format_datetime(oldest) : "NONE") << ", " << (commodity ? commodity->symbol() : "NONE")); { - base_t::memoized_price_map::iterator i = base->price_map.find(*entry); + base_t::memoized_price_map::iterator i = base->price_map.find(entry); if (i != base->price_map.end()) { DEBUG("commodity.price.find", "found! returning: " << ((*i).second ? (*i).second->price : amount_t(0L))); @@ -147,8 +145,8 @@ commodity_t::find_price(const optional& commodity, } datetime_t when; - if (moment) - when = *moment; + if (! moment.is_not_a_date_time()) + when = moment; else if (epoch) when = *epoch; else @@ -157,40 +155,40 @@ commodity_t::find_price(const optional& commodity, if (base->value_expr) return find_price_from_expr(*base->value_expr, commodity, when); - optional point = - target ? - pool().commodity_price_history.find_price(*this, *target, when, oldest) : - pool().commodity_price_history.find_price(*this, when, oldest); - - if (entry) { - if (base->price_map.size() > base_t::max_price_map_size) { - DEBUG("history.find", - "price map has grown too large, clearing it by half"); - for (std::size_t i = 0; i < base_t::max_price_map_size >> 1; i++) - base->price_map.erase(base->price_map.begin()); - } + optional + point(target ? + pool().commodity_price_history.find_price(*this, *target, + when, oldest) : + pool().commodity_price_history.find_price(*this, when, oldest)); + // Record this price point in the memoization map + if (base->price_map.size() > base_t::max_price_map_size) { DEBUG("history.find", - "remembered: " << (point ? point->price : amount_t(0L))); - base->price_map.insert(base_t::memoized_price_map::value_type(*entry, point)); + "price map has grown too large, clearing it by half"); + for (std::size_t i = 0; i < base_t::max_price_map_size >> 1; i++) + base->price_map.erase(base->price_map.begin()); } + DEBUG("history.find", + "remembered: " << (point ? point->price : amount_t(0L))); + base->price_map.insert(base_t::memoized_price_map::value_type(entry, point)); + return point; } optional commodity_t::check_for_updated_price(const optional& point, - const optional& moment, - const optional& in_terms_of) + const datetime_t& moment, + const commodity_t* in_terms_of) { if (pool().get_quotes && ! has_flags(COMMODITY_NOMARKET)) { bool exceeds_leeway = true; if (point) { time_duration_t::sec_type seconds_diff; - if (moment) { - seconds_diff = (*moment - point->when).total_seconds(); - DEBUG("commodity.download", "moment = " << *moment); + if (! moment.is_not_a_date_time()) { + seconds_diff = (moment - point->when).total_seconds(); + DEBUG("commodity.download", "moment = " << moment); DEBUG("commodity.download", "slip.moment = " << seconds_diff); } else { seconds_diff = (TRUE_CURRENT_TIME() - point->when).total_seconds(); @@ -209,7 +207,7 @@ commodity_t::check_for_updated_price(const optional& point, pool().get_commodity_quote(*this, in_terms_of)) { if (! in_terms_of || (quote->price.has_commodity() && - quote->price.commodity() == *in_terms_of)) + quote->price.commodity_ptr() == in_terms_of)) return quote; } } diff --git a/src/commodity.h b/src/commodity.h index 1358966e..bd1aedb9 100644 --- a/src/commodity.h +++ b/src/commodity.h @@ -117,12 +117,12 @@ protected: optional larger; optional value_expr; - typedef tuple, - optional, commodity_t *> memoized_price_entry; + typedef tuple memoized_price_entry; typedef std::map > memoized_price_map; - static const std::size_t max_price_map_size = 16; + static const std::size_t max_price_map_size = 8; mutable memoized_price_map price_map; public: @@ -272,22 +272,22 @@ public: void remove_price(const datetime_t& date, commodity_t& commodity); void map_prices(function fn, - const optional& moment = none, - const optional& _oldest = none); + const datetime_t& moment = datetime_t(), + const datetime_t& _oldest = datetime_t()); optional - find_price_from_expr(expr_t& expr, const optional& commodity, + find_price_from_expr(expr_t& expr, const commodity_t * commodity, const datetime_t& moment) const; optional - virtual find_price(const optional& commodity = none, - const optional& moment = none, - const optional& oldest = none) const; + virtual find_price(const commodity_t * commodity = NULL, + const datetime_t& moment = datetime_t(), + const datetime_t& oldest = datetime_t()) const; optional check_for_updated_price(const optional& point, - const optional& moment, - const optional& in_terms_of); + const datetime_t& moment, + const commodity_t * in_terms_of); commodity_t& nail_down(const expr_t& expr); diff --git a/src/history.cc b/src/history.cc index 83326728..22ac4494 100644 --- a/src/history.cc +++ b/src/history.cc @@ -52,15 +52,15 @@ public: PricePointMap price_point; PriceRatioMap ratios; - datetime_t reftime; - optional oldest; + datetime_t reftime; + datetime_t oldest; recent_edge_weight() { } - recent_edge_weight(EdgeWeightMap _weight, - PricePointMap _price_point, - PriceRatioMap _ratios, - datetime_t _reftime, - const optional& _oldest = none) + recent_edge_weight(EdgeWeightMap _weight, + PricePointMap _price_point, + PriceRatioMap _ratios, + const datetime_t& _reftime, + const datetime_t& _oldest = datetime_t()) : weight(_weight), price_point(_price_point), ratios(_ratios), reftime(_reftime), oldest(_oldest) { } @@ -69,8 +69,8 @@ public: { #if defined(DEBUG_ON) DEBUG("history.find", " reftime = " << reftime); - if (oldest) { - DEBUG("history.find", " oldest = " << *oldest); + if (! oldest.is_not_a_date_time()) { + DEBUG("history.find", " oldest = " << oldest); } #endif @@ -88,7 +88,7 @@ public: --low; assert(((*low).first <= reftime)); - if (oldest && (*low).first < *oldest) { + if (! oldest.is_not_a_date_time() && (*low).first < oldest) { DEBUG("history.find", " edge is out of range"); return false; } @@ -170,9 +170,9 @@ void commodity_history_t::remove_price(const commodity_t& source, void commodity_history_t::map_prices(function fn, - const commodity_t& source, - const datetime_t& moment, - const optional& oldest) + const commodity_t& source, + const datetime_t& moment, + const datetime_t& oldest) { vertex_descriptor sv = vertex(*source.graph_index(), price_graph); @@ -193,7 +193,7 @@ void commodity_history_t::map_prices(function= *oldest) && when <= moment) { + if ((oldest.is_not_a_date_time() || when >= oldest) && when <= moment) { if (pair.second.commodity() == source) { amount_t price(pair.second); price.in_place_invert(); @@ -209,9 +209,9 @@ void commodity_history_t::map_prices(function -commodity_history_t::find_price(const commodity_t& source, - const datetime_t& moment, - const optional& oldest) +commodity_history_t::find_price(const commodity_t& source, + const datetime_t& moment, + const datetime_t& oldest) { vertex_descriptor sv = vertex(*source.graph_index(), price_graph); @@ -270,10 +270,10 @@ commodity_history_t::find_price(const commodity_t& source, } optional -commodity_history_t::find_price(const commodity_t& source, - const commodity_t& target, - const datetime_t& moment, - const optional& oldest) +commodity_history_t::find_price(const commodity_t& source, + const commodity_t& target, + const datetime_t& moment, + const datetime_t& oldest) { vertex_descriptor sv = vertex(*source.graph_index(), price_graph); vertex_descriptor tv = vertex(*target.graph_index(), price_graph); @@ -402,17 +402,16 @@ private: Name name; }; -void commodity_history_t::print_map(std::ostream& out, - const optional& moment) +void commodity_history_t::print_map(std::ostream& out, const datetime_t& moment) { - if (moment) { + if (moment.is_not_a_date_time()) { + write_graphviz(out, price_graph, + label_writer(get(vertex_name, price_graph))); + } else { FGraph fg(price_graph, recent_edge_weight - (get(edge_weight, price_graph), pricemap, ratiomap, *moment)); + (get(edge_weight, price_graph), pricemap, ratiomap, moment)); write_graphviz(out, fg, label_writer(get(vertex_name, fg))); - } else { - write_graphviz(out, price_graph, - label_writer(get(vertex_name, price_graph))); } } diff --git a/src/history.h b/src/history.h index 920feec6..71cbad0c 100644 --- a/src/history.h +++ b/src/history.h @@ -111,23 +111,22 @@ public: const datetime_t& date); void map_prices(function fn, - const commodity_t& source, - const datetime_t& moment, - const optional& _oldest = none); + const commodity_t& source, + const datetime_t& moment, + const datetime_t& _oldest = datetime_t()); optional - find_price(const commodity_t& source, - const datetime_t& moment, - const optional& oldest = none); + find_price(const commodity_t& source, + const datetime_t& moment, + const datetime_t& oldest = datetime_t()); optional - find_price(const commodity_t& source, - const commodity_t& target, - const datetime_t& moment, - const optional& oldest = none); + find_price(const commodity_t& source, + const commodity_t& target, + const datetime_t& moment, + const datetime_t& oldest = datetime_t()); - void print_map(std::ostream& out, - const optional& moment = none); + void print_map(std::ostream& out, const datetime_t& moment = datetime_t()); }; } // namespace ledger diff --git a/src/pool.h b/src/pool.h index b7921f59..eb630781 100644 --- a/src/pool.h +++ b/src/pool.h @@ -83,13 +83,12 @@ public: bool get_quotes; // --download function - (commodity_t& commodity, const optional& in_terms_of)> + (commodity_t& commodity, const commodity_t * in_terms_of)> get_commodity_quote; static shared_ptr current_pool; explicit commodity_pool_t(); - virtual ~commodity_pool_t() { TRACE_DTOR(commodity_pool_t); } diff --git a/src/py_amount.cc b/src/py_amount.cc index 25ec8e26..ea69dec5 100644 --- a/src/py_amount.cc +++ b/src/py_amount.cc @@ -48,12 +48,12 @@ namespace { return amount.value(CURRENT_TIME()); } boost::optional py_value_1(const amount_t& amount, - commodity_t& in_terms_of) { + const commodity_t * in_terms_of) { return amount.value(CURRENT_TIME(), in_terms_of); } boost::optional py_value_2(const amount_t& amount, - commodity_t& in_terms_of, - datetime_t& moment) { + const commodity_t * in_terms_of, + const datetime_t& moment) { return amount.value(moment, in_terms_of); } diff --git a/src/py_balance.cc b/src/py_balance.cc index 38941832..2ae546f1 100644 --- a/src/py_balance.cc +++ b/src/py_balance.cc @@ -48,12 +48,12 @@ namespace { return balance.value(CURRENT_TIME()); } boost::optional py_value_1(const balance_t& balance, - commodity_t& in_terms_of) { + const commodity_t * in_terms_of) { return balance.value(CURRENT_TIME(), in_terms_of); } boost::optional py_value_2(const balance_t& balance, - commodity_t& in_terms_of, - datetime_t& moment) { + const commodity_t * in_terms_of, + const datetime_t& moment) { return balance.value(moment, in_terms_of); } diff --git a/src/py_value.cc b/src/py_value.cc index 78301acd..efeb4340 100644 --- a/src/py_value.cc +++ b/src/py_value.cc @@ -51,12 +51,12 @@ namespace { return value.value(CURRENT_TIME()); } boost::optional py_value_1(const value_t& value, - commodity_t& in_terms_of) { + const commodity_t * in_terms_of) { return value.value(CURRENT_TIME(), in_terms_of); } boost::optional py_value_2(const value_t& value, - commodity_t& in_terms_of, - datetime_t& moment) { + const commodity_t * in_terms_of, + const datetime_t& moment) { return value.value(moment, in_terms_of); } diff --git a/src/quotes.cc b/src/quotes.cc index b29eb8bd..c33e0826 100644 --- a/src/quotes.cc +++ b/src/quotes.cc @@ -40,7 +40,7 @@ namespace ledger { optional commodity_quote_from_script(commodity_t& commodity, - const optional& exchange_commodity) + const commodity_t * exchange_commodity) { DEBUG("commodity.download", "downloading quote for symbol " << commodity.symbol()); #if defined(DEBUG_ON) diff --git a/src/quotes.h b/src/quotes.h index 52092fbc..56740e47 100644 --- a/src/quotes.h +++ b/src/quotes.h @@ -46,7 +46,7 @@ namespace ledger { optional commodity_quote_from_script(commodity_t& commodity, - const optional& exchange_commodity); + const commodity_t * exchange_commodity); } // namespace ledger diff --git a/src/report.cc b/src/report.cc index 8205c1dd..a3abcb98 100644 --- a/src/report.cc +++ b/src/report.cc @@ -532,12 +532,13 @@ value_t report_t::fn_should_bold(call_scope_t& scope) value_t report_t::fn_market(call_scope_t& args) { - optional moment = (args.has(1) ? - args.get(1) : - optional()); value_t result; value_t arg0 = args[0]; + datetime_t moment; + if (args.has(1)) + moment = args.get(1); + if (arg0.is_string()) { amount_t tmp(1L); commodity_t * commodity = @@ -962,7 +963,7 @@ value_t report_t::pricemap_command(call_scope_t& args) std::ostream& out(output_stream); commodity_pool_t::current_pool->commodity_price_history.print_map (out, args.has(0) ? - optional(datetime_t(parse_date(args.get(0)))) : none); + datetime_t(parse_date(args.get(0))) : datetime_t()); return true; } diff --git a/src/value.cc b/src/value.cc index c4e7170d..cae2a356 100644 --- a/src/value.cc +++ b/src/value.cc @@ -1399,8 +1399,8 @@ bool value_t::is_zero() const return false; } -value_t value_t::value(const optional& moment, - const optional& in_terms_of) const +value_t value_t::value(const datetime_t& moment, + const commodity_t * in_terms_of) const { switch (type()) { case INTEGER: @@ -1432,9 +1432,9 @@ value_t value_t::value(const optional& moment, return NULL_VALUE; } -value_t value_t::exchange_commodities(const std::string& commodities, - const bool add_prices, - const optional& moment) +value_t value_t::exchange_commodities(const std::string& commodities, + const bool add_prices, + const datetime_t& moment) { if (type() == SEQUENCE) { value_t temp; @@ -1447,7 +1447,7 @@ value_t value_t::exchange_commodities(const std::string& commodities, // expression, skip the expensive logic below. if (commodities.find(',') == string::npos && commodities.find('=') == string::npos) - return value(moment, *commodity_pool_t::current_pool->find_or_create(commodities)); + return value(moment, commodity_pool_t::current_pool->find_or_create(commodities)); std::vector comms; std::vector force; @@ -1479,7 +1479,7 @@ value_t value_t::exchange_commodities(const std::string& commodities, break; DEBUG("commodity.exchange", "Referent doesn't match, pricing..."); - if (optional val = as_amount_lval().value(moment, *comm)) { + if (optional val = as_amount_lval().value(moment, comm)) { DEBUG("commodity.exchange", "Re-priced amount is: " << *val); return *val; } @@ -1502,7 +1502,7 @@ value_t value_t::exchange_commodities(const std::string& commodities, temp += pair.second; } else { DEBUG("commodity.exchange", "Referent doesn't match, pricing..."); - if (optional val = pair.second.value(moment, *comm)) { + if (optional val = pair.second.value(moment, comm)) { DEBUG("commodity.exchange", "Re-priced member amount is: " << *val); temp += *val; repriced = true; diff --git a/src/value.h b/src/value.h index df075843..a95968c2 100644 --- a/src/value.h +++ b/src/value.h @@ -477,12 +477,12 @@ public: void in_place_unreduce(); // exists for efficiency's sake // Return the "market value" of a given value at a specific time. - value_t value(const optional& moment = none, - const optional& in_terms_of = none) const; + value_t value(const datetime_t& moment = datetime_t(), + const commodity_t * in_terms_of = NULL) const; - value_t exchange_commodities(const std::string& commodities, - const bool add_prices = false, - const optional& moment = none); + value_t exchange_commodities(const std::string& commodities, + const bool add_prices = false, + const datetime_t& moment = datetime_t()); /** * Truth tests. diff --git a/test/regress/25A099C9.test b/test/regress/25A099C9.test index c43deb21..418b77c8 100644 --- a/test/regress/25A099C9.test +++ b/test/regress/25A099C9.test @@ -2,16 +2,16 @@ test -f $sourcepath/src/amount.h reg -> 7 __ERROR__ While parsing file "$sourcepath/src/amount.h", line 66: Error: No quantity specified for amount -While parsing file "$sourcepath/src/amount.h", line 732: +While parsing file "$sourcepath/src/amount.h", line 734: Error: Invalid date/time: line amount_t amoun -While parsing file "$sourcepath/src/amount.h", line 738: +While parsing file "$sourcepath/src/amount.h", line 740: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 744: +While parsing file "$sourcepath/src/amount.h", line 746: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 750: +While parsing file "$sourcepath/src/amount.h", line 752: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 756: +While parsing file "$sourcepath/src/amount.h", line 758: Error: Invalid date/time: line std::ostream& -While parsing file "$sourcepath/src/amount.h", line 763: +While parsing file "$sourcepath/src/amount.h", line 765: Error: Invalid date/time: line std::istream& end test diff --git a/test/unit/t_commodity.cc b/test/unit/t_commodity.cc index 6a6f27aa..8caeb694 100644 --- a/test/unit/t_commodity.cc +++ b/test/unit/t_commodity.cc @@ -92,18 +92,18 @@ BOOST_AUTO_TEST_CASE(testPriceHistory) BOOST_CHECK_EQUAL(string("$2124.122"), amt->to_fullstring()); #endif - amt = x1.value(CURRENT_TIME(), euro); + amt = x1.value(CURRENT_TIME(), &euro); BOOST_CHECK(amt); BOOST_CHECK_EQUAL(string("EUR 1787.50"), amt->rounded().to_string()); // Add a newer Euro pricing aapl.add_price(jan17_07, amount_t("EUR 23.00")); - amt = x1.value(CURRENT_TIME(), euro); + amt = x1.value(CURRENT_TIME(), &euro); BOOST_CHECK(amt); BOOST_CHECK_EQUAL(string("EUR 2302.30"), amt->to_string()); - amt = x1.value(CURRENT_TIME(), cad); + amt = x1.value(CURRENT_TIME(), &cad); BOOST_CHECK(amt); BOOST_CHECK_EQUAL(string("CAD 3223.22"), amt->to_string()); #endif // NOT_FOR_PYTHON -- cgit v1.2.3 From 11067d9cc6593fd19cb44ecd3cd8c31b9b8b0f65 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 16 Mar 2012 02:39:42 -0500 Subject: Unexpected initial whitespace is an error (again) Fixes #565 --- 95350193.test | 6 - lisp/ldg-test.el | 11 +- src/textual.cc | 5 +- test/regress/25A099C9.test | 1196 +++++++++++++++++++++++++++++++++++++++++++- test/regress/8EAF77C0.test | 21 + test/regress/95350193.test | 6 + 6 files changed, 1232 insertions(+), 13 deletions(-) delete mode 100644 95350193.test create mode 100644 test/regress/8EAF77C0.test create mode 100644 test/regress/95350193.test (limited to 'test/regress/25A099C9.test') diff --git a/95350193.test b/95350193.test deleted file mode 100644 index dadb39cf..00000000 --- a/95350193.test +++ /dev/null @@ -1,6 +0,0 @@ -2011-11-08 * Test - Assets:Voucher:Amazon 137.87 GBP (48H5) - Assets:Cash -137.87 GBP - -test pricedb -end test diff --git a/lisp/ldg-test.el b/lisp/ldg-test.el index 2ab7a0c6..ad612f4d 100644 --- a/lisp/ldg-test.el +++ b/lisp/ldg-test.el @@ -39,8 +39,11 @@ (setq output (concat (or output "") (buffer-substring beg (match-beginning 0))))))) - (find-file-other-window (expand-file-name (concat prefix ".test") - ledger-source-directory)) + (find-file-other-window + (expand-file-name (concat prefix ".test") + (expand-file-name "test/regress" + ledger-source-directory))) + (ledger-mode) (when input (insert input)) (when output @@ -52,9 +55,11 @@ (interactive) (save-excursion (goto-char (point-min)) - (when (re-search-forward "^test \\(.+\\)" nil t) + (when (re-search-forward "^test \\(.+?\\)\\( ->.*\\)?$" nil t) (let ((command (expand-file-name ledger-test-binary)) (args (format "-f \"%s\" %s" buffer-file-name (match-string 1)))) + (setq args (replace-regexp-in-string "\\$sourcepath" + ledger-source-directory args)) (kill-new args) (message "Testing: ledger %s" args) (async-shell-command (format "\"%s\" %s" command args)))))) diff --git a/src/textual.cc b/src/textual.cc index 7d96310a..e7c523d9 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -337,9 +337,8 @@ void instance_t::read_next_directive() break; case ' ': - case '\t': { - break; - } + case '\t': + throw parse_error(_("Unexpected whitespace at beginning of line")); case ';': // comments case '#': diff --git a/test/regress/25A099C9.test b/test/regress/25A099C9.test index 418b77c8..6c0546ee 100644 --- a/test/regress/25A099C9.test +++ b/test/regress/25A099C9.test @@ -1,17 +1,1211 @@ -test -f $sourcepath/src/amount.h reg -> 7 +test -f $sourcepath/src/amount.h reg -> 92 __ERROR__ +While parsing file "$sourcepath/src/amount.h", line 2: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 3: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 4: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 5: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 6: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 7: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 8: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 9: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 10: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 11: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 12: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 13: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 14: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 15: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 16: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 17: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 18: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 19: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 20: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 21: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 22: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 23: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 24: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 25: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 26: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 27: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 28: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 29: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 30: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 33: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 34: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 37: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 38: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 39: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 40: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 41: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 42: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 43: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 44: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 45: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 46: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 47: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 48: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 49: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 50: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 51: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 52: +Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 66: Error: No quantity specified for amount +While parsing file "$sourcepath/src/amount.h", line 69: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 70: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 71: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 72: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 73: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 74: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 75: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 76: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 77: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 83: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 84: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 85: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 86: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 87: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 88: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 89: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 90: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 91: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 93: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 94: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 95: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 96: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 99: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 100: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 101: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 102: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 103: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 104: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 106: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 108: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 109: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 111: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 112: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 113: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 115: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 116: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 117: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 118: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 121: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 122: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 123: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 124: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 126: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 128: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 129: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 132: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 133: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 135: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 136: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 137: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 138: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 139: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 140: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 142: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 143: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 144: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 146: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 147: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 149: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 150: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 151: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 153: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 154: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 155: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 156: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 157: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 158: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 159: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 160: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 161: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 162: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 163: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 164: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 165: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 166: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 167: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 168: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 169: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 171: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 173: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 174: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 175: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 176: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 177: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 178: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 179: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 180: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 182: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 183: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 184: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 185: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 186: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 187: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 188: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 190: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 191: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 193: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 194: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 195: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 196: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 197: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 198: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 199: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 200: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 201: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 202: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 203: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 204: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 205: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 206: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 207: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 208: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 209: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 210: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 211: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 212: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 213: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 214: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 215: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 216: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 217: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 219: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 220: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 221: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 222: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 223: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 224: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 225: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 226: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 227: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 229: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 230: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 231: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 232: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 233: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 234: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 235: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 236: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 237: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 238: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 240: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 242: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 243: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 245: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 246: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 247: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 248: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 249: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 251: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 252: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 253: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 254: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 256: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 257: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 258: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 259: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 260: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 261: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 262: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 263: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 264: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 265: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 266: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 267: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 269: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 271: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 272: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 273: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 275: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 276: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 277: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 278: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 279: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 280: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 282: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 283: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 284: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 285: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 286: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 287: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 289: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 291: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 292: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 294: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 295: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 296: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 297: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 298: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 299: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 300: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 301: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 302: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 303: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 305: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 306: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 307: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 308: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 309: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 310: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 311: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 312: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 313: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 315: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 316: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 317: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 319: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 320: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 321: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 322: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 323: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 324: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 325: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 326: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 327: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 328: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 330: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 331: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 332: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 333: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 334: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 335: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 337: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 338: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 339: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 340: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 341: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 342: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 343: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 344: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 345: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 346: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 347: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 349: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 350: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 351: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 352: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 353: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 354: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 355: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 356: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 358: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 359: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 360: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 361: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 362: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 363: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 364: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 365: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 367: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 368: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 369: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 370: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 371: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 372: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 373: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 374: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 376: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 377: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 378: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 379: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 380: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 381: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 382: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 383: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 384: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 385: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 387: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 388: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 389: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 390: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 391: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 392: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 393: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 394: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 395: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 396: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 398: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 399: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 400: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 401: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 402: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 403: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 404: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 405: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 406: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 407: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 408: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 410: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 412: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 414: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 415: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 416: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 418: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 420: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 421: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 422: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 423: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 424: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 425: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 427: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 428: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 430: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 431: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 432: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 434: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 435: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 437: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 438: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 439: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 440: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 441: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 443: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 444: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 445: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 446: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 447: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 448: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 450: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 451: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 452: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 453: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 455: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 456: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 457: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 458: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 459: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 460: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 461: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 463: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 465: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 466: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 467: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 469: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 470: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 471: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 472: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 473: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 475: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 476: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 477: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 479: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 480: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 481: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 483: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 484: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 486: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 487: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 488: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 490: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 491: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 493: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 494: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 495: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 496: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 497: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 498: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 499: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 500: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 501: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 503: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 504: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 505: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 506: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 507: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 508: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 510: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 512: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 513: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 514: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 516: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 517: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 519: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 520: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 522: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 524: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 525: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 526: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 527: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 528: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 530: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 531: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 533: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 534: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 535: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 536: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 537: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 538: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 539: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 541: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 542: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 543: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 544: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 545: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 546: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 547: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 548: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 549: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 551: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 552: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 553: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 555: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 556: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 557: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 558: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 560: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 562: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 563: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 564: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 566: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 567: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 568: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 570: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 571: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 572: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 573: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 575: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 576: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 578: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 579: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 580: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 582: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 583: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 584: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 585: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 586: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 588: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 589: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 590: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 591: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 593: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 594: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 596: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 597: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 598: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 599: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 601: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 602: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 603: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 604: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 605: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 606: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 607: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 608: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 610: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 612: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 613: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 614: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 616: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 617: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 619: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 620: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 621: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 622: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 623: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 625: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 626: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 628: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 629: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 630: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 631: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 632: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 633: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 635: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 636: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 637: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 638: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 640: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 641: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 642: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 643: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 645: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 646: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 647: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 649: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 650: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 652: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 654: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 655: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 656: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 657: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 658: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 659: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 660: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 661: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 662: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 663: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 665: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 666: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 668: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 670: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 671: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 672: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 674: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 675: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 676: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 677: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 679: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 680: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 681: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 682: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 683: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 684: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 685: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 686: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 693: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 694: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 696: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 698: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 699: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 700: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 702: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 704: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 705: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 706: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 707: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 709: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 710: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 711: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 712: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 713: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 714: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 715: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 716: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 717: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 719: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 723: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 725: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 727: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 728: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 731: +Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 734: Error: Invalid date/time: line amount_t amoun +While parsing file "$sourcepath/src/amount.h", line 735: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 736: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 737: +Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 740: Error: Invalid date/time: line string amount_ +While parsing file "$sourcepath/src/amount.h", line 741: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 742: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 743: +Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 746: Error: Invalid date/time: line string amount_ +While parsing file "$sourcepath/src/amount.h", line 747: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 748: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 749: +Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 752: Error: Invalid date/time: line string amount_ +While parsing file "$sourcepath/src/amount.h", line 753: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 754: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 755: +Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 758: Error: Invalid date/time: line std::ostream& +While parsing file "$sourcepath/src/amount.h", line 759: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 760: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 761: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 762: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 763: +Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 765: Error: Invalid date/time: line std::istream& +While parsing file "$sourcepath/src/amount.h", line 766: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 767: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/src/amount.h", line 771: +Error: Unexpected whitespace at beginning of line end test diff --git a/test/regress/8EAF77C0.test b/test/regress/8EAF77C0.test new file mode 100644 index 00000000..fd16d642 --- /dev/null +++ b/test/regress/8EAF77C0.test @@ -0,0 +1,21 @@ +2011/08/05 Rehab Donation + Asset:Bank:Boi:Current:Dk 10 + Expense:Misc:Charity + + 2011/08/07 Net Salary + Asset:Bank:Boi:Savings:Dk -3016.24 + Income:NetSalary:Dk + +2011/08/30 Net Salary + Asset:Bank:Boi:Savings:Dk -3016.24 + Income:NetSalary:Dk + +test reg -> 3 +__ERROR__ +While parsing file "$sourcepath/test/regress/8EAF77C0.test", line 5: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/test/regress/8EAF77C0.test", line 6: +Error: Unexpected whitespace at beginning of line +While parsing file "$sourcepath/test/regress/8EAF77C0.test", line 7: +Error: Unexpected whitespace at beginning of line +end test diff --git a/test/regress/95350193.test b/test/regress/95350193.test new file mode 100644 index 00000000..dadb39cf --- /dev/null +++ b/test/regress/95350193.test @@ -0,0 +1,6 @@ +2011-11-08 * Test + Assets:Voucher:Amazon 137.87 GBP (48H5) + Assets:Cash -137.87 GBP + +test pricedb +end test -- cgit v1.2.3 From 20c076dff92806c6c2aae7c0c87b000ffc703382 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 16 Mar 2012 03:50:40 -0500 Subject: Improved error reports about leading whitespace --- src/textual.cc | 17 +- test/regress/25A099C9.test | 1190 +------------------------------------------- test/regress/8EAF77C0.test | 6 +- test/regress/AEDE9734.test | 12 + test/regress/D51BFF74.test | 24 + 5 files changed, 61 insertions(+), 1188 deletions(-) create mode 100644 test/regress/AEDE9734.test create mode 100644 test/regress/D51BFF74.test (limited to 'test/regress/25A099C9.test') diff --git a/src/textual.cc b/src/textual.cc index e7c523d9..3555ea4d 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -133,7 +133,7 @@ namespace { } #endif - void read_next_directive(); + void read_next_directive(bool& error_flag); #if defined(TIMELOG_SUPPORT) void clock_in_directive(char * line, bool capitalized); @@ -251,11 +251,15 @@ void instance_t::parse() context.linenum = 0; context.curr_pos = in.tellg(); + bool error_flag = false; + while (in.good() && ! in.eof()) { try { - read_next_directive(); + read_next_directive(error_flag); } catch (const std::exception& err) { + error_flag = true; + string current_context = error_context(); if (parent) { @@ -324,13 +328,16 @@ std::streamsize instance_t::read_line(char *& line) return 0; } -void instance_t::read_next_directive() +void instance_t::read_next_directive(bool& error_flag) { char * line; std::streamsize len = read_line(line); if (len == 0 || line == NULL) return; + if (! std::isspace(line[0])) + error_flag = false; + switch (line[0]) { case '\0': assert(false); // shouldn't ever reach here @@ -338,7 +345,9 @@ void instance_t::read_next_directive() case ' ': case '\t': - throw parse_error(_("Unexpected whitespace at beginning of line")); + if (! error_flag) + throw parse_error(_("Unexpected whitespace at beginning of line")); + break; case ';': // comments case '#': diff --git a/test/regress/25A099C9.test b/test/regress/25A099C9.test index 6c0546ee..df4fef1c 100644 --- a/test/regress/25A099C9.test +++ b/test/regress/25A099C9.test @@ -1,1211 +1,43 @@ -test -f $sourcepath/src/amount.h reg -> 92 +test -f $sourcepath/src/amount.h reg -> 20 __ERROR__ While parsing file "$sourcepath/src/amount.h", line 2: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 3: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 4: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 5: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 6: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 7: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 8: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 9: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 10: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 11: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 12: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 13: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 14: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 15: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 16: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 17: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 18: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 19: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 20: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 21: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 22: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 23: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 24: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 25: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 26: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 27: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 28: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 29: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 30: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 33: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 34: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 37: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 38: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 39: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 40: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 41: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 42: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 43: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 44: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 45: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 46: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 47: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 48: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 49: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 50: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 51: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 52: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 66: -Error: No quantity specified for amount -While parsing file "$sourcepath/src/amount.h", line 69: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 70: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 71: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 72: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 73: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 74: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 75: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 76: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 77: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 83: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 84: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 85: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 86: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 87: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 88: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 89: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 90: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 91: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 93: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 94: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 95: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 96: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 99: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 100: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 101: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 102: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 103: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 104: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 106: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 108: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 109: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 111: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 112: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 113: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 115: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 116: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 117: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 118: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 121: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 122: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 123: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 124: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 126: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 128: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 129: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 132: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 133: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 135: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 136: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 137: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 138: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 139: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 140: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 142: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 143: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 144: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 146: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 147: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 149: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 150: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 151: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 153: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 154: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 155: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 156: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 157: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 158: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 159: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 160: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 161: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 162: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 163: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 164: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 165: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 166: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 167: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 168: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 169: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 171: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 173: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 174: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 175: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 176: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 177: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 178: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 179: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 180: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 182: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 183: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 184: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 185: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 186: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 187: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 188: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 190: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 191: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 193: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 194: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 195: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 196: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 197: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 198: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 199: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 200: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 201: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 202: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 203: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 204: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 205: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 206: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 207: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 208: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 209: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 210: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 211: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 212: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 213: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 214: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 215: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 216: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 217: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 219: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 220: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 221: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 222: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 223: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 224: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 225: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 226: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 227: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 229: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 230: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 231: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 232: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 233: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 234: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 235: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 236: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 237: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 238: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 240: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 242: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 243: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 245: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 246: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 247: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 248: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 249: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 251: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 252: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 253: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 254: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 256: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 257: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 258: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 259: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 260: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 261: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 262: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 263: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 264: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 265: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 266: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 267: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 269: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 271: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 272: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 273: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 275: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 276: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 277: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 278: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 279: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 280: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 282: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 283: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 284: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 285: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 286: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 287: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 289: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 291: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 292: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 294: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 295: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 296: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 297: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 298: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 299: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 300: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 301: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 302: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 303: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 305: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 306: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 307: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 308: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 309: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 310: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 311: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 312: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 313: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 315: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 316: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 317: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 319: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 320: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 321: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 322: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 323: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 324: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 325: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 326: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 327: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 328: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 330: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 331: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 332: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 333: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 334: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 335: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 337: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 338: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 339: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 340: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 341: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 342: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 343: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 344: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 345: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 346: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 347: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 349: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 350: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 351: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 352: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 353: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 354: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 355: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 356: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 358: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 359: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 360: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 361: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 362: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 363: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 364: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 365: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 367: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 368: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 369: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 370: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 371: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 372: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 373: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 374: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 376: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 377: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 378: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 379: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 380: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 381: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 382: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 383: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 384: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 385: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 387: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 388: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 389: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 390: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 391: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 392: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 393: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 394: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 395: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 396: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 398: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 399: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 400: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 401: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 402: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 403: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 404: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 405: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 406: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 407: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 408: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 410: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 412: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 414: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 415: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 416: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 418: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 420: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 421: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 422: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 423: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 424: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 425: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 427: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 428: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 430: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 431: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 432: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 434: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 435: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 437: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 438: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 439: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 440: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 441: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 443: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 444: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 445: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 446: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 447: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 448: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 450: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 451: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 452: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 453: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 455: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 456: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 457: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 458: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 459: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 460: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 461: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 463: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 465: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 466: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 467: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 469: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 470: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 471: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 472: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 473: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 475: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 476: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 477: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 479: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 480: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 481: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 483: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 484: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 486: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 487: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 488: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 490: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 491: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 493: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 494: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 495: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 496: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 497: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 498: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 499: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 500: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 501: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 503: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 504: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 505: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 506: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 507: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 508: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 510: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 512: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 513: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 514: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 516: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 517: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 519: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 520: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 522: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 524: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 525: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 526: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 527: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 528: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 530: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 531: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 533: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 534: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 535: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 536: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 537: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 538: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 539: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 541: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 542: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 543: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 544: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 545: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 546: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 547: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 548: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 549: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 551: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 552: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 553: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 555: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 556: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 557: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 558: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 560: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 562: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 563: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 564: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 566: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 567: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 568: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 570: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 571: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 572: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 573: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 575: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 576: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 578: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 579: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 580: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 582: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 583: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 584: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 585: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 586: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 588: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 589: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 590: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 591: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 593: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 594: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 596: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 597: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 598: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 599: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 601: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 602: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 603: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 604: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 605: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 606: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 607: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 608: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 610: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 612: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 613: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 614: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 616: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 617: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 619: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 620: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 621: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 622: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 623: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 625: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 626: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 628: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 629: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 630: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 631: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 632: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 633: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 635: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 636: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 637: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 638: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 640: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 641: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 642: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 643: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 645: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 646: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 647: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 649: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 650: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 652: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 654: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 655: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 656: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 657: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 658: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 659: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 660: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 661: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 662: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 663: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 665: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 666: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 668: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 670: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 671: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 672: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 674: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 675: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 676: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 677: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 679: +While parsing file "$sourcepath/src/amount.h", line 33: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 680: +While parsing file "$sourcepath/src/amount.h", line 37: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 681: +While parsing file "$sourcepath/src/amount.h", line 66: +Error: No quantity specified for amount +While parsing file "$sourcepath/src/amount.h", line 69: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 682: +While parsing file "$sourcepath/src/amount.h", line 83: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 683: +While parsing file "$sourcepath/src/amount.h", line 93: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 684: +While parsing file "$sourcepath/src/amount.h", line 99: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 685: +While parsing file "$sourcepath/src/amount.h", line 121: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 686: +While parsing file "$sourcepath/src/amount.h", line 132: Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 693: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 694: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 696: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 698: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 699: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 700: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 702: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 704: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 705: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 706: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 707: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 709: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 710: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 711: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 712: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 713: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 714: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 715: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 716: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 717: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 719: -Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 723: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 725: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 727: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 728: -Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 731: Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 734: Error: Invalid date/time: line amount_t amoun -While parsing file "$sourcepath/src/amount.h", line 735: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 736: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 737: -Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 740: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 741: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 742: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 743: -Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 746: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 747: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 748: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 749: -Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 752: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 753: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 754: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 755: -Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 758: Error: Invalid date/time: line std::ostream& -While parsing file "$sourcepath/src/amount.h", line 759: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 760: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 761: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 762: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 763: -Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 765: Error: Invalid date/time: line std::istream& -While parsing file "$sourcepath/src/amount.h", line 766: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 767: -Error: Unexpected whitespace at beginning of line While parsing file "$sourcepath/src/amount.h", line 771: Error: Unexpected whitespace at beginning of line end test diff --git a/test/regress/8EAF77C0.test b/test/regress/8EAF77C0.test index fd16d642..fd73197e 100644 --- a/test/regress/8EAF77C0.test +++ b/test/regress/8EAF77C0.test @@ -10,12 +10,8 @@ Asset:Bank:Boi:Savings:Dk -3016.24 Income:NetSalary:Dk -test reg -> 3 +test reg -> 1 __ERROR__ While parsing file "$sourcepath/test/regress/8EAF77C0.test", line 5: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/test/regress/8EAF77C0.test", line 6: -Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/test/regress/8EAF77C0.test", line 7: -Error: Unexpected whitespace at beginning of line end test diff --git a/test/regress/AEDE9734.test b/test/regress/AEDE9734.test new file mode 100644 index 00000000..cd2245b8 --- /dev/null +++ b/test/regress/AEDE9734.test @@ -0,0 +1,12 @@ +2011-02-23 Rocket Fuel + Expense:Travel $100000000.00 ; trip: Moon + Asset:NASA + +2011-02-23 Liquid Oxygen + Expense:Travel $232233223.00 ; trip: Moon + Asset:NASA + +test bal --group-by "tag('trip')" +Moon + $332233223.00 Expense:Travel +end test diff --git a/test/regress/D51BFF74.test b/test/regress/D51BFF74.test new file mode 100644 index 00000000..dc472215 --- /dev/null +++ b/test/regress/D51BFF74.test @@ -0,0 +1,24 @@ +2012-03-16 KFC + Expenses:Food $-20 + Assets:Cash + +2012-03-16 KFC + Expenses:Food $- 20 + Assets:Cash + +2012-03-16 KFC + Expenses:Food -$20 + Assets:Cash + +2012-03-16 KFC + Expenses:Food - $20 + Assets:Cash + +test reg -> 1 +__ERROR__ +While parsing file "$sourcepath/test/regress/D51BFF74.test", line 6: +While parsing posting: + Expenses:Food $- 20 + ^^^^^ +Error: No quantity specified for amount +end test -- cgit v1.2.3 From 430ad07db1e46c27d69cdb0fca6c9e98a503079c Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 17 Mar 2012 07:02:31 -0500 Subject: Simplified a regression test --- test/regress/25A099C9.test | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'test/regress/25A099C9.test') diff --git a/test/regress/25A099C9.test b/test/regress/25A099C9.test index df4fef1c..a8a93832 100644 --- a/test/regress/25A099C9.test +++ b/test/regress/25A099C9.test @@ -1,43 +1,43 @@ -test -f $sourcepath/src/amount.h reg -> 20 +test -f src/amount.h reg -> 20 __ERROR__ -While parsing file "$sourcepath/src/amount.h", line 2: +While parsing file "src/amount.h", line 2: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 33: +While parsing file "src/amount.h", line 33: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 37: +While parsing file "src/amount.h", line 37: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 66: +While parsing file "src/amount.h", line 66: Error: No quantity specified for amount -While parsing file "$sourcepath/src/amount.h", line 69: +While parsing file "src/amount.h", line 69: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 83: +While parsing file "src/amount.h", line 83: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 93: +While parsing file "src/amount.h", line 93: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 99: +While parsing file "src/amount.h", line 99: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 121: +While parsing file "src/amount.h", line 121: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 132: +While parsing file "src/amount.h", line 132: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 693: +While parsing file "src/amount.h", line 693: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 723: +While parsing file "src/amount.h", line 723: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 731: +While parsing file "src/amount.h", line 731: Error: Unexpected whitespace at beginning of line -While parsing file "$sourcepath/src/amount.h", line 734: +While parsing file "src/amount.h", line 734: Error: Invalid date/time: line amount_t amoun -While parsing file "$sourcepath/src/amount.h", line 740: +While parsing file "src/amount.h", line 740: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 746: +While parsing file "src/amount.h", line 746: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 752: +While parsing file "src/amount.h", line 752: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 758: +While parsing file "src/amount.h", line 758: Error: Invalid date/time: line std::ostream& -While parsing file "$sourcepath/src/amount.h", line 765: +While parsing file "src/amount.h", line 765: Error: Invalid date/time: line std::istream& -While parsing file "$sourcepath/src/amount.h", line 771: +While parsing file "src/amount.h", line 771: Error: Unexpected whitespace at beginning of line end test -- cgit v1.2.3 From 8e8c2904f55eb9a43b3eb8057e9f11767a624dff Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 30 Mar 2012 00:38:29 -0500 Subject: Never price commodities using annotated commodities --- src/amount.cc | 6 +++--- src/amount.h | 9 +++++++++ src/annotate.cc | 2 +- src/commodity.cc | 17 ++++++++--------- src/commodity.h | 3 +++ test/regress/25A099C9.test | 20 ++++++++++---------- 6 files changed, 34 insertions(+), 23 deletions(-) (limited to 'test/regress/25A099C9.test') diff --git a/src/amount.cc b/src/amount.cc index 2f7b434e..50496f2d 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -757,10 +757,10 @@ amount_t::value(const datetime_t& moment, } } - if (! point) { - if (comm && commodity().referent() == comm->referent()) - return *this; + if (comm && commodity().referent() == comm->referent()) + return with_commodity(comm->referent()); + if (! point) { point = commodity().find_price(comm, moment); // Whether a price was found or not, check whether we should attempt diff --git a/src/amount.h b/src/amount.h index 10e83552..cd77a79a 100644 --- a/src/amount.h +++ b/src/amount.h @@ -544,6 +544,15 @@ public: *this = 0L; commodity_ = &comm; } + amount_t with_commodity(const commodity_t& comm) const { + if (commodity_ == &comm) { + return *this; + } else { + amount_t tmp(*this); + tmp.set_commodity(const_cast(comm)); + return tmp; + } + } void clear_commodity() { commodity_ = NULL; } diff --git a/src/annotate.cc b/src/annotate.cc index c9fd6d3f..41e7a752 100644 --- a/src/annotate.cc +++ b/src/annotate.cc @@ -288,7 +288,7 @@ annotated_commodity_t::find_price(const commodity_t * commodity, return find_price_from_expr(const_cast(*details.value_expr), commodity, when); - return commodity_t::find_price(target, moment, oldest); + return commodity_t::find_price(target, when, oldest); } commodity_t& diff --git a/src/commodity.cc b/src/commodity.cc index bc04c3db..a72d85c8 100644 --- a/src/commodity.cc +++ b/src/commodity.cc @@ -56,14 +56,14 @@ void commodity_t::add_price(const datetime_t& date, const amount_t& price, DEBUG("history.find", "Adding price: " << symbol() << " for " << price << " on " << date); - pool().commodity_price_history.add_price(*this, date, price); + pool().commodity_price_history.add_price(referent(), date, price); base->price_map.clear(); // a price was added, invalid the map } void commodity_t::remove_price(const datetime_t& date, commodity_t& commodity) { - pool().commodity_price_history.remove_price(*this, commodity, date); + pool().commodity_price_history.remove_price(referent(), commodity, date); DEBUG("history.find", "Removing price: " << symbol() << " on " << date); @@ -83,7 +83,7 @@ void commodity_t::map_prices(function fn, else when = CURRENT_TIME(); - pool().commodity_price_history.map_prices(fn, *this, when, _oldest, + pool().commodity_price_history.map_prices(fn, referent(), when, _oldest, bidirectionally); } @@ -159,9 +159,9 @@ commodity_t::find_price(const commodity_t * commodity, optional point(target ? - pool().commodity_price_history.find_price(*this, *target, + pool().commodity_price_history.find_price(referent(), *target, when, oldest) : - pool().commodity_price_history.find_price(*this, when, oldest)); + pool().commodity_price_history.find_price(referent(), when, oldest)); // Record this price point in the memoization map if (base->price_map.size() > base_t::max_price_map_size) { @@ -206,7 +206,7 @@ commodity_t::check_for_updated_price(const optional& point, DEBUG("commodity.download", "attempting to download a more current quote..."); if (optional quote = - pool().get_commodity_quote(*this, in_terms_of)) { + pool().get_commodity_quote(referent(), in_terms_of)) { if (! in_terms_of || (quote->price.has_commodity() && quote->price.commodity_ptr() == in_terms_of)) @@ -220,12 +220,11 @@ commodity_t::check_for_updated_price(const optional& point, commodity_t& commodity_t::nail_down(const expr_t& expr) { annotation_t new_details; + new_details.value_expr = expr; new_details.add_flags(ANNOTATION_VALUE_EXPR_CALCULATED); - commodity_t * new_comm = - commodity_pool_t::current_pool->find_or_create(symbol(), new_details); - return *new_comm; + return *pool().find_or_create(symbol(), new_details); } commodity_t::operator bool() const diff --git a/src/commodity.h b/src/commodity.h index d6885ee9..bfbabe6b 100644 --- a/src/commodity.h +++ b/src/commodity.h @@ -188,6 +188,9 @@ public: return comm == *this; return base.get() == comm.base.get(); } + bool operator==(const string& name) const { + return base_symbol() == name; + } static bool symbol_needs_quotes(const string& symbol); diff --git a/test/regress/25A099C9.test b/test/regress/25A099C9.test index a8a93832..1ef5ebef 100644 --- a/test/regress/25A099C9.test +++ b/test/regress/25A099C9.test @@ -20,24 +20,24 @@ While parsing file "src/amount.h", line 121: Error: Unexpected whitespace at beginning of line While parsing file "src/amount.h", line 132: Error: Unexpected whitespace at beginning of line -While parsing file "src/amount.h", line 693: +While parsing file "src/amount.h", line 702: Error: Unexpected whitespace at beginning of line -While parsing file "src/amount.h", line 723: +While parsing file "src/amount.h", line 732: Error: Unexpected whitespace at beginning of line -While parsing file "src/amount.h", line 731: +While parsing file "src/amount.h", line 740: Error: Unexpected whitespace at beginning of line -While parsing file "src/amount.h", line 734: +While parsing file "src/amount.h", line 743: Error: Invalid date/time: line amount_t amoun -While parsing file "src/amount.h", line 740: +While parsing file "src/amount.h", line 749: Error: Invalid date/time: line string amount_ -While parsing file "src/amount.h", line 746: +While parsing file "src/amount.h", line 755: Error: Invalid date/time: line string amount_ -While parsing file "src/amount.h", line 752: +While parsing file "src/amount.h", line 761: Error: Invalid date/time: line string amount_ -While parsing file "src/amount.h", line 758: +While parsing file "src/amount.h", line 767: Error: Invalid date/time: line std::ostream& -While parsing file "src/amount.h", line 765: +While parsing file "src/amount.h", line 774: Error: Invalid date/time: line std::istream& -While parsing file "src/amount.h", line 771: +While parsing file "src/amount.h", line 780: Error: Unexpected whitespace at beginning of line end test -- cgit v1.2.3