PEG.js ====== PEG.js is a simple parser generator for JavaScript that produces fast parsers with excellent error reporting. You can use it to process complex data or computer languages and build transformers, interpreters, compilers and other tools easily. Features -------- * Simple and expressive grammar syntax * Integrates both lexical and syntactical analysis * Parsers have excellent error reporting out of the box * Based on [parsing expression grammar](http://en.wikipedia.org/wiki/Parsing_expression_grammar) formalism — more powerful than traditional LL(*k*) and LR(*k*) parsers * Usable [from your browser](http://pegjs.majda.cz/online), from the command line, or via JavaScript API Getting Started --------------- [Online version](http://pegjs.majda.cz/online) is the easiest way to generate a parser. Just enter your grammar, try parsing few inputs, and download generated parser code. Installation ------------ ### Node.js To use the command-line version, install [Node.js](http://nodejs.org/) and [npm](http://npmjs.org/) first. You can then install PEG.js: $ npm install pegjs Once installed, you can use the `pegjs` command to generate your parser from a grammar and use the JavaScript API from Node.js. ### Browser [Download](http://pegjs.majda.cz/#download) the PEG.js library (regular or minified version) and include it in your web page or application using the `