Parsing Algorithms

Course

Online

£ 10 + VAT

Description

  • Type

    Course

  • Methodology

    Online

  • Start date

    Different dates available

Course overviewParsing or syntactic analysis is one of the first stages in designing and implementing a compiler. A well-designed syntax of your programming language is a big motivation why users would prefer and choose exactly your language.The problem with “parsers theory” in classic compiler schools and books is that this theory is often considered as “too advanced”, going right into complicated formal descriptions from the Theory of Computation and formal grammars. As a result students may lose an interest in building a compiler already at parsing stage.The opposite problem often seen in describing a parser is a superficial approach describing only manual (usually recursive descent) parsing, leaving the students with issues understanding the actual techniques behind the automated parsers.I believe this deep dive into the parsing theory should be combined together with a hands-on approach, which goes in parallel and allows seeing all the learned theoretical material on practice.In the Essentials of Parsing (aka Parsing Algorithms) class we dive into different aspects of the parsing theory, describing in detail the LL and LR parsers. However at the same time to make the learning process and understanding easy and fun, we build in parallel an automatic parser for a full programming language, similar to JavaScript or Python, from scratch.After this class not only you will be able to use a parser generator to build parsers for programming languages, but will also understand how the parser generators work under the hood themselves.Implementing a parser for a programing language would also make your practical usage of other programming languages more professional.Who this class is for?This class is for any curious engineer, who would like to gain skills of building complex systems (and building a parser for a programing language is a pretty advanced engineering task!), and obtain a transferable knowledge for building such systems. topics in...

Facilities

Location

Start date

Online

Start date

Different dates availableEnrolment now open

About this course

Context-free grammars
Abstract Syntax Trees
Parser generators
Build a full parser from scratch using parser generator
Top-down LL parsers
Bottom-up LR parsers
Backtracking parsers
Left-recursion and Left-factoring
Predictive recursive descent parsers
LL(1), LR(0), SLR(1), CLR(1), LALR(1) parsers
Shift-reduce algorithm
Syntax tool: language-agnostic parser generator

Questions & Answers

Add your question

Our advisors and other users will be able to reply to you

Who would you like to address this question to?

Fill in your details to get a reply

We will only publish your name and question

Reviews

This centre's achievements

2021

All courses are up to date

The average rating is higher than 3.7

More than 50 reviews in the last 12 months

This centre has featured on Emagister for 4 years

Subjects

  • Programming
  • Grammar
  • Systems
  • Syntax
  • Algorithms
  • Approach
  • Conflict

Course programme

Context-free grammars and languages 5 lectures 01:01:00 Lecture 1: Formal grammars, context-free preview
  • Course overview
  • Parsing pipeline
  • Tokenizer module
  • Parser module
  • AST: Abstract syntax tree
  • Hand-written vs. Automatic parsers
  • Recursive descent
  • LL and LR parsing
  • Formal grammars
  • Terminal, non-terminals and productions
  • Chomsky grammar hierarchy
  • Context-free grammars
Lecture 2: Grammar derivations
  • BNF notation (Backus-Naur form)
  • RegExp notation
  • Tokenizer and Parser
  • Derivation process
  • Left-most and Right-most derivations
  • Parse trees
  • Depth-first traversal — string on leaves
  • Ambiguous grammars
Lecture 3: Ambiguous grammars
  • Ambiguous grammars
  • Left- and Right-associativity
  • Operator precedence
  • Left recursion
  • Non-terminal levels
  • Unambiguous grammars
Lecture 4: Syntax tool | Letter preview
  • Syntax tool introduction
  • Parser generators
  • BNF grammar
  • Associativity and precedence
  • LALR(1) parsing mode
  • Letter programming language
Lecture 5: Abstract Syntax Trees preview
  • CST: Concrete Syntax Tree (aka Parse Tree)
  • AST: Abstract Syntax Tree
  • Semantic actions
  • Inline interpreter for simple DSLs
  • AST nodes generation
  • Parenthesized expression
