Chapter 3

Scanning and Parsing

Although mathematical notation undoubtedly possesses parsing rules, they are rather loose, sometimes contradictory, and seldom clearly stated. ... The proliferation of programming languages shows no more uniformity than mathematics. Nevertheless, programming languages do bring a different perspective. ... Because of their application to a broad range of topics, their strict grammar, and their strict interpretation, programming languages can provide new insights into mathematical notation.

— Kenneth E. Iverson

ANY implementation of a programming language involves scanning and parsing the source program into a representation that can be subsequently processed (i.e., interpreted or compiled or a combination of both). Scanning involves analyzing a program represented as a string to determine whether the atomic lexical units of that string are valid. If so, the process of parsing determines whether those lexical units are arranged in a valid order with respect to the grammar of the language and, if so, converts the program into a more easily processable representation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.137.108