Thank you for the confirmation. I've never worked with flex, but I was wondering what it is that prevents adding a single-character token as an option?
E.g., in lexer.l adding one additional [A-Z] token?
198 [A-Z] {
199 return TOKEN(CURRENCY, yytext, yyleng);
200 }
201 [A-Z][A-Z0-9\'\.\_\-]*[A-Z0-9] {
202 return TOKEN(CURRENCY, yytext, yyleng);
203 }
204 \/[A-Z0-9\'\.\_\-]*[A-Z]([A-Z0-9\'\.\_\-]*[A-Z0-9])? {
205 return TOKEN(CURRENCY, yytext, yyleng);
206 }
In the spirit of blindly trying things I used the above change and it *seems* to parse OK.
(venv) $ cat ~/tmp/odd.beancount
2014-02-16 open Assets:US:ETrade:Cash
2014-02-16 open Assets:US:ETrade:V
2014-02-16 open Expenses:Financial:Commissions
2014-02-16 open Equity:OpeningBalances
2014-02-16 * "Opening Balance"
Assets:US:ETrade:Cash 10,000.00 USD
Equity:OpeningBalances
2014-02-16 * "Buying some V"
Assets:US:ETrade:V 10.00 V {231.59 USD} Assets:US:ETrade:Cash
(venv) $ bean-query ~/tmp/odd.beancount
Input file: "Beancount"
Ready with 6 directives (4 postings in 2 transactions).
beancount> balances
account sum_position
---------------------- --------------------------
Assets:US:ETrade:Cash 7684.10 USD
Assets:US:ETrade:V 10.00 V {231.59 USD}
Equity:OpeningBalances -10000.00 USD