Manual:Getting Started:First Example
まんま
>>> from lepl import * >>> name = Word() > 'name' >>> phone = Integer() > 'phone' >>> matcher = name / ',' / phone > make_dict >>> parser = matcher.string_parser() >>> parser('andrew, 3333253') [{'phone': '3333253', 'name': 'andrew'}]