Context-free grammars and languages 5 lectures 01:01:00 Lecture 1: Formal grammars, context-free preview
  • Course overview
  • Parsing pipeline
  • Tokenizer module
  • Parser module
  • AST: Abstract syntax tree
  • Hand-written vs. Automatic parsers
  • Recursive descent
  • LL and LR parsing
  • Formal grammars
  • Terminal, non-terminals and productions
  • Chomsky grammar hierarchy
  • Context-free grammars
Lecture 2: Grammar derivations
  • BNF notation (Backus-Naur form)
  • RegExp notation
  • Tokenizer and Parser
  • Derivation process
  • Left-most and Right-most derivations
  • Parse trees
  • Depth-first traversal — string on leaves
  • Ambiguous grammars
Lecture 3: Ambiguous grammars
  • Ambiguous grammars
  • Left- and Right-associativity
  • Operator precedence
  • Left recursion
  • Non-terminal levels
  • Unambiguous grammars
Lecture 4: Syntax tool | Letter preview
  • Syntax tool introduction
  • Parser generators
  • BNF grammar
  • Associativity and precedence
  • LALR(1) parsing mode
  • Letter programming language
Lecture 5: Abstract Syntax Trees preview
  • CST: Concrete Syntax Tree (aka Parse Tree)
  • AST: Abstract Syntax Tree
  • Semantic actions
  • Inline interpreter for simple DSLs
  • AST nodes generation
  • Parenthesized expression
Lecture 1: Formal grammars, context-free preview
  • Course overview
  • Parsing pipeline
  • Tokenizer module
  • Parser module
  • AST: Abstract syntax tree
  • Hand-written vs. Automatic parsers
  • Recursive descent
  • LL and LR parsing
  • Formal grammars
  • Terminal, non-terminals and productions
  • Chomsky grammar hierarchy
  • Context-free grammars
Lecture 1: Formal grammars, context-free preview
  • Course overview
  • Parsing pipeline
  • Tokenizer module
  • Parser module
  • AST: Abstract syntax tree
  • Hand-written vs. Automatic parsers
  • Recursive descent
  • LL and LR parsing
  • Formal grammars
  • Terminal, non-terminals and productions
  • Chomsky grammar hierarchy
  • Context-free grammars
Lecture 1: Formal grammars, context-free preview
  • Course overview
  • Parsing pipeline
  • Tokenizer module
  • Parser module
  • AST: Abstract syntax tree
  • Hand-written vs. Automatic parsers
  • Recursive descent
  • LL and LR parsing
  • Formal grammars
  • Terminal, non-terminals and productions
  • Chomsky grammar hierarchy
  • Context-free grammars
Lecture 1: Formal grammars, context-free preview
  • Course overview
  • Parsing pipeline
  • Tokenizer module
  • Parser module
  • AST: Abstract syntax tree
  • Hand-written vs. Automatic parsers
  • Recursive descent
  • LL and LR parsing
  • Formal grammars
  • Terminal, non-terminals and productions
  • Chomsky grammar hierarchy
  • Context-free grammars
  • Course overview
  • Parsing pipeline
  • Tokenizer module
  • Parser module
  • AST: Abstract syntax tree
  • Hand-written vs. Automatic parsers
  • Recursive descent
  • LL and LR parsing
  • Formal grammars
  • Terminal, non-terminals and productions
  • Chomsky grammar hierarchy
  • Context-free grammars
  • Course overview
  • Parsing pipeline
  • Tokenizer module
  • Parser module
  • AST: Abstract syntax tree
  • Hand-written vs. Automatic parsers
  • Recursive descent
  • LL and LR parsing
  • Formal grammars
  • Terminal, non-terminals and productions
  • Chomsky grammar hierarchy
  • Context-free grammars
Lecture 2: Grammar derivations
  • BNF notation (Backus-Naur form)
  • RegExp notation
  • Tokenizer and Parser
  • Derivation process
  • Left-most and Right-most derivations
  • Parse trees
  • Depth-first traversal — string on leaves
  • Ambiguous grammars
Lecture 2: Grammar derivations
  • BNF notation (Backus-Naur form)
  • RegExp notation
  • Tokenizer and Parser
  • Derivation process
  • Left-most and Right-most derivations
  • Parse trees
  • Depth-first traversal — string on leaves
  • Ambiguous grammars
