Parsing SVG paths

TL;DR

Reinventing wheels: parsing the d attribute of paths in SVG.

I know, I know.

There is Image::SVG::Path on CPAN that does exactly this. But how hard can it be?!?.

Well… a bit, indeed. But now it’s (mostly) in the past, so we can enjoy an intermediate-though-working byproduct, parsth:

I try to follow the grammar as much as possible, taking shortcuts here and there. The last part should remind of what described in Parsing toolkit in cglib.

We are converging…


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