The basic steps for developing a custom reader are as follows.
To develop a custom reader
Write the basic API functions:
From within the xxxFillBuffer() function, it is necessary to call other functions that repeatedly read a chunk of a source file, parse the chunk, and generate a token stream until the entire source file is processed.
TPReaderInterface structure.*.def), exporting the reader interface and format detection functions.Modify the formats.ini file to identify the custom reader and its associated format detection function. See xxxsrAutoDet(). For example, the following lines would be added to the [Formats] section of the formats.ini file for the UTF-8 reader:
456.1.0.0=utf8 [CustomFilters] 1=utf8sr
|
|