Commit graph

67 commits

Author SHA1 Message Date
John Wiegley
f1795e628b Fixed bugs relating to sign and rounding of costs 2009-02-27 03:45:32 -04:00
John Wiegley
a8e2a674a8 Fixes to entry note parsing 2009-02-27 02:41:50 -04:00
John Wiegley
06365aac05 Fixed the way item state is parsed and managed 2009-02-27 02:35:51 -04:00
John Wiegley
8216db1f15 Added support for tag/pop parsing directives
There are now "tag/pop" directives, to apply metadata to a range of
transactions (and their postings).  For example, if you wanted a
conceptual "page" of transactions relating to business trip to Chicago,
you could do this:

    tag Location: Chicago
    tag Purpose: Business

    ... transactions go here

    pop
    pop

It would be as if you'd applied "; Location: Chicago", etc., to every
transaction.
2009-02-26 05:49:26 -04:00
John Wiegley
47ff0b9fed Fixes to the way textual directives were parsed 2009-02-26 05:46:59 -04:00
John Wiegley
b302c340b6 Enriched the context report during textual parsing 2009-02-26 05:42:59 -04:00
John Wiegley
badea00584 Added a warning_() macro 2009-02-26 05:30:48 -04:00
John Wiegley
238bd7f8a5 Marked all strings needing internationalization
These strings are now collected automagically in the file po/ledger.pot.
If you'd like to produce a translation, just run this command after
building Ledger:

    msginit -l LOCALE -o LANG.po -i po/ledger.pot

Where LOCALE is a string like de or en_GB, and LANG is a short
descriptive word for your language.

Then send me this .po file so I can commit it to the Ledger sources
(alternatively, you could maintain the file in a fork on GitHub), and
setup the build script to format and install your new message catalog
during a "make install".
2009-02-25 03:51:42 -04:00
John Wiegley
38dd1b8655 Fixed an issue involving costs and reduced values 2009-02-24 13:29:08 -04:00
John Wiegley
267b2ba5d8 Made commodity reduction during parsing consistent 2009-02-24 02:40:28 -04:00
John Wiegley
2422838005 Restored the price conversion text directive (C) 2009-02-24 02:34:48 -04:00
John Wiegley
944c63e6f2 The Great Renaming, Part II
The last commit did not contain the majority of changes because of a
slight mishap.  This contains the real changeset.
2009-02-23 19:07:30 -04:00
John Wiegley
49d79045a5 Removed unused member keep_details_t::keep_base 2009-02-23 15:15:33 -04:00
John Wiegley
de6de07bac Many fixes to --market and --exchange
Also, --exchange now accepted multiple, comma-separated commodities.
2009-02-22 22:23:02 -04:00
John Wiegley
a93111470d Greatly improved the way "weeks" are iterated 2009-02-21 02:10:02 -04:00
John Wiegley
f2f52066d2 Added a --strict session option
When enabled, if any accounts or commodities are seen in an uncleared
transaction, which were not seen previously in a cleared or pending
transaction or a textual directive dealing with accounts or commodities,
a warning is generated about the unknown item.
2009-02-19 22:36:08 -04:00
John Wiegley
3826cb1bee Re-enabled parsing of timelog data 2009-02-19 15:50:24 -04:00
John Wiegley
d0a664d102 Fixed several unused value and param warnings 2009-02-16 16:55:18 -04:00
John Wiegley
1aff6ec01d Abort journal parsing if Control-C is caught 2009-02-16 04:16:20 -04:00
John Wiegley
78e57ac4cf item_predicate now operates on scope_t
This means item_predicate is no longer a template.
2009-02-15 20:56:48 -04:00
John Wiegley
e0e181d2af Made (un)reduce rvalue methods more consistent
They names were changed from reduce/unreduce to reduced/unreduced, since
they return the modified value.  This is more consistent with the naming
of rounded/rounded.
2009-02-12 20:44:46 -04:00
John Wiegley
f8c48d7a6f Ignore lines in Ledger files which contain only whitespace. 2009-02-12 02:35:05 -04:00
John Wiegley
6d4c3ffde5 If a textual directive can't be found, ignore it. 2009-02-10 04:23:50 -04:00
John Wiegley
3c3606aa0d Break libledger_data's dependency on session_t. 2009-02-09 18:46:01 -04:00
John Wiegley
3f7104e9be Removed the balance_pair_t type, since it's now an unneeded abstraction.
This type was a holdback from the days before the amount_expr was used
everywhere to determine a transaction's value.
2009-02-09 14:54:42 -04:00
John Wiegley
ffba456113 Several fixes to get the state flags to appear right in "print". 2009-02-07 23:30:40 -04:00
John Wiegley
589eabd8e6 Threw away the "multiple parser" infrastructure. 2009-02-07 17:45:48 -04:00
John Wiegley
eb98e0da8b More revision to the way options are handled; reworked CSV command. 2009-02-07 04:26:30 -04:00
John Wiegley
408b819c6e Greatly simplified the way option and command handlers are defined. 2009-02-05 21:20:09 -04:00
John Wiegley
0e2a3a9c00 Moved much of the main.cc code into a new global_scope_t class. 2009-02-05 04:06:58 -04:00
John Wiegley
2d941730b1 Largely removed all of Ledger's use of global variables, for the REPL's sake. 2009-02-04 19:55:27 -04:00
John Wiegley
b9603a1512 Moved ptristream into its own file. 2009-02-04 03:54:29 -04:00
John Wiegley
1cc33531ea Simplified the textual parser, and improved metadata support. 2009-02-04 03:34:37 -04:00
John Wiegley
28da097fc2 Several improvement to transaction parsing. 2009-02-04 00:52:52 -04:00
John Wiegley
2e9c14ef30 Don't store the amount expression object in transactions.
This is unnecessary since binary caching is no longer being used.
2009-02-03 19:06:56 -04:00
John Wiegley
2ce7ae376c Removed used of src_idx. 2009-02-03 19:06:53 -04:00
John Wiegley
8948e161cd A little code rearranging. 2009-02-03 18:31:52 -04:00
John Wiegley
6bd82c6bcd Implemented a text parsing optimization.
Amounts, costs and assigned amounts are now parsed as regular amounts.  To
have a full value expression at any of those positions, surround it with
parentheses.  The reason for this is that the amount parser is far simpler and
quicker -- and by far the common case -- compared to the full expression
parser.
2009-02-03 17:47:02 -04:00
John Wiegley
ad34a71646 Corrected a display error when showing error context. 2009-02-03 00:45:14 -04:00
John Wiegley
cf9b4a3873 Removed report_error() function and reordered context for parsing errors. 2009-02-02 15:16:18 -04:00
John Wiegley
9540406af1 Simplified error context handling. 2009-02-02 00:24:26 -04:00
John Wiegley
fb5428ce85 Added support for metadata and tagging, and made regexs a first-class type. 2009-02-01 22:10:32 -04:00
John Wiegley
59a080cdb6 Changed many uses of "unsigned long" to std::size_t. 2009-02-01 18:33:46 -04:00
John Wiegley
6983e6a38a Fixed error context output. 2009-01-31 01:21:30 -04:00
John Wiegley
6213dc5af8 Whitespace fix. 2009-01-30 19:28:53 -04:00
John Wiegley
54e24a4aa2 Fixed some tracing labels. 2009-01-30 00:40:59 -04:00
John Wiegley
c96635fe60 Refactored the textual parser, to allow easy extensions in Python. 2009-01-29 19:11:36 -04:00
John Wiegley
8b75b5cbfb Revised the way that parsing flags get passed around. 2009-01-29 02:24:25 -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
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