24 lines
891 B
Plaintext
24 lines
891 B
Plaintext
|
alpha = { ASCII_ALPHA }
|
||
|
digit = { ASCII_DIGIT }
|
||
|
alpha_num = { ASCII_ALPHANUMERIC }
|
||
|
any = { ASCII }
|
||
|
nl = { NEWLINE }
|
||
|
space = { " " }
|
||
|
indent = { space{2} }
|
||
|
year = { digit{2, 4} ~ "/" }
|
||
|
month = { digit{1, 2} ~ "/" }
|
||
|
day = { digit{1, 2} }
|
||
|
date = { year ~ month ~ day }
|
||
|
word = { alpha+ }
|
||
|
title = { word+ }
|
||
|
transaction_head = { date ~ space+ ~ title }
|
||
|
currency = { "EUR" }
|
||
|
money = { "-"? ~ eur ~ "." ~ cents ~ " " ~ currency }
|
||
|
eur = { digit+ }
|
||
|
cents = { digit{2} }
|
||
|
account = { word ~ ":" }
|
||
|
term_account = { word }
|
||
|
transaction_line = { indent ~ account* ~ term_account ~ indent+ ~ money }
|
||
|
transaction = { transaction_head ~ nl ~ (transaction_line ~ nl)+ }
|
||
|
comment = { ";" ~ any }
|