person_struct_parser 1.2.0

Rust parser for person struct
Documentation
1
2
3
4
5
6
7
8
9
10
11
low_alpha = {'a'..'z'}
high_alpha = {'A'..'Z'}
digit = {'0'..'9'}

name = {high_alpha ~ low_alpha+}
age = {digit{1,4}}
city = {high_alpha ~ ((low_alpha+) | (low_alpha+ ~ ('-' | ' ')* ~ low_alpha+))}
city = {high_alpha ~ (low_alpha | '-' | ' ')* ~ low_alpha}
zip = {digit{5}}

person = {name ~ ' ' ~ age ~ ' ' ~ city ~ zip}