Introduction to Lexers, Parsers and Interpreters with Chevrotain
Coding With Adam Coding With Adam
11.7K subscribers
5,562 views
122

 Published On Nov 28, 2022

In this exciting tutorial we are going to learn how to use a library called Chevrotain. It can be used to build parsers/compilers/interpreters for various use cases ranging from simple config files to full fledged programming languages. If you ever wondered how programming languages are built this video is a great introduction. We will start with an intro to lexers(tokenization), parsers, grammars and much more. Then build a simple calculator that uses all these concepts.

Other than building a simple calculator using chevrotain the concepts that we will learn here are those that are used to build programming languages like javascript, .net, SQL and much more. Perhaps one day you will make your own language. There is a lot to understand and this tutorial will give you an idea of further areas to explore.

Github Repo
https://github.com/CodingWith-Adam/ch...

Article:
https://dev.to/codingwithadam/introdu...

Chevrotain
https://chevrotain.io/

#javascript #computerscience #chevrotain

Chapters
0:00 introduction
1:05 Overview of Lexer parser evaluator
1:24 Lexer on diagram
2:29 Parser on diagram
5:00 Interpreter on diagram
5:11 Project setup
6:36 Lexer code
10:47 Parser code
17:00 Interpreter code
22:10 Project summary
22:29 Example of complete calculator

show more

Share/Embed