An Introduction

Comments are moderated. It may take a few minutes before your comment appears.
Markdown is supported in your comments.

There will be a heavy use of lambda functions when building simple parsers. The .parse() method is the primary interface to the parsers themselves. Normally it will be called once on the largest and most complete parser.
digits chomps into the stream character by character, collecting that returns .isdigit()==True.
to_int is not a parser, but a simple function which converts a list of number-characters into a whole integer.
integer combines these two, creating a (marginally) useful parser.
to_dec is based heavily on to_int, but designed for numbers on the right side of the decimal point.
decimal takes a leading integer, decimal point and trailing decimal term. These are summed together to make a float.
numbers is almost a useful parser, capable of dealing with larger structures. But not that useful. Parsers should be able to at least handle malformed data.

Mail: (not shown)

Please type this: