Chapter 2: Introduction to compilers

The next step

. Once the words are understood, the next step is to understand the structure of the sentence

. The process is known as syntax checking or parsing

 

Syntax analysis (also called as parsing) is a process of imposing a hierarchical (tree like) structure on the token stream. It is basically like generating sentences for the language using language specific grammatical rules as we have in our natural language
Ex. sentence subject + object + subject The example drawn above shows how a sentence in English (a natural language) can be broken down into a tree form depending on the construct of the sentence.