@Override
	public OmfRecord readNextRecord() throws IOException, OmfException {
		int type = Byte.toUnsignedInt(reader.peekNextByte());
		OmfRecord record = switch (type) {
			case ModuleHDR:
				yield new Omf51ModuleHeader(reader);
			case ModuleEND:
				yield new Omf51ModuleEnd(reader);
			case Omf166RecordTypes.DEPLST:
				yield new Omf166DepList(reader);
			case Content:
				yield new Omf51Content(reader, false);
			case KeilContent:
				yield new Omf51Content(reader, true);
			case SegmentDEF:
				yield new Omf51SegmentDefs(reader, false);
			case KeilSegmentDEF:
				yield new Omf51SegmentDefs(reader, true);
			case Fixup:
				yield new Omf51FixupRecord(reader, false);
			case KeilFixup:
				yield new Omf51FixupRecord(reader, true);
			case PublicDEF:
				yield new Omf51PublicDefsRecord(reader, false);
			case KeilPublicDEF:
				yield new Omf51PublicDefsRecord(reader, true);
			case ExternalDEF:
				yield new Omf51ExternalDefsRecord(reader, false);
			case KeilExternalDEF:
				yield new Omf51ExternalDefsRecord(reader, true);
			case LibModLocs:
				yield new Omf51LibraryModuleLocationsRecord(reader);
			case LibModNames:
				yield new Omf51LibraryModuleNamesRecord(reader);
			case LibDictionary:
				yield new Omf51LibraryDictionaryRecord(reader);
			case LibHeader:
				yield new Omf51LibraryHeaderRecord(reader);
			case ScopeDEF:
			case DebugItem:
				yield new OmfUnsupportedRecord(reader, Omf51RecordTypes.class);
			default:
				yield new OmfUnknownRecord(reader);
		};

		record.parseData();
		return record;
	}
Creates a new {@link Omf51RecordFactory}

@param provider The {@link ByteProvider} that contains the records
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/omf/omf51/Omf51RecordFactory.java