Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Chevrotain/quick-start

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This is the typescript based starter pack npm module to develop a parser/serializer for a language using Chevortain parser toolkit.

It bootstraps following constructs for a super simple sql dsl used in the Chevrotain Tutorial

  • Lexer
  • Parser
  • Visitor
  • Serializer
  • Models
  • Grammar Railroad diagram generation
  • Jest based unit tests

Usage

  • clone this repo
git clone https://github.com/Chevrotain/quick-start.git chevrotain-quick-start
  • Change the package name and other things as appropriate in the package.json

  • Install dependencies

yarn install
  • Start implementing your language.

Unit Tests

Unit tests are a must when you are developing a new language. As you modify grammar, you want to make sure that new grammar is handling all use cases properly. This quick-starter comes with easy to use unit testing based on Jest.

To add tests, edit the dsl-texts.ts file with new dsl text, model it supposed to parse into and text after serializing using couple of format options.

To run a single test, just add only: true property to that entry. This allows you to debug to fix issues.

Resources

Here are some resources to help with your language development

Here are some projects using Chevrotain in real world

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published