robrix / Madness

Recursive Descent Into Madness
MIT License
291 stars 17 forks source link

Parse sets of intervals #30

Open robrix opened 9 years ago

robrix commented 9 years ago

A la NSCharacterSet or a character class. Single parser representing a set of intervals and producing individual strings. For example [a-zA-Z0-9_] might be:

%["a"..."z", "A"..."Z", "0"..."9", x]

where x is some reasonable way of representing "_" as an interval.

robrix commented 9 years ago

"_"..."_" would seem to suffice for that.