Perhaps this should be a part of protoparser?