Parsing
Parsing splits up the data in a source string and assigns pieces of it into the variables named in a template.
The parsing instructions are ARG, PARSE, and PULL. See ARG, PARSE, and PULL.
The data to parse is a source string. A template is a model specifying
how to split the source string. The simplest kind of template consists of only a list of variable
names. For example:
variable1 variable2 variable3This kind of template parses the source string into blank-delimited words. More complicated
templates contain patterns in addition to variable names.
- String patterns
- Match characters in the source string to specify where to split it. See Templates that contain string patterns.
- Positional patterns
- Indicate the character positions at which to split the source string. See Templates that contain positional (numeric) patterns.
Parsing is essentially a two-step process.
- Parse the source string into appropriate substrings by using patterns.
- Parse each substring into words.