2.20.1 • Published 3 years ago

nearley v2.20.1

Weekly downloads
2,502,877
License
MIT
Repository
github
Last release
3 years ago

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.

Citing nearley

If you are citing nearley in academic work, please use the following BibTeX entry.

@misc{nearley,
    author = "Kartik Chandra and Tim Radvan",
    title  = "{nearley}: a parsing toolkit for {JavaScript}",
    year   = {2014},
    doi    = {10.5281/zenodo.3897993},
    url    = {https://github.com/kach/nearley}
}
2.20.1

3 years ago

2.20.0

3 years ago

2.19.9

3 years ago

2.19.8

3 years ago

2.19.7

4 years ago

2.19.6

4 years ago

2.19.5

4 years ago

2.19.4

4 years ago

2.19.3

4 years ago

2.19.2

4 years ago

2.19.1

4 years ago

2.19.0

5 years ago

2.18.0

5 years ago

2.17.0

5 years ago

2.16.0

5 years ago

2.15.1

6 years ago

2.15.0

6 years ago

2.14.0

6 years ago

2.12.2

6 years ago

2.13.0

6 years ago

2.12.1

6 years ago

2.12.0

6 years ago

2.11.2

6 years ago

2.11.1

6 years ago

2.11.0

7 years ago

2.10.5

7 years ago

2.10.4

7 years ago

2.10.3

7 years ago

2.10.2

7 years ago

2.10.1

7 years ago

2.10.0

7 years ago

2.9.3

7 years ago

2.9.2

7 years ago

2.9.1

7 years ago

2.9.0

7 years ago

2.8.0

7 years ago

2.7.15

7 years ago

2.7.14

7 years ago

2.7.13

7 years ago

2.7.12

7 years ago

2.7.11

7 years ago

2.7.10

7 years ago

2.7.9

7 years ago

2.7.8

7 years ago

2.7.7

7 years ago

2.7.6

7 years ago

2.7.5

7 years ago

2.7.4

7 years ago

2.7.3

8 years ago

2.7.2

8 years ago

2.7.1

8 years ago

2.7.0

8 years ago

2.6.0

8 years ago

2.5.0

8 years ago

2.4.1

8 years ago

2.4.0

8 years ago

2.3.0

8 years ago

2.2.0

8 years ago

2.1.1

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.9.0

8 years ago

1.8.0

8 years ago

1.7.0

9 years ago

1.6.2

9 years ago

1.6.1

9 years ago

1.6.0

9 years ago

1.5.0

9 years ago

1.4.0

9 years ago

1.3.1

9 years ago

1.3.0

9 years ago

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.0

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.4.0

9 years ago

0.3.0

9 years ago

0.2.3

9 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago