pyparsing


Namepyparsing JSON
Version 2.2.0 PyPI version JSON
download
home_pagehttp://pyparsing.wikispaces.com/
SummaryPython parsing module
upload_time2017-03-06 02:35:08
maintainerNone
docs_urlhttp://pythonhosted.org/pyparsing/
authorPaul McGuire
requires_pythonNone
licenseMIT License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ====================================
PyParsing -- A Python Parsing Module
====================================

Introduction
============

The pyparsing module is an alternative approach to creating and executing 
simple grammars, vs. the traditional lex/yacc approach, or the use of 
regular expressions.  The pyparsing module provides a library of classes 
that client code uses to construct the grammar directly in Python code.

Here is a program to parse "Hello, World!" (or any greeting of the form 
"<salutation>, <addressee>!"):

    from pyparsing import Word, alphas
    greet = Word( alphas ) + "," + Word( alphas ) + "!"
    hello = "Hello, World!"
    print hello, "->", greet.parseString( hello )

The program outputs the following:

    Hello, World! -> ['Hello', ',', 'World', '!']

The Python representation of the grammar is quite readable, owing to the 
self-explanatory class names, and the use of '+', '|' and '^' operator 
definitions.

The parsed results returned from parseString() can be accessed as a 
nested list, a dictionary, or an object with named attributes.

The pyparsing module handles some of the problems that are typically 
vexing when writing text parsers:
- extra or missing whitespace (the above program will also handle 
  "Hello,World!", "Hello  ,  World  !", etc.)
- quoted strings
- embedded comments

The .zip file includes examples of a simple SQL parser, simple CORBA IDL 
parser, a config file parser, a chemical formula parser, and a four-
function algebraic notation parser.  It also includes a simple how-to 
document, and a UML class diagram of the library's classes.



Installation
============

Do the usual:

    python setup.py install
    
(pyparsing requires Python 2.6 or later.)

Or corresponding commands using pip, easy_install, or wheel:

    pip install pyparsing
    
    easy_install pyparsing
    
    wheel install pyparsing


Documentation
=============

See:

    HowToUsePyparsing.html


License
=======

    MIT License. See header of pyparsing.py

History
=======

    See CHANGES file.

            

