Next: Tokens, patterns and lexemes
Up: The Analysis-Synthesis Model
Previous: The Analysis-Synthesis Model
The analysis consists of three steps (Figure 5).
- The LINEAR ANALYSIS in which the stream of
characters making up the source program
- is read from left-to-right
- and converted into a stream of words, where a word is a sequence
of characters with a collective meaning.
- The HIERARCHICAL ANALYSIS in which words
- are grouped into nested collections (= grammatical phrases)
with a collective meaning
- represented by a PARSE TREE
- The SEMANTICAL ANALYSIS in which certain
checks are performed
- to ensure that the components of a program
fit together meaningfully (type checking, type conversion, ...)
- and to report on errors.
Figure 5:
The analysis phases.
|
Next: Tokens, patterns and lexemes
Up: The Analysis-Synthesis Model
Previous: The Analysis-Synthesis Model
Marc Moreno Maza
2004-12-02