COMPILER CONSTRUCTION Principles and practice Kenneth C. louden
COMPILER CONSTRUCTION Principles and Practice Kenneth C. Louden
3. Context-Free Grammars and Parsing PART ONE
3. Context-Free Grammars and Parsing PART ONE
Contents PART ONE 3. 1 The Parsing Process More 3.2 Context-Free Grammars More 3.3 Parse Trees and abstract More 3.4 Ambiguity More PART TWO 3.5 Extended Notations EBNF and Syntax diagrams 3.6 Formal Properties of Context-Free Languages 3. 7 Syntax of the tINY Language
Contents PART ONE 3.1 The Parsing Process [More] 3.2 Context-Free Grammars [More] 3.3 Parse Trees and Abstract [More] 3.4 Ambiguity [More] PART TWO 3.5 Extended Notations: EBNF and Syntax Diagrams 3.6 Formal Properties of Context-Free Languages 3.7 Syntax of the TINY Language
Introduction Parsing is the task of Syntax Analysis Determining the syntax, or structure, of a program The syntax is defined by the grammar rules of a context-Free grammar The rules of a context-free grammar are recursive The basic data structure of Syntax Analysis Is parse tree or syntax tree The syntactic structure of a language must also be recursive
Introduction • Parsing is the task of Syntax Analysis • Determining the syntax, or structure, of a program. • The syntax is defined by the grammar rules of a Context-Free Grammar • The rules of a context-free grammar are recursive • The basic data structure of Syntax Analysis is parse tree or syntax tree • The syntactic structure of a language must also be recursive
3.1 The Parsing Process
3.1 The Parsing Process