2.0 Introduction

2.1 Grammars

2.2 Ambiguity

2.3 Summary

Web References

Exercises

2.3 Summary

Languages are described using grammars. In particular, the syntax of a programming language is described using context-free grammars and written down using Backus-Naur form (BNF).

A string may be derived from its grammar. Parsing is the process of "discovering" a derivation, given an input string and a grammar.