2.13 Chapter Summary
This chapter addresses constructs (e.g., regular expressions, grammars, automata) for defining (i.e., denoting, generating, and recognizing, respectively) languages and the capabilities (or limitations) of those constructs in relation to programming languages (Table 2.12). A regular expression denotes a set of strings—that is, the sentences of the language that the regular expression denotes. Regular expressions and regular grammars can capture the rules for a valid identifier in a programming language. More generally, regular expressions can model the lexics (i.e., lexical structure) of a programming language. Context-free grammars can capture the concept of balanced entities nested arbitrarily deep (e.g., parentheses, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access