O'Reilly logo

Compilers: Principles and Practice by Himanshu B. Dave, Parag H. Dave

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5

Syntax-directed Translation

What you will learn in this chapter

  • What do we mean by “meaning” of a program?
  • Semantics of a program
  • Interplay of Syntax and Semantics
  • What is “Syntax-directed Translation”?
  • Static and Dynamic semantic analysis
  • Methods of semantic specifications
  • What is a Semantic stack and how it is used?
  • Semantic stacks in yacc
  • Actions in yacc
  • What are Attribute grammars?
  • What is a dependency graph?
  • What are Inherited and Synthesized Attributes?
  • What are S-type Definitions and L-type Definitions?
  • Synthesized and Inherited Attributes in yacc
  • Symbol Table handling and semantic analysis
  • Symbol Table in miniC
  • Intermediate Representation output for miniC

Key Words

semantic analysis, syntax-directed translation, semantic specifications, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required