Parsing toolkit in cglib

TL;DR

The parsing functions from A parser for Ordeal::Model went into cglib, my library for CodinGame.

This pretty much says it all - the code is available at Parser.pm, while the documentation can be found at Parser.pod.

The function formerly known as __starer has been evolved into pf_repeated, which now accepts also a maximum number of matches. This allows implementing * (the default), + (already available by setting the minimum number of matches to 1) as well as ? (set minimum to 0 and maximum to 1) and the more generic {min, max} (just pass the values).

As always, the implementation strives for compactness and is not really meant for long-term maintenable code. But it should come handy in low to low-medium projects with some parsing needs.


Comments? Octodon, , GitHub, Reddit, or drop me a line!