Commit graph

22 commits

Author SHA1 Message Date
John Wiegley
f6f4a46cf5 Moved around most of the files so that source code is in src/, documentation
is in doc/, etc.
2008-08-05 18:05:49 -04:00
John Wiegley
bbdab79302 Rearranged the code a bit, breaking walk.cc into several different files:
compare         compare_items<T>
  handler         item_handler<T>
  iterators       used to iterators sets of journal objects
  filters         derived from item_handler, they morph the result set
  output          derived from item_handler, these do the printing

Also, created a new 'help' files which contains just Ledger's help text.
2008-08-03 21:38:53 -04:00
John Wiegley
363fb6d558 Got date, payee and accounts back into the register report. 2008-08-03 00:22:55 -04:00
John Wiegley
9a9e06554e Formatting now relies exclusively on value expressions.
What this means is that the utility code, basic math, value expressions,
string formatting and option handling are now entirely decoupled from the rest
of the code.  This decoupling not only greatly simplifies the more basic parts
of Ledger, but makes it much easier to test and verify its completeness.

For example, when the formatting code %X is seen by the format parser, it
turns into a call to the expression function fmt_X, which must be defined when
the format string is first compiled against an object.  If that object is a
transaction, the transaction's scope will be the first to have a chance at
providing a definition.  If an account is being reported, it will.  If neither
does, the next scope in sequence -- soon to be the current report -- will, and
then the session object that "owns" the current Ledger session.

In 2.6, the formatting code new everything about transaction and accounts, and
relied on flags to communicate special details between them.  Now the
transaction will offer the details for its own reporting, while the formatter
worries only about strings and how to output them.
2008-08-02 06:42:36 -04:00
John Wiegley
ea3b386062 Added a new 'format' debugging command, which dissects the formatting
expression in its argument.
2008-08-01 03:44:22 -04:00
John Wiegley
e5048ec71b Change many uses of for+iterator to use Boost.Foreach. 2008-07-31 17:48:29 -04:00
John Wiegley
99313ebc6c Revised the way that exceptions are thrown around. Instead of context being a
complicated string of pointers, it's now just a global block of text that gets
appended to as the error is being thrown up, and can be displayed at the catch
point if desired.  There are almost no cases where a thrown exception will not
result in an error message being displayed to the user.
2008-07-31 06:24:45 -04:00
John Wiegley
8276b51f56 A new binary_cache_t object has been creating to manage saving and restoring a
Ledger session from a cache file.  It doesn't work at all yet, though at least
the major structures are in place now.
2008-07-31 04:28:58 -04:00
John Wiegley
ea27d1b45a Moved around and renamed a very large amount of code in order to rationalize
the way that value expressions extract information from journal objects.
2008-07-29 20:10:03 -04:00
John Wiegley
200d919fe7 Changed the way scopes are structured for an upcoming design change. 2008-07-29 18:57:02 -04:00
John Wiegley
4518ea9540 Value expression architecture is now rewritten, but the functionality of the
old system (for example, the meaning of 'a') has yet to be restored.  In the
new scheme, this will be done by definition a function outside of the value
expression logic, rather than the tight coupling between journal innards and
value expressions that occurred in 2.x.
2008-07-29 05:59:38 -04:00
John Wiegley
e14d7b6e54 Cleaned up the value expression code a bit before undertaking the real work of
getting everything back up to what it was (plus the new code written for 3.0).
2008-07-27 20:37:21 -04:00
John Wiegley
0c76ac5b8f Merge branch 'master' into v2.7a 2008-07-27 19:50:25 -04:00
John Wiegley
ebfe2d1011 Updated all copyright messages to 2003-2008. 2008-07-27 02:26:35 -04:00
John Wiegley
713f896790 A large body of work to get the register report printing again, but still
fails due to the fact that 2.x value expression syntax is not restored.
2008-07-27 00:10:35 -04:00
John Wiegley
162d982b0c The --verify option is now working properly again. Use "--verify --verbose"
if you wish to see memory usage statistics along with a top-level trace.
2008-07-26 05:06:06 -04:00
John Wiegley
961b30926b --verify works again, but the memory totals at the end still need work. 2008-07-26 04:08:55 -04:00
John Wiegley
4bc29e1351 A great deal of reorganization to restore the old parsing code (since the
newer XML stuff was pulled).
2008-07-22 02:23:45 -04:00
John Wiegley
8601a2a8bf Added back the --version option, and changed acprep so that it hacks on the
generated Makefile to greatly reduce unneeded verbosity.
2008-07-21 19:03:26 -04:00
John Wiegley
d86a91d45b The new XPath parser has been integrated, although I have removed the
XML-related bits -- I just wanted the better infrastructure that had been
created during the rewrite.  It doesn't work, but it compiles and links now.
This means that all of the previous 3.0 code has been moved over, although
there are still snippets of code in pending/old that need to be restored.
2008-07-20 23:12:04 -04:00
John Wiegley
20e35aa6f5 I have walked further along the road less compiled by... 2008-07-20 05:32:09 -04:00
John Wiegley
52fc9f2e44 Brought in the final round of 3.0 code, although it does not compile yet:
report, session, parts of xpath, main, journal, option.
2008-07-20 05:03:54 -04:00