The following figures are to help you understand the concept of parsing.
The figures include the following terms:
string start
is the beginning of the source string (or substring).
string end
is the end of the source string (or substring).
length
is the length of the source string.
match start
is in the source string and is the first character of the match.
match end
is in the source string. For a string pattern, it is the first
character after the end of the match. For a positional pattern, it is the same
as match start.
match position
is in the source string. For a string pattern, it is the first
matching character. For a positional pattern, it is the position of the
matching character.
token
is a distinct syntactic element in a template, such as a
variable, a period, a pattern, or a comma.
value
is the numeric value of a positional pattern. This can be either
a constant or the resolved value of a variable.
Figure 9.1. Conceptual Overview of Parsing
Figure 9.2. Conceptual View of Finding Next Pattern