IMHO, this breaks down into two issues that could be handled separately: 1. The validity of input files as being formatted correctly
2. Internal consistency of account names, etc. #1 could be addressed with a "tidy" tool, that understands enough of the Ledger syntax to point out obvious typos and syntax errors in the input file. It could also do basic reformatting (fixing indenting, etc.). #2 could be done in a variety of ways. It could be something as simple as a tool that takes in two ledger files, one that is known good and one to be tested, and reports any new account names found in the second, or much more complex (to use an XML analogy, #1 would be "xmllint" whereas #2 would be a specific schema and verifier) I've been thinking about doing a #1, but before that it would be great if the ledger format was better defined - has anyone taken a shot at writing either EBNF or state diagrams (ala http://www.json.org/ ) that would define the ledger file syntax? Thoughts? - Zack
