The general-purpose parser scans the document looking for one of the start boundary strings. When it finds a start boundary string, it parses the subsequent field until it finds the corresponding end boundary string.
The content of the field is then indexed according to the definition term, that is, as a text field or document attribute. If the text field and document attribute have the same start and end boundary strings, the content of the field is indexed as both a text field and a document attribute.
No nesting of fields is allowed; if a new start boundary string is found in a field before the end boundary string has been reached, the new start boundary string is interpreted as normal text.
If no corresponding end boundary string is found, the field is assumed to extend to the end of the document, and an appropriate reason code is reported.
If no end boundary string is specified in the document model, the new start boundary string signals the end of the previous field.