parser for typed primitive resource files