{ "info": { "author": "Timothy Allen", "author_email": "thristian@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Software Development :: Code Generators", "Topic :: Software Development :: Compilers", "Topic :: Text Processing" ], "description": "The Omega Parsing Framework\n===========================\n\n- **Author:** Timothy Allen \n- **Website:** https://gitlab.com/Screwtapello/python-omega\n- **Mailing-list:** \n- **Licence:** The Omega package and all associated documentation and example\n code are placed under the GNU GPLv3. See the included file `LICENCE` for\n details.\n\nIntroduction\n------------\n\nOmega is a framework designed to help you build parsers for text and binary\ndata. It creates a recursive-descent/Parsing-Expression-Grammar parser given\na description of the file-format in the concise Omega language, but if your\nfile-format can't be described in pure Omega, it's easy to extend with Python.\n\nFor example, here's a very simple parser for arithmetic expressions:\n\n >>> import omega\n >>> class ArithmeticParser(omega.BaseParser):\n ... __grammar = \"\"\"\n ... digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7'\n ... | '8' | '9' ;\n ... term = digit+:ds -> (int(\"\".join(ds)))\n ... | '(' sum:s ')' -> (s)\n ... ;\n ... product = term:a '*' product:b -> (a * b)\n ... | term:a '/' product:b -> (a / b)\n ... | term\n ... ;\n ... sum = product:a '+' sum:b -> (a + b)\n ... | product:a '-' sum:b -> (a - b)\n ... | product\n ... ;\n ... \"\"\"\n\nAnd here it is in action:\n\n >>> ArithmeticParser.match(\"1\")\n 1\n >>> ArithmeticParser.match(\"1+1\")\n 2\n >>> ArithmeticParser.match(\"6*9\")\n 54\n >>> ArithmeticParser.match(\"2+3*4\")\n 14\n >>> ArithmeticParser.match(\"(2+3)*4\")\n 20\n\nOmega is heavily based on ideas from Alessandro Warth's [OMeta package][1] for\nSmalltalk and JavaScript, but translated to fit as naturally as possible into\nPython.\n\n[1]: http://tinlizzie.org/~awarth/ometa/\n\nRequirements\n------------\n\nOmega is a pure-Python package, and requires only Python 3.4 or higher to be\ninstalled.\n\nWhat's In The Box\n-----------------\n\n- `README.md` is this file.\n- `TODO.md` is a list of possible future additions to the package.\n- `LICENCE` is the full text of the licence this software is released under,\n the GPLv3.\n- `setup.py` is the standard Python packaging script.\n- `docs` is a subdirectory containing all the documentation for Omega,\n including language and library references, a Python API reference, and\n a tutorial.\n- `examples` is a subdirectory containing various self-contained example\n parsers written in Omega.\n- `omega` is the Python package itself.\n\nInstallation\n------------\n\nOmega uses the standard `distutils` packaging system for Python, so if you have\na source tarball, you should be able to install it with:\n\n python setup.py install\n\n...and of course all the other standard `distutils` commands are available.\n\nDocumentation\n-------------\n\nThe complete documentation is packaged with Omega source releases, and is also\navailable online at https://gitlab.com/Screwtapello/python-omega/wikis/home\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/Screwtapello/python-omega", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "python-omega", "package_url": "https://pypi.org/project/python-omega/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python-omega/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://gitlab.com/Screwtapello/python-omega" }, "release_url": "https://pypi.org/project/python-omega/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "The Omega parsing framework", "version": "0.1.2" }, "last_serial": 1882070, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "8545c4c73f110043d3b44ac3a1f7e1db", "sha256": "4014d1938bcb52843c2678d38c79e473c4c378cdc7561059a084f4c1f205508b" }, "downloads": -1, "filename": "python-omega-0.1.tar.gz", "has_sig": false, "md5_digest": "8545c4c73f110043d3b44ac3a1f7e1db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 53477, "upload_time": "2013-02-13T12:07:52", "url": "https://files.pythonhosted.org/packages/df/df/f298d538cf0c6df142848afc26cb614a5c4da756094fa83c0ae67eb27bf3/python-omega-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "5ccf68b3306a30431c0a633a4d513808", "sha256": "5f9cf6efaa663dd5c948aedd6ca1b50a13bfe9f97fe189a66e482d8abd0af28e" }, "downloads": -1, "filename": "python-omega-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5ccf68b3306a30431c0a633a4d513808", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54545, "upload_time": "2014-12-19T07:32:14", "url": "https://files.pythonhosted.org/packages/6b/87/a2c370cd23d971e015c7269bd02ab8343834762fb14b8cd3063d5d52039a/python-omega-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a48f002aec7016daf301da1e52de9d40", "sha256": "0d978a3aca29f0247178347950896a349a17e4605148861533e5fdb77fc0ef8c" }, "downloads": -1, "filename": "python-omega-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a48f002aec7016daf301da1e52de9d40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54619, "upload_time": "2015-12-30T08:09:53", "url": "https://files.pythonhosted.org/packages/54/39/3fd9c0d8d3653f11c80f7fc66a2ec306ba2632c076e39c98219d6b892e36/python-omega-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a48f002aec7016daf301da1e52de9d40", "sha256": "0d978a3aca29f0247178347950896a349a17e4605148861533e5fdb77fc0ef8c" }, "downloads": -1, "filename": "python-omega-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a48f002aec7016daf301da1e52de9d40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54619, "upload_time": "2015-12-30T08:09:53", "url": "https://files.pythonhosted.org/packages/54/39/3fd9c0d8d3653f11c80f7fc66a2ec306ba2632c076e39c98219d6b892e36/python-omega-0.1.2.tar.gz" } ] }