John Wiegley
094c64b67c
amount_t and commodity_t objects can now stream themselves to XML.
2009-01-28 20:49:44 -04:00
John Wiegley
b205090bb7
Changed around the ==, < and > operators in value.h to be correct.
2009-01-28 17:17:06 -04:00
John Wiegley
71e7157a65
Added is_nonzero and a stream-based read() method to value_t.
2009-01-26 20:50:54 -04:00
John Wiegley
79a7976600
Reorganized Ledger so that it builds as 7 separate libraries. This is mainly
...
to prove to myself that it has proper decoupling between prior code areas.
2009-01-25 01:10:05 -04:00
John Wiegley
05b3562a13
Changed order of some functions, to guard against self-referencing.
2009-01-24 04:50:39 -04:00
John Wiegley
cbc41ca47a
Moved sha1 and gdtoa inclusions into system.hh.
2009-01-24 04:50:18 -04:00
John Wiegley
a69649fb7f
Switched over to using irrxml for parsing XML, rather than expat.
2009-01-24 04:49:58 -04:00
John Wiegley
c49f05a15a
Guard debug code in commodity.cc, so it will build optimized.
2009-01-23 19:50:35 -04:00
John Wiegley
900a92e115
Added support for Unicode text in Ledger files, thanks to 'utfcpp', which can
...
be located at http://utfcpp.sourceforge.net .
2009-01-23 19:50:00 -04:00
John Wiegley
8e50706d1e
Include gdtoa.h if it's being used.
2009-01-23 17:55:23 -04:00
John Wiegley
59a71e7d74
Changed grammatical tense in two tracing statements.
2009-01-23 15:45:17 -04:00
John Wiegley
7ee583a448
Correctly handle "bare parentheses" in the command regexps.
2009-01-23 03:26:47 -04:00
John Wiegley
617dd0c261
When Python support is present, use a session_t object which is derived from
...
python_interpreter_t, so that Python can provide value expression definitions.
2009-01-23 01:53:19 -04:00
John Wiegley
8d4542d199
Added more debug code.
2009-01-23 01:09:40 -04:00
John Wiegley
00fdadedcc
Removed extraneous parentheses.
2009-01-23 01:09:31 -04:00
John Wiegley
5ba81765ea
Added some debug code.
2009-01-23 01:09:23 -04:00
John Wiegley
8156e34136
ptr_op_t::copy(), in the TERMINALS case, wasn't copying enough.
2009-01-23 01:09:14 -04:00
John Wiegley
cf861b35c0
Added a pair of missing calls to in.peek().
2009-01-23 01:08:52 -04:00
John Wiegley
52524ff2fb
Removed some extraneous code.
2009-01-22 21:17:32 -04:00
John Wiegley
c2761f4e90
Moved the occurance of "Error:" when reporting context.
2009-01-22 21:17:16 -04:00
John Wiegley
6fbf5c551e
Made the output from parse/compile commands more consistent.
2009-01-22 21:16:57 -04:00
John Wiegley
812d38c176
Correctly report the line context when there is a valexpr parsing error.
2009-01-22 21:16:43 -04:00
John Wiegley
d9e97cfede
When parsing commodities, if there is no symbol or annotations, reset the
...
stream pointer in order to give more accurate error reporting.
2009-01-22 21:15:05 -04:00
John Wiegley
7b76ea5cbc
Errors while calculating value expressions now display meaningful error
...
context.
2009-01-22 18:54:24 -04:00
John Wiegley
9c164bd3dc
Allow function calls without arguments in the parser.
2009-01-22 18:53:59 -04:00
John Wiegley
e95e8c3f79
Corrected a parse-time optimization of "! CONSTANT".
2009-01-22 18:53:44 -04:00
John Wiegley
965df4a404
Whitespace changes.
2009-01-22 18:53:08 -04:00
John Wiegley
0859b626a1
Added output insertion operator for mask_t objects.
2009-01-22 18:51:49 -04:00
John Wiegley
2332896810
Changed some debug strings when parsing/compiling valexprs.
2009-01-22 18:51:33 -04:00
John Wiegley
ba18354947
Whitespace changes.
2009-01-22 17:03:26 -04:00
John Wiegley
fac5a95a48
Accept &&/and for &, ||/or for |, and not for !. Also improved error
...
reporting in the tokenizer.
2009-01-22 17:01:46 -04:00
John Wiegley
0b9f22b4d2
Redid the way command-line arguments are processed. Before, Ledger used - and
...
-- to mean special things after the command verb was seen. But now, what used
to be specified as this:
ledger -n reg cash -payable -- shell
Is now specified as this:
ledger reg -n cash not payable @shell
It could also be specified as:
ledger -n reg \(cash and not payable\) and @shell
2009-01-22 16:27:24 -04:00
John Wiegley
ccedf7d57f
Parse != as !(==) and !~ as !(=~), for simplicity's sake.
2009-01-22 16:25:51 -04:00
John Wiegley
4e64364d3a
Removed an extra call to session.read_init().
2009-01-22 16:15:12 -04:00
John Wiegley
eb04b8be85
Changed the order in which options are processed, to provide for the correct
...
overrides.
1. Global defaults
2. Environment variable settings
3. Initialization file
4. Command-line arguments
Whatever is later in the list overrides what is earlier.
2009-01-21 18:54:06 -04:00
John Wiegley
e4c7b1753b
Resolve outstanding stdin parsing issues by buffering the data.
2009-01-21 18:30:37 -04:00
John Wiegley
2858a9999a
Added missing zeroes in the sha1 to text generation.
2009-01-20 20:13:05 -04:00
John Wiegley
3bf354946f
xact_t pointer list when copy constructing an entry, which leads to crashes
...
during deconstruction (due to double-free'ing transactions).
2009-01-20 20:06:21 -04:00
John Wiegley
3682ea6f8c
Added support for "anonymizing" any report with --anon.
2009-01-20 20:05:41 -04:00
John Wiegley
887828a40c
Increased copyright range to include 2009.
2009-01-20 01:53:31 -04:00
John Wiegley
906d8004ae
Added a function for account_t to get the account's total cost.
2009-01-19 22:31:04 -04:00
John Wiegley
c6303ab9ef
Fixed the market valuation function for balances.
2009-01-19 22:30:46 -04:00
John Wiegley
7cc64c04a5
Don't calculate a reflexive price if a commodity has been marked as NOMARKET.
2009-01-19 22:30:34 -04:00
John Wiegley
ad9a469a2a
Got changed_value_xacts working again.
2009-01-19 22:30:11 -04:00
John Wiegley
ce49245667
Make report_t a friend of format_t, so it can set the ANSI options.
2009-01-19 22:29:55 -04:00
John Wiegley
72c09cc0bf
Generate a better error if a function operand is invalid.
2009-01-19 22:29:36 -04:00
John Wiegley
efc923acb4
Allow var_t<datetime_t>.
2009-01-19 22:29:17 -04:00
John Wiegley
bcfd6d1db9
When setting a scope's argument, convert the list to a sequence if it's not
...
already.
2009-01-19 22:29:09 -04:00
John Wiegley
7ffe0e1539
Added back several cost reporting options.
2009-01-19 22:28:34 -04:00
John Wiegley
5e25a6d838
Pass in the total_expr directly to changed_value_xacts.
2009-01-19 22:28:17 -04:00