A react style parser generator, based on PEG.js

Usage no npm install needed!

<script type="module">
  import reactPeg from '';


React Peg · Build Status Coverage Status

React Peg is a react style parser generator based on PEG.js.

  • Type Checking: With typescript & jsx support, you don't need to play with grammar as string any more.

  • Rule-Based: Build encapsulated rules and compose them to make complex grammar, and you can reuse them just like UI components.

  • Easy to Debug & Unit Test: Since rule is written in JavaScript instead of string, you can easily debug & test grammar and parser.



You can find the React Peg documentation on the website.


React Peg is MIT licensed.