Introduction

Installation

yarn add chevrotain
# OR
npm install chevrotain

Scenario

In this tutorial we will implement a parser for a simplified SQL syntax which will contain only SELECT statements. The output of the parser will be an Abstract Syntax Tree (AST).

Running & Debugging

The code snippets in this tutorial steps are part of an executable and debuggable exampleopen in new window. It is recommended to use these sources either as an initial template or as an executable example in order to gain a deeper understanding.

Samples Syntax

This tutorial uses ES2015+ syntax. See examples of how to use Chevrotain with other implementation languagesopen in new window.