nearley

??? Simple, fast, powerful parser toolkit for JavaScript.

Github星跟蹤圖

nearley ↗️

JS.ORG
npm version

nearley is a simple, fast and powerful parsing toolkit. It consists of:

  1. A powerful, modular DSL for describing
    languages
  2. An efficient, lightweight Earley
    parser
  3. Loads of tools, editor plug-ins, and other
    goodies!

nearley is a streaming parser with support for catching errors
gracefully and providing all parsings for ambiguous grammars. It is
compatible with a variety of lexers (we recommend
moo). It comes with tools for creating tests,
railroad diagrams and fuzzers from your grammars, and has support for a
variety of editors and platforms. It works in both node and the browser.

Unlike most other parser generators, nearley can handle any grammar you can
define in BNF (and more!). In particular, while most existing JS parsers such
as PEGjs and Jison choke on certain grammars (e.g. left recursive
ones
), nearley handles them
easily and efficiently by using the Earley parsing
algorithm
.

nearley is used by a wide variety of projects:

nearley is an npm staff
pick
.

Documentation

Please visit our website https://nearley.js.org to get started! You will find a
tutorial, detailed reference documents, and links to several real-world
examples to get inspired.

Contributing

Please read this document before working on
nearley. If you are interested in contributing but unsure where to start, take
a look at the issues labeled "up for grabs" on the issue tracker, or message a
maintainer (@kach or @tjvr on Github).

nearley is MIT licensed.

A big thanks to Nathan Dinsmore for teaching me how to Earley, Aria Stewart for
helping structure nearley into a mature module, and Robin Windels for
bootstrapping the grammar. Additionally, Jacob Edelman wrote an experimental
JavaScript parser with nearley and contributed ideas for EBNF support. Joshua
T. Corbin refactored the compiler to be much, much prettier. Bojidar Marinov
implemented postprocessors-in-other-languages. Shachar Itzhaky fixed a subtle
bug with nullables.

主要指標

概覽
名稱與所有者kach/nearley
主編程語言JavaScript
編程語言JavaScript (語言數: 4)
平台
許可證MIT License
所有者活动
創建於2014-02-23 20:44:28
推送於2024-11-14 02:34:00
最后一次提交2024-11-13 21:34:00
發布數2
最新版本名稱zenodo-2 (發布於 )
第一版名稱zenodo (發布於 )
用户参与
星數3.7k
關注者數44
派生數234
提交數1.1k
已啟用問題?
問題數456
打開的問題數166
拉請求數114
打開的拉請求數32
關閉的拉請求數51
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?