{"author":{"name":"Zach Carter","email":"zach@carter.name","url":"http://zaa.ch"},"name":"jison","description":"A parser generator with Bison's API","version":"0.2.9","keywords":["jison","bison","yacc","parser","generator","lexer","flex","tokenizer","compiler"],"preferGlobal":true,"repository":{"type":"git","url":"git://github.com/zaach/jison.git"},"bugs":{"email":"jison@librelist.com","url":"http://github.com/zaach/jison/issues"},"main":"lib/jison","bin":{"jison":"lib/jison/cli-wrapper.js","jison2json":"lib/jison/jison2json.js","json2jison":"lib/jison/json2jison.js"},"engines":{"node":"0.4 || 0.5"},"dependencies":{},"devDependencies":{"test":"*","jison":"*","uglify-js":"*"},"scripts":{"test":"node tests/all-tests.js"},"directories":{"lib":"lib","bin":"./bin"},"homepage":"http://jison.org","_id":"jison@0.2.9","_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"05d4146fc33ef19f1a68c66239b17e0a54974ead","tarball":"http://registry-npm.ywwl.com/jison/download/jison-0.2.9.tgz","integrity":"sha512-5gpSo3mVkiXbpABAs0xAx3eCYnIc86cJAmr/2KweE9hajxCoGeIBNjX7mb+lH+Ss9fDIddf9gYkRcAS/tBN1DQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFJzEUTlJGRpAqMaj6HiYrChCFBBtpJPIikfyulzM6voAiB3j5fxTOETu1oqNy8eMaobM03d1X00+Xl+Siv1c0eLTQ=="}],"size":297976,"noattachment":false,"key":"/jison/-/jison-0.2.9.tgz"},"readme":"Jison\n=====\n* [issues](http://github.com/zaach/jison/issues)\n* [discuss](mailto:jison@librelist.com)\n\n[![build status](https://secure.travis-ci.org/zaach/jison.png)](http://travis-ci.org/zaach/jison)\n\nAn API for creating parsers in JavaScript\n-----------------------------------------\n\nJison generates bottom-up parsers in JavaScript. Its API is similar to Bison's, hence the name. It supports many of Bison's major features, plus some of its own. If you are new to parser generators such as Bison, and Context-free Grammars in general, a [good introduction][1] is found in the Bison manual. If you already know Bison, Jison should be easy to pickup.\n\nBriefly, Jison takes a JSON encoded grammar or Bison style grammar and outputs a JavaScript file capable of parsing the language described by that grammar. You can then use the generated script to parse inputs and accept, reject, or perform actions based on the input.\n\nInstallation\n------------\nJison can be installed for [Node](http://nodejs.org) using [`npm`](http://github.com/isaacs/npm/)\n\nUsing npm:\n\n    npm install jison -g\n\nUsage from the command line\n-----------------------\n\nClone the github repository for examples:\n\n    git clone git://github.com/zaach/jison.git\n    cd jison/examples\n\nNow you're ready to generate some parsers:\n\n    jison calculator.jison\n\nThis will generate `calculator.js` in your current working directory. This file can be used to parse an input file, like so:\n\n    echo \"2^32 / 1024\" > testcalc\n    node calculator.js testcalc\n\nThis will print out `4194304`.\n\nFull cli option list:\n\n    Usage: jison [file] [lexfile] [options]\n\n    file        file containing a grammar\n    lexfile     file containing a lexical grammar\n\n    Options:\n       -j, --json                    force jison to expect a grammar in JSON format\n       -o FILE, --outfile FILE       Filename and base module name of the generated parser\n       -t, --debug                   Debug mode\n       -m TYPE, --module-type TYPE   The type of module to generate (commonjs, amd, js)\n       -p TYPE, --parser-type TYPE   The type of algorithm to use for the parser (lr0, slr, lalr, lr)\n       -V, --version                 print version and exit\n\n\nUsage from a CommonJS module\n--------------------------\n\nYou can generate parsers programatically from JavaScript as well. Assuming Jison is in your commonjs environment's load path:\n\n```javascript\n// mygenerator.js\nvar Parser = require(\"jison\").Parser;\n\n// a grammar in JSON\nvar grammar = {\n    \"lex\": {\n        \"rules\": [\n           [\"\\\\s+\", \"/* skip whitespace */\"],\n           [\"[a-f0-9]+\", \"return 'HEX';\"]\n        ]\n    },\n\n    \"bnf\": {\n        \"hex_strings\" :[ \"hex_strings HEX\",\n                         \"HEX\" ]\n    }\n};\n\n// `grammar` can also be a string that uses jison's grammar format\nvar parser = new Parser(grammar);\n\n// generate source, ready to be written to disk\nvar parserSource = parser.generate();\n\n// you can also use the parser directly from memory\n\n// returns true\nparser.parse(\"adfe34bc e82a\");\n\n// throws lexical error\nparser.parse(\"adfe34bc zxg\");\n```\n\nMore Documentation\n------------------\nFor more information on creating grammars and using the generated parsers, read the [documentation](http://jison.org/docs).\n\nHow to contribute\n-----------------\n\nSee [CONTRIBUTING.md](https://github.com/zaach/jison/blob/master/CONTRIBUTING.md) for contribution guidelines, how to run the tests, etc.\n\nProjects using Jison\n------------------\n\nView them on the [wiki](https://github.com/zaach/jison/wiki/ProjectsUsingJison), or add your own.\n\n\nContributors\n------------\n[Githubbers](http://github.com/zaach/jison/contributors)\n\nSpecial thanks to Jarred Ligatti, Manuel E. Bermúdez \n\nLicense\n-------\n\n> Copyright (c) 2009-2014 Zachary Carter\n> \n>  Permission is hereby granted, free of\n> charge, to any person  obtaining a\n> copy of this software and associated\n> documentation  files (the \"Software\"),\n> to deal in the Software without \n> restriction, including without\n> limitation the rights to use,  copy,\n> modify, merge, publish, distribute,\n> sublicense, and/or sell  copies of the\n> Software, and to permit persons to\n> whom the  Software is furnished to do\n> so, subject to the following \n> conditions:\n> \n>  The above copyright notice and this\n> permission notice shall be  included\n> in all copies or substantial portions\n> of the Software.\n> \n>  THE SOFTWARE IS PROVIDED \"AS IS\",\n> WITHOUT WARRANTY OF ANY KIND,  EXPRESS\n> OR IMPLIED, INCLUDING BUT NOT LIMITED\n> TO THE WARRANTIES  OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND \n> NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT  HOLDERS BE\n> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY,  WHETHER IN AN ACTION OF\n> CONTRACT, TORT OR OTHERWISE, ARISING \n> FROM, OUT OF OR IN CONNECTION WITH THE\n> SOFTWARE OR THE USE OR  OTHER DEALINGS\n> IN THE SOFTWARE.\n\n\n  [1]: http://dinosaur.compilertools.net/bison/bison_4.html\n\n","publish_time":1305052254452,"maintainers":[{"name":"zaach","email":"zack.carter@gmail.com"}],"_cnpm_publish_time":1305052254452,"dist-tags":{"latest":"0.4.18"}}