Standard GCODE parsing function?

I've got a plugin I've written, which I've been considering cleaning up to release, which hooks octoprint.comm.protocol.gcode.queuing to rewrite GCODE (specifically to scale back fan speeds as set by the slicer, since I have a printer with a part cooling fan which is a little TOO good at what it does). It currently just splits along whitespace and looks for what it needs to modify, but I'd rather not reinvent the wheel if there's already a standard def/class within core OctoPrint to parse GCODE lines. Thanks.