Lecture 2: Grammar derivations
  • BNF notation (Backus-Naur form)
  • RegExp notation
  • Tokenizer and Parser
  • Derivation process
  • Left-most and Right-most derivations
  • Parse trees
  • Depth-first traversal — string on leaves
  • Ambiguous grammars
Lecture 2: Grammar derivations
  • BNF notation (Backus-Naur form)
  • RegExp notation
  • Tokenizer and Parser
  • Derivation process
  • Left-most and Right-most derivations
  • Parse trees
  • Depth-first traversal — string on leaves
  • Ambiguous grammars
  • BNF notation (Backus-Naur form)
  • RegExp notation
  • Tokenizer and Parser
  • Derivation process
  • Left-most and Right-most derivations
  • Parse trees
  • Depth-first traversal — string on leaves
  • Ambiguous grammars
  • BNF notation (Backus-Naur form)
  • RegExp notation
  • Tokenizer and Parser
  • Derivation process
  • Left-most and Right-most derivations
  • Parse trees
  • Depth-first traversal — string on leaves
  • Ambiguous grammars
Lecture 3: Ambiguous grammars
  • Ambiguous grammars
  • Left- and Right-associativity
  • Operator precedence
  • Left recursion
  • Non-terminal levels
  • Unambiguous grammars
Lecture 3: Ambiguous grammars
  • Ambiguous grammars
  • Left- and Right-associativity
  • Operator precedence
  • Left recursion
  • Non-terminal levels
  • Unambiguous grammars
Lecture 3: Ambiguous grammars
  • Ambiguous grammars
  • Left- and Right-associativity
  • Operator precedence
  • Left recursion
  • Non-terminal levels
  • Unambiguous grammars
Lecture 3: Ambiguous grammars
  • Ambiguous grammars
  • Left- and Right-associativity
  • Operator precedence
  • Left recursion
  • Non-terminal levels
  • Unambiguous grammars
  • Ambiguous grammars
  • Left- and Right-associativity
  • Operator precedence
  • Left recursion
  • Non-terminal levels
  • Unambiguous grammars
  • Ambiguous grammars
  • Left- and Right-associativity
  • Operator precedence
  • Left recursion
  • Non-terminal levels
  • Unambiguous grammars
Lecture 4: Syntax tool | Letter preview
  • Syntax tool introduction
  • Parser generators
  • BNF grammar
  • Associativity and precedence
  • LALR(1) parsing mode
  • Letter programming language
Lecture 4: Syntax tool | Letter preview
  • Syntax tool introduction
  • Parser generators
  • BNF grammar
  • Associativity and precedence
  • LALR(1) parsing mode
  • Letter programming language
Lecture 4: Syntax tool | Letter preview
  • Syntax tool introduction
  • Parser generators
  • BNF grammar
  • Associativity and precedence
  • LALR(1) parsing mode
  • Letter programming language
Lecture 4: Syntax tool | Letter preview
  • Syntax tool introduction
  • Parser generators
  • BNF grammar
  • Associativity and precedence
  • LALR(1) parsing mode
  • Letter programming language
  • Syntax tool introduction
  • Parser generators
  • BNF grammar
  • Associativity and precedence
  • LALR(1) parsing mode
  • Letter programming language
  • Syntax tool introduction
  • Parser generators
  • BNF grammar
  • Associativity and precedence
  • LALR(1) parsing mode
  • Letter programming language
Lecture 5: Abstract Syntax Trees preview
  • CST: Concrete Syntax Tree (aka Parse Tree)
  • AST: Abstract Syntax Tree
  • Semantic actions
  • Inline interpreter for simple DSLs
  • AST nodes generation
  • Parenthesized expression
Lecture 5: Abstract Syntax Trees preview
  • CST: Concrete Syntax Tree (aka Parse Tree)
  • AST: Abstract Syntax Tree
  • Semantic actions
  • Inline interpreter for simple DSLs
  • AST nodes generation
  • Parenthesized expression
Lecture 5: Abstract Syntax Trees preview
  • CST: Concrete Syntax Tree (aka Parse Tree)
  • AST: Abstract Syntax Tree
  • Semantic actions
  • Inline interpreter for simple DSLs
  • AST nodes generation
  • Parenthesized expression
