Examples of both are at [0] (C++ based parser, you'd also need to write some bindings for lua) and [1] (Lua based parser for a subset of the format, abandoned for almost a decade).
There are times when using an external dependency might be a good idea, but a text-based file format that describes lines and can be implemented in a few lines of code is not one.
Do you know if there is some formal way to 'declare' such a subset (something to do with XML/namespaces maybe?), or if there's any existing standard "simple SVG" format that someone has already defined? Obviously I could just informally stick to a subset by avoiding whatever features I don't want to use, but I think it would be useful to have a formally defined subset, and to be able to scan an SVG to detect if it's within the subset or not.
https://en.wikipedia.org/wiki/Brand_Indicators_for_Message_I...