Raw data

            {
    "maintainer": null, 
    "docs_url": "http://pythonhosted.org/pyparsing/", 
    "requires_python": null, 
    "maintainer_email": null, 
    "cheesecake_code_kwalitee_id": null, 
    "keywords": null, 
    "upload_time": "2017-03-06 02:35:08", 
    "author": "Paul McGuire", 
    "home_page": "http://pyparsing.wikispaces.com/", 
    "download_url": "https://pypi.python.org/packages/3c/ec/a94f8cf7274ea60b5413df054f82a8980523efd712ec55a59e7c3357cf7c/pyparsing-2.2.0.tar.gz", 
    "platform": "UNKNOWN", 
    "version": "2.2.0", 
    "cheesecake_documentation_id": null, 
    "description": "====================================\nPyParsing -- A Python Parsing Module\n====================================\n\nIntroduction\n============\n\r\nThe pyparsing module is an alternative approach to creating and executing \r\nsimple grammars, vs. the traditional lex/yacc approach, or the use of \r\nregular expressions.  The pyparsing module provides a library of classes \r\nthat client code uses to construct the grammar directly in Python code.\r\n\r\nHere is a program to parse \"Hello, World!\" (or any greeting of the form \r\n\"<salutation>, <addressee>!\"):\r\n\r\n    from pyparsing import Word, alphas\r\n    greet = Word( alphas ) + \",\" + Word( alphas ) + \"!\"\r\n    hello = \"Hello, World!\"\r\n    print hello, \"->\", greet.parseString( hello )\r\n\r\nThe program outputs the following:\r\n\r\n    Hello, World! -> ['Hello', ',', 'World', '!']\r\n\r\nThe Python representation of the grammar is quite readable, owing to the \r\nself-explanatory class names, and the use of '+', '|' and '^' operator \r\ndefinitions.\r\n\r\nThe parsed results returned from parseString() can be accessed as a \r\nnested list, a dictionary, or an object with named attributes.\r\n\r\nThe pyparsing module handles some of the problems that are typically \r\nvexing when writing text parsers:\r\n- extra or missing whitespace (the above program will also handle \r\n  \"Hello,World!\", \"Hello  ,  World  !\", etc.)\r\n- quoted strings\r\n- embedded comments\r\n\r\nThe .zip file includes examples of a simple SQL parser, simple CORBA IDL \r\nparser, a config file parser, a chemical formula parser, and a four-\r\nfunction algebraic notation parser.  It also includes a simple how-to \r\ndocument, and a UML class diagram of the library's classes.\n\n\n\nInstallation\n============\n\nDo the usual:\n\n    python setup.py install\r\n    \r\n(pyparsing requires Python 2.6 or later.)\n\r\nOr corresponding commands using pip, easy_install, or wheel:\r\n\r\n    pip install pyparsing\r\n    \r\n    easy_install pyparsing\r\n    \r\n    wheel install pyparsing\r\n\n\nDocumentation\n=============\n\nSee:\n\n    HowToUsePyparsing.html\n\n\nLicense\n=======\n\n    MIT License. See header of pyparsing.py\n\nHistory\n=======\n\n    See CHANGES file.\r\n", 
    "lcname": "pyparsing", 
    "bugtrack_url": "", 
    "github": false, 
    "name": "pyparsing", 
    "license": "MIT License", 
    "summary": "Python parsing module", 
    "split_keywords": [], 
    "author_email": "ptmcg@users.sourceforge.net", 
    "urls": [
        {
            "has_sig": false, 
            "upload_time": "2017-03-06T02:35:15", 
            "comment_text": "", 
            "python_version": "3.5", 
            "url": "https://pypi.python.org/packages/6a/8a/718fd7d3458f9fab8e67186b00abdd345b639976bc7fb3ae722e1b026a50/pyparsing-2.2.0-py2.py3-none-any.whl", 
            "md5_digest": "7247e7896688eff4bc8c7fc5d0cdd2b0", 
            "downloads": 0, 
            "filename": "pyparsing-2.2.0-py2.py3-none-any.whl", 
            "packagetype": "bdist_wheel", 
            "path": "6a/8a/718fd7d3458f9fab8e67186b00abdd345b639976bc7fb3ae722e1b026a50/pyparsing-2.2.0-py2.py3-none-any.whl", 
            "size": 56385
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-03-06T02:35:08", 
            "comment_text": "", 
            "python_version": "source", 
            "url": "https://pypi.python.org/packages/3c/ec/a94f8cf7274ea60b5413df054f82a8980523efd712ec55a59e7c3357cf7c/pyparsing-2.2.0.tar.gz", 
            "md5_digest": "0214e42d63af850256962b6744c948d9", 
            "downloads": 0, 
            "filename": "pyparsing-2.2.0.tar.gz", 
            "packagetype": "sdist", 
            "path": "3c/ec/a94f8cf7274ea60b5413df054f82a8980523efd712ec55a59e7c3357cf7c/pyparsing-2.2.0.tar.gz", 
            "size": 1232522
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-03-06T02:35:18", 
            "comment_text": "", 
            "python_version": "any", 
            "url": "https://pypi.python.org/packages/81/a3/9907cbc922b76a9086388c0f822737f1d87f2debae8e3ff2f6dd998f97c2/pyparsing-2.2.0.win32-py2.6.exe", 
            "md5_digest": "1e695ab24f2c8620a1bbb0f1e76b339f", 
            "downloads": 0, 
            "filename": "pyparsing-2.2.0.win32-py2.6.exe", 
            "packagetype": "bdist_wininst", 
            "path": "81/a3/9907cbc922b76a9086388c0f822737f1d87f2debae8e3ff2f6dd998f97c2/pyparsing-2.2.0.win32-py2.6.exe", 
            "size": 253268
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-03-06T02:35:22", 
            "comment_text": "", 
            "python_version": "any", 
            "url": "https://pypi.python.org/packages/81/af/21aa186ef834f9fa046392ca2493b298e6258d6401d291e7deb020ecf383/pyparsing-2.2.0.win32-py2.7.exe", 
            "md5_digest": "19de1501641e97a0c2d0b8567c13f227", 
            "downloads": 0, 
            "filename": "pyparsing-2.2.0.win32-py2.7.exe", 
            "packagetype": "bdist_wininst", 
            "path": "81/af/21aa186ef834f9fa046392ca2493b298e6258d6401d291e7deb020ecf383/pyparsing-2.2.0.win32-py2.7.exe", 
            "size": 253268
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-03-06T02:35:27", 
            "comment_text": "", 
            "python_version": "any", 
            "url": "https://pypi.python.org/packages/22/71/a8354e9f5f58f3dd6a2c7e0ef47d31164ec5785ad737f58f3e51fe6c0e14/pyparsing-2.2.0.win32-py3.3.exe", 
            "md5_digest": "f2a7560c3f0e25d679f6dad04467f613", 
            "downloads": 0, 
            "filename": "pyparsing-2.2.0.win32-py3.3.exe", 
            "packagetype": "bdist_wininst", 
            "path": "22/71/a8354e9f5f58f3dd6a2c7e0ef47d31164ec5785ad737f58f3e51fe6c0e14/pyparsing-2.2.0.win32-py3.3.exe", 
            "size": 248148
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-03-06T02:35:31", 
            "comment_text": "", 
            "python_version": "any", 
            "url": "https://pypi.python.org/packages/00/2a/a7a10fb073d3744c134297236263ede6ce67fec3e40839dda5d56fe86a5c/pyparsing-2.2.0.win32-py3.4.exe", 
            "md5_digest": "756f1d0378f437c5693e901811f0ef47", 
            "downloads": 0, 
            "filename": "pyparsing-2.2.0.win32-py3.4.exe", 
            "packagetype": "bdist_wininst", 
            "path": "00/2a/a7a10fb073d3744c134297236263ede6ce67fec3e40839dda5d56fe86a5c/pyparsing-2.2.0.win32-py3.4.exe", 
            "size": 248148
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-03-06T02:35:36", 
            "comment_text": "", 
            "python_version": "any", 
            "url": "https://pypi.python.org/packages/5f/9b/8818b69b5cdbe2852106ecca849bdf990c4fc7cb1fb1bc8813bf117be19c/pyparsing-2.2.0.win32-py3.5.exe", 
            "md5_digest": "855002f511d806ce830958f7f541af02", 
            "downloads": 0, 
            "filename": "pyparsing-2.2.0.win32-py3.5.exe", 
            "packagetype": "bdist_wininst", 
            "path": "5f/9b/8818b69b5cdbe2852106ecca849bdf990c4fc7cb1fb1bc8813bf117be19c/pyparsing-2.2.0.win32-py3.5.exe", 
            "size": 517460
        }
    ], 
    "_id": null, 
    "cheesecake_installability_id": null
}