Lecture 5: Abstract Syntax Trees preview
  • CST: Concrete Syntax Tree (aka Parse Tree)
  • AST: Abstract Syntax Tree
  • Semantic actions
  • Inline interpreter for simple DSLs
  • AST nodes generation
  • Parenthesized expression
  • CST: Concrete Syntax Tree (aka Parse Tree)
  • AST: Abstract Syntax Tree
  • Semantic actions
  • Inline interpreter for simple DSLs
  • AST nodes generation
  • Parenthesized expression
  • CST: Concrete Syntax Tree (aka Parse Tree)
  • AST: Abstract Syntax Tree
  • Semantic actions
  • Inline interpreter for simple DSLs
  • AST nodes generation
  • Parenthesized expression
Top-down LL parsing 6 lectures 01:15:42 Lecture 6: Backtracking parser
  • Top-down parsers
  • Bottom-up parsers aka Shift-Reduce
  • Left recursion
  • Recursive descent parser
  • Backtracking parser
  • Left factoring
Lecture 7: Left-recursion and Left-factoring
  • Common prefix rules
  • Why backtracking is slow
  • Left-factoring
  • Left-recursion
  • Indirect recursion
Lecture 8: Predictive Recursive descent parser
  • Predictive parsing
  • Concept of Lookahead tokens
  • Recursive descent parser
  • First & Follow sets
Lecture 9: LL(1) parsing: First & Follow sets
  • Predictive parsing
  • Concept of Lookahead tokens
  • Structure of the LL(1) parser
  • First set calculation
  • Follow set calculation
  • Syntax tool example
Lecture 10: Construction of LL(1) parsing table
  • Lookahead tokens
  • Structure of LL(1) parser
  • First & Follow sets
  • LL(1) parsing table
  • Predict set
  • LL(1) conflicts
Lecture 11: LL(1) parsing algorithm
  • Structure of LL(1) parser
  • LL(1) parsing table
  • Parsing stack (Push-down automata)
  • Left-most derivation
  • Abstract algorithm of the LL(1) parser
Top-down LL parsing Lecture 12: Back to practice: Statements | Blocks
  • Module include: reusing helper functions
  • AST formats: explicit and S-expression format
  • Statements and Statement lists
  • Program: main entry point
  • Blocks: groups of statements
Lecture 12: Back to practice: Statements | Blocks
  • Module include: reusing helper functions
  • AST formats: explicit and S-expression format
  • Statements and Statement lists
  • Program: main entry point
  • Blocks: groups of statements
Lecture 12: Back to practice: Statements | Blocks
  • Module include: reusing helper functions
  • AST formats: explicit and S-expression format
  • Statements and Statement lists
  • Program: main entry point
  • Blocks: groups of statements
  • Module include: reusing helper functions
  • AST formats: explicit and S-expression format
  • Statements and Statement lists
  • Program: main entry point
  • Blocks: groups of statements
  • Module include: reusing helper functions
  • AST formats: explicit and S-expression format
  • Statements and Statement lists
  • Program: main entry point
  • Blocks: groups of statements
Lecture 13: Function Declarations
  • Optional statements
  • Empty blocks
  • Function declarations
  • If-else statements
  • Shift-reduce conflict example
Note: correct regexp for multi-line comment: \/\*[\s\S]*?\*\/ Lecture 13: Function Declarations
  • Optional statements
  • Empty blocks
  • Function declarations
  • If-else statements
  • Shift-reduce conflict example
Note: correct regexp for multi-line comment: \/\*[\s\S]*?\*\/ Lecture 13: Function Declarations
  • Optional statements
  • Empty blocks
  • Function declarations
  • If-else statements
  • Shift-reduce conflict example
Note: correct regexp for multi-line comment: \/\*[\s\S]*?\*\/ Lecture 13: Function Declarations
  • Optional statements
  • Empty blocks
  • Function declarations
  • If-else statements
  • Shift-reduce conflict...

Additional information

Basic data structures and algorithms Trees, graphs, traversal Interest in programming languages

Parsing Algorithms

£ 10 + VAT