{ "info": { "author": "Jason Evans", "author_email": "jasone@canonware.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Software Development :: Compilers", "Topic :: Text Processing :: General" ], "description": ".. image:: https://travis-ci.org/sprymix/parsing.svg?branch=master\n :target: https://travis-ci.org/sprymix/parsing\n\n\nParsing\n=======\n\nThe Parsing module implements an LR(1) parser generator, as well as the\nruntime support for using a generated parser, via the Lr and Glr parser\ndrivers. There is no special parser generator input file format, but the\nparser generator still needs to know what classes/methods correspond to\nvarious aspects of the parser. This information is specified via\ndocstrings, which the parser generator introspects in order to generate a\nparser. Only one parser specification can be embedded in each module, but\nit is possible to share modules between parser specifications so that, for\nexample, the same token definitions can be used by multiple parser\nspecifications.\n\nThe parsing tables are LR(1), but they are generated using a fast algorithm\nthat avoids creating duplicate states that result when using the generic\nLR(1) algorithm. Creation time and table size are on par with the LALR(1)\nalgorithm. However, LALR(1) can create reduce/reduce conflicts that don't\nexist in a true LR(1) parser. For more information on the algorithm, see::\n\n A Practical General Method for Constructing LR(k) Parsers\n David Pager\n Acta Informatica 7, 249-268 (1977)\n\nParsing table generation requires non-trivial amounts of time for large\ngrammars. Internal pickling support makes it possible to cache the most\nrecent version of the parsing table on disk, and use the table if the\ncurrent parser specification is still compatible with the one that was used\nto generate the pickled parsing table. Since the compatibility checking is\nquite fast, even for large grammars, this removes the need to use the\nstandard code generation method that is used by most parser generators.\n\nParser specifications are encapsulated by the Spec class. Parser instances\nuse Spec instances, but are themselves based on separate classes. This\nallows multiple parser instances to exist simultaneously, without requiring\nmultiple copies of the parsing tables. There are two separate parser driver\nclasses:\n\nLr:\n Standard Characteristic Finite State Machine (CFSM) driver, based on\n unambiguous LR(1) parsing tables. This driver is faster than the Glr\n driver, but it cannot deal with all parsing tables that the Glr\n driver can.\n\nGlr:\n Generalized LR driver, capable of tracking multiple parse trees\n simultaneously, if the %split precedence is used to mark ambiguous\n actions. This driver is closely based on Elkhound's design, which\n is described in a technical report::\n\n Elkhound: A Fast, Practical GLR Parser Generator\n Scott McPeak\n Report No. UCB/CSD-2-1214 (December 2002)\n http://www.cs.berkeley.edu/~smcpeak/elkhound/\n\nParser generator directives are embedded in docstrings, and must begin with\na '%' character, followed immediately by one of several keywords:\n\n Precedence:\n ``%fail`` ``%nonassoc`` ``%left`` ``%right`` ``%split``\n\n Token:\n ``%token``\n\n Non-terminal:\n ``%start`` ``%nonterm``\n\n Production:\n ``%reduce``\n\nAll of these directives are associated with classes except for %reduce.\n%reduce is associated with methods within non-terminal classes. The Parsing\nmodule provides base classes from which precedences, tokens, and\nnon-terminals must be derived. This is not as restrictive as it sounds,\nsince there is nothing preventing, for example, a master Token class that\nsubclasses Parsing.Token, which all of the actual token types then subclass.\nAlso, nothing prevents using multiple inheritance.\n\nFolowing are the base classes to be subclassed by parser specifications:\n\n * Precedence\n * Token\n * Nonterm\n\nThe Parsing module implements the following exception classes:\n\n * SpecError - when there is a problem with the grammar specification\n * ParsingException - any problem that occurs during parsing\n * UnexpectedToken - when the input sequence contains a token that is\n not allowed by the grammar (including end-of-input)\n\nIn order to maintain compatibility with legacy code, the Parsing module\ndefines the following aliases. New code should use the exceptions above\nthat do not shadow Python's builtin exceptions.\n\n * Exception - superclass for all exceptions that can be raised\n * SyntaxError - alias for UnexpectedToken\n\nAdditionally, trying to set private attributes may raise:\n * AttributeError\n\nAuthor: Jason Evans jasone@canonware.com\n\nGithub repo: http://github.com/sprymix/parsing\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.canonware.com/Parsing/", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "parsing", "package_url": "https://pypi.org/project/parsing/", "platform": "", "project_url": "https://pypi.org/project/parsing/", "project_urls": { "Homepage": "http://www.canonware.com/Parsing/" }, "release_url": "https://pypi.org/project/parsing/1.6.1/", "requires_dist": null, "requires_python": "", "summary": "A pure-Python module that implements an LR(1) parser generator, as well as CFSM and GLR parser drivers.", "version": "1.6.1" }, "last_serial": 4674851, "releases": { "1.4": [ { "comment_text": "", "digests": { "md5": "c8a407b956c1404b62f0a3da9375cc24", "sha256": "376afaa156b93ca4a39fe7d78ff425e3ac0a3f251267f7e22bef7540d5e838d3" }, "downloads": -1, "filename": "parsing-1.4.tar.gz", "has_sig": false, "md5_digest": "c8a407b956c1404b62f0a3da9375cc24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27302, "upload_time": "2012-12-15T22:45:25", "url": "https://files.pythonhosted.org/packages/73/dd/b36650bdd56ac0fa7b03a0b49aac41ceb0acc03c238d30c31643470d2d62/parsing-1.4.tar.gz" } ], "1.4.1": [ { "comment_text": "", "digests": { "md5": "07b8baaf94fd3925bdd0e81c1078469d", "sha256": "15e6f027534ad379b9a83975c6a9db69e8f2b787667fd30bb65276a1e6563d5e" }, "downloads": -1, "filename": "parsing-1.4.1.tar.gz", "has_sig": false, "md5_digest": "07b8baaf94fd3925bdd0e81c1078469d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27804, "upload_time": "2015-08-14T19:37:17", "url": "https://files.pythonhosted.org/packages/ec/db/404c62de0a6588268e6234bea6cf1ba832987ea4d6a4ffc06a14e2bf836b/parsing-1.4.1.tar.gz" } ], "1.5.0": [ { "comment_text": "", "digests": { "md5": "898d8dacab9225829d295c294548f70a", "sha256": "a1e55f709d4698893ab626beb6c3dc1a6830f3ca47d941f4fc7ace0ba8350400" }, "downloads": -1, "filename": "parsing-1.5.0.tar.gz", "has_sig": false, "md5_digest": "898d8dacab9225829d295c294548f70a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27991, "upload_time": "2015-11-17T18:06:45", "url": "https://files.pythonhosted.org/packages/9e/26/dbc651d5a63ae355b2aa9c0f66112b00897a7b8f6fb48b51136fa97328f1/parsing-1.5.0.tar.gz" } ], "1.6.0": [ { "comment_text": "", "digests": { "md5": "794da574e3f0e6748d6def5fc43e8d57", "sha256": "f80c8ebe38a4fc0ee6d05e0375aa5cd344b913c9f32a97ead2bef2cd3a2e7c07" }, "downloads": -1, "filename": "parsing-1.6.0-py3-none-any.whl", "has_sig": false, "md5_digest": "794da574e3f0e6748d6def5fc43e8d57", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 39407, "upload_time": "2017-07-24T13:47:12", "url": "https://files.pythonhosted.org/packages/10/08/3a18fcb56352506e1446ad7f9e5aac3328738ead5781d1d7aa565e291cc0/parsing-1.6.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1327e44316a1f2db469a91fb2bab78fa", "sha256": "fdda383d26c730b6adcc6355d44bab445c75d7bd09d9777270043f671110b1a4" }, "downloads": -1, "filename": "parsing-1.6.0.tar.gz", "has_sig": false, "md5_digest": "1327e44316a1f2db469a91fb2bab78fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31528, "upload_time": "2017-07-24T13:47:04", "url": "https://files.pythonhosted.org/packages/dc/47/bbfb126ab9cc13bf4105467eebad2e0191cb87ad2ee480d6768e2b9438aa/parsing-1.6.0.tar.gz" } ], "1.6.1": [ { "comment_text": "", "digests": { "md5": "2652aa8e8e9867f6b1b051fb8ddc125a", "sha256": "5ae567ffbe617a225b19e2c5a570b438f62b100b5b3c1a82c730fbc5bc17514f" }, "downloads": -1, "filename": "parsing-1.6.1-py3-none-any.whl", "has_sig": false, "md5_digest": "2652aa8e8e9867f6b1b051fb8ddc125a", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 37373, "upload_time": "2019-01-09T00:49:05", "url": "https://files.pythonhosted.org/packages/fc/19/05dff0134f244265c7cee60f5075ce9236c69b28c8a9767fa5354d15d246/parsing-1.6.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "741138c7dbaa2d64eccb753835db9d61", "sha256": "2718c97704c4afd8f3a84d50b2e75f622b59478465ea7d642e17e9f1ea04878f" }, "downloads": -1, "filename": "parsing-1.6.1.tar.gz", "has_sig": false, "md5_digest": "741138c7dbaa2d64eccb753835db9d61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32620, "upload_time": "2019-01-09T00:49:02", "url": "https://files.pythonhosted.org/packages/f8/ef/5d349a1b9948523e726400742f3e67739a7d93de52a04c5892966f6159ac/parsing-1.6.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2652aa8e8e9867f6b1b051fb8ddc125a", "sha256": "5ae567ffbe617a225b19e2c5a570b438f62b100b5b3c1a82c730fbc5bc17514f" }, "downloads": -1, "filename": "parsing-1.6.1-py3-none-any.whl", "has_sig": false, "md5_digest": "2652aa8e8e9867f6b1b051fb8ddc125a", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 37373, "upload_time": "2019-01-09T00:49:05", "url": "https://files.pythonhosted.org/packages/fc/19/05dff0134f244265c7cee60f5075ce9236c69b28c8a9767fa5354d15d246/parsing-1.6.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "741138c7dbaa2d64eccb753835db9d61", "sha256": "2718c97704c4afd8f3a84d50b2e75f622b59478465ea7d642e17e9f1ea04878f" }, "downloads": -1, "filename": "parsing-1.6.1.tar.gz", "has_sig": false, "md5_digest": "741138c7dbaa2d64eccb753835db9d61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32620, "upload_time": "2019-01-09T00:49:02", "url": "https://files.pythonhosted.org/packages/f8/ef/5d349a1b9948523e726400742f3e67739a7d93de52a04c5892966f6159ac/parsing-1.6.1.tar.gz" } ] }