Compilation - Part Three: Syntax Analysis
Computer Science Computer Science
211K subscribers
38,806 views
0

 Published On Sep 2, 2019

This is part three of a series of videos about compilation. Part three is about syntax analysis. It explains how the syntax analyser, otherwise known as the parser, takes a token stream from the lexical analyser, and checks it to make sure that the rules of the source language have been followed correctly. This video begins by describing a simple context free grammar and illustrates how the grammar of a high level programming language can be accurately described, and communicated between programmers, using a notation such as Backus-Naur Form (BNF). The video goes on to explain how the syntax of a source program can be checked by constructing a parse tree, and how this can be refined to an abstract syntax tree to allow for more detailed semantic analysis. The representation of arithmetic expressions using infix, prefix and postfix notations is covered, along with expression trees and directed acyclic graphs (DAG). As you will see when you watch this series, compilation involves a diverse range of themes in the field of computer science including high and low level programming paradigms, the definition of context free grammars, the application of dynamic data structures such as stacks, linked lists, hash tables, graphs and trees, memory management, processor architectures, and more. This series will give you an insight into some of the concepts and features that are typical of many compilers.

show more

Share/Embed