nearley.js
Parsers turn strings of characters into meaningful data structures (like a JSON object!). nearley is a fast, robust, and modern parser generator for JavaScript. You'll love it because:
- It is the first JS parser to use the Earley algorithm (insert your own ‘early bird’ pun here). It lives happily in node, but doesn't mind the browser.
- It processes left recursion without choking. In fact, nearley will parse anything you throw at it without complaining or going into a
sulkinfinite loop. - It handles ambiguous grammars gracefully. Ambiguous grammars can be parsed in multiple ways: instead of getting confused, nearley gives you all the parsings (in a deterministic order!).
- It allows for debugging with generous error detection. When it catches a parse-time error, nearley tells you what went wrong.
- It is powerful enough to be bootstrapped. That means nearley uses nearley to compile parts of nearley. nearleyception.
Excited? Get started on Github. Or visit the calculator demo for more action.