Building a Parser from Scratch

person icon Packt Publishing

Building a Parser from Scratch

Understand the underlying theory behind recursive descent parser for a programming language

updated on icon Updated on Sep, 2023

language icon Language - English

person icon Packt Publishing

architecture icon Development,Programming Languages


30-days Money-Back Guarantee

Training 5 or more people ?

Get your team access to 19,000+ top Tutorialspoint courses anytime, anywhere.

Course Description

Parsing 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 your language.

Recursive descent parsers are the group of parsers that are widely used in practice in many production programming languages. In contrast with automated parsing algorithms, the manual implementation allows having full control over the parsing process and handling complex constructs, which may not be possible in the automatic parsers.

Besides, implementing a full manual parser from scratch allows understanding and seeing this process from inside, demystifying internal structures, and turning building parsers into an interesting engineering task.

In the Building a Parser from Scratch class, we dive into pure practical implementation, building and learning different aspects of parsers.

In this course, you will learn the concept of recursive descent parsing, understand what is tokenizer and how it cooperates with the parser module, learn what is Abstract Syntax Tree (AST) and how to have different formats of these ASTs, what is “lookahead” and predictive parsing, and eventually build a parser for a full programming language, similar to Java or JavaScript.


What will you learn in this course:

  • Learn about recursive descent parsers
  • Learn about top-down parsing
  • Learn about Abstract Syntax Trees (AST)
  • Learn about tokenizer and tokens
  • Learn about different AST formats
  • Learn about regular expressions specification


What are the prerequisites for this course?

  • The prerequisites for this course are the basic data structures and algorithms: trees, lists, traversal, and regular expressions.
Building a Parser from Scratch


Check out the detailed breakdown of what’s inside the course

Basic Expressions and Tokenizer
3 Lectures
  • play icon Tokenizer | Parser 13:56 13:56
  • play icon Numbers | Strings 10:37 10:37
  • play icon From State Machines to Regular Expressions 11:11 11:11
Program Structure
4 Lectures
Control Flow and Functions
7 Lectures
Object-Oriented Programming
4 Lectures

Instructor Details

Packt Publishing

Packt Publishing

Founded in 2004 in Birmingham, UK, Packt's mission is to help the world put software to work in new ways, through the delivery of effective learning and information services to IT professionals.

Working towards that vision, we have published over 6,500 books and videos so far, providing IT professionals with the actionable knowledge they need to get the job done - whether that's specific learning on an emerging technology or optimizing key skills in more established tools.

As part of our mission, we have also awarded over $1,000,000 through our Open Source Project Royalty scheme, helping numerous projects become household names along the way.

Course Certificate

User your certification to make a career change or to advance in your current career. Salaries are among the highest in the world.

sample Tutorialspoint certificate

Our students work
with the Best




This has been a very informative lecture, it explains a lot of the questions I had on how to write and implement my own processing language in a java application I would like to develop. The course does run fast, and I would say is for a more senior programmer, and one may have to repeat watching

Related Video Courses

View More

Annual Membership

Become a valued member of Tutorials Point and enjoy unlimited access to our vast library of top-rated Video Courses

Subscribe now
People having fun around a laptop

Online Certifications

Master prominent technologies at full length and become a valued certified professional.

Explore Now
People having fun around a laptop

Talk to us