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