1.0 Introduction

1.1 History

1.2 Characteristics

1.3 Scanner Generators

1.4 Parser Generators

1.5 Semantic Analyzer Generators

1.6 Optimization

1.7 Code Generation

1.8 Summary

Web References

Exercises

Example 1

Here, identifiers consist of letters and digits and begin with a letter; literals are sequences of digits; arithmetic operators are addition, subtraction, multiplication, division and assignment operators; punctuation symbols are ";" and left and right parentheses.

As input to a real lexical analyzer generator, this notation would be ambiguous since the left parenthesis is used in two ways. In the definition of an identifier, it is a metasymbol used for grouping, and in the definition of punctuation, it is an actual value.