Unit 2 Discussion.odt - Unit 2 Question In your own words describe the steps of compilation described by Niklaus Wirth in his 2005 text \u201cCompiler

Unit 2 Discussion.odt - Unit 2 Question In your own words...

This preview shows page 1 out of 1 page.

Unit 2 Question In your own words, describe the steps of compilation described by Niklaus Wirth in his 2005 text “Compiler Construction”. You must include a description of what a ‘Context Free Grammar’ is, and how it relates to the compilation process. Answer The process of compilation as state by Niklaus Wirth in his book, Compiler Construction, involves: Lexical Analysis - The sequence of characters of a source text is translated into a corresponding sequence of symbols of the vocabulary of the language. Syntax Analysis (Parsing) - The sequence of symbols is transformed into a representation recognizable to the structure of the source text. Type Checking – This verifies whether the compatibility rules are observed by a program. Code Generation - A sequence of instructions taken from the instruction set of the target computer is generated via the parsing representation result” (Wirth, 2005). Context Free Grammar (CFG) is a set of recursive rules which is used to generate all possible strings in a given formal language. “It contains terminal symbols, which are the characters of the alphabet that appear
Image of page 1

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture