An object that matches Gen2 file names and extracts Gen2 data IDs.
Parameters
----------
target : `str`
Either a full Gen2 path template or the part of one the corresponds to
a single path element (a subdirectory or file name).
allKeys : `dict` [`str`, `type`]
A dictionary that provides types for all Gen2 data ID keys that are
substituted into the given template. Additional key-value pairs may
be present and will be ignored.
previousKeys : `dict` [`str`, `type`], optional
A dictionary containing key strings and types for Gen2 data ID keys
that have been extracted from previous path elements of the same
template. Values for these keys must be provided via the
``lastDataId`` argument when calling `parse`.
Definition at line 116 of file parser.py.