{ "info": { "author": "Matthew Oertle", "author_email": "moertle@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Topic :: Software Development :: Testing" ], "description": "=====\nnelly\n=====\nA grammar-based generator.\n--------------------------\nMatthew Oertle \n\n.. code-block::\n\n <%pre\n import sys\n %>\n\n ::NT(start)\n : 'A' # comment\n | 'B' <% print($$) %>\n ;\n\n <%post\n print($$)\n %>\n\nConstants\n=========\n\nConstants in productions can consist of double-quoted strings, single-quoted strings, decimal, hexadecimal, or octal numbers.\n\n.. code-block::\n\n A: \"A\" | 'A' | 65 | 0x41 | 0101;\n\nConcatenation\n=============\n\nProductions are concatenated when they are seperated by white-space.\n\n.. code-block::\n\n CONCAT: \"CONC\" 0x41 \"TEN\" 65 \"TION\";\n\nSelection\n=========\n\nWhen multiple productions are present one is chosen at random.\n\n.. code-block::\n\n NUMBER: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';\n\nGrouping\n========\n\n.. code-block::\n\n GRP: ('A'|'B') ('C'|'D');\n\nPossible values are 'AC', 'AD', 'BC', or 'BD'.\n\nRanges\n======\n\n.. code-block::\n\n NUM1: ('0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'){3};\n NUM2: ('0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'){1,5};\n\nNUM1 will generate a 3-digit number while NUM2 will generate a number of random length between 1 and 5 digits.\n\nSlicing\n=======\n\nA sub-string of a production can be referenced using indices.\n\n.. code-block::\n\n SLICE1: \"0123456789\" [:]; // 0123456789\n SLICE2: \"0123456789\" [4]; // 4\n SLICE3: \"0123456789\" [:4]; // 0123\n SLICE4: \"0123456789\" [4:]; // 456789\n SLICE5: \"0123456789\" [2:8]; // 234567\n SLICE6: \"0123456789\" [-4]; // 6\n SLICE7: \"0123456789\" [-4:]; // 6789\n SLICE8: \"0123456789\" [:-4]; // 012345\n SLICE9: \"0123456789\" [2:-2]; // 234567\n\nThe output of each production is documented in the comment proceeding it.\n\nInline Python\n=============\n\n.. code-block::\n\n <%pre\n import base64\n %>\n\n NT: %base64.b64encode('string');\n\nNon-Terminals\n=============\n\n.. code-block::\n\n NT1: \"The value of NT2 is \" NT2;\n NT2: \"substitution\";\n\nSemantic Actions\n================\n\n$$\n\n.. code-block::\n\n PSA1: PSA2 <% var = $$ %>;\n PSA2: \"one\" | \"two\";\n\nIn this example the Python variable **var** will contain either 'one' or 'two' for future use.\n\nVariable Non-Terminals\n======================\n\n$*\n\n.. code-block::\n\n NT1: $NT2;\n\n $NT2:\n \"I WILL BE SUBSTITUTED INTO NT1 IN LOWERCASE\"\n <%\n $* = $$.lower()\n %>\n ;\n\n\nBack Reference\n==============\n\n.. code-block::\n\n BR: \"A\" | \"B\";\n NT: BR \\BR;\n\n.. code-block::\n\n $BR: (\"a\"|\"b\") <% $* = $$.upper() %>;\n NT: $BR \\$BR;\n\nIn both cases **NT** will generate the string 'AA' or 'BB' but not 'AB' or 'BA'.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/moertle/nelly", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "nelly", "package_url": "https://pypi.org/project/nelly/", "platform": "", "project_url": "https://pypi.org/project/nelly/", "project_urls": { "Homepage": "https://github.com/moertle/nelly" }, "release_url": "https://pypi.org/project/nelly/0.6.1/", "requires_dist": null, "requires_python": "", "summary": "Python Test Case Generator", "version": "0.6.1" }, "last_serial": 4816444, "releases": { "0.4.1": [ { "comment_text": "", "digests": { "md5": "1739ce46d91ea69c32a8e355b2454377", "sha256": "15506c7bfbc6c555ad15b3e5ac52ed3db7f98b2c11a9f9d0c7e1f8e1bba716e3" }, "downloads": -1, "filename": "nelly-0.4.1.tar.gz", "has_sig": false, "md5_digest": "1739ce46d91ea69c32a8e355b2454377", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11245, "upload_time": "2016-03-31T20:23:43", "url": "https://files.pythonhosted.org/packages/39/e5/c1a774b6debe29b9b537b5df4adf8895aac9c43b9a72574dc8281f0af82a/nelly-0.4.1.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "7bea6882fd2903a4cc69b287306e264d", "sha256": "18184b5e72acfad0c7370619bfc4c019d216af526fc85b6c7c79734c64d6b80d" }, "downloads": -1, "filename": "nelly-0.4.3.tar.gz", "has_sig": false, "md5_digest": "7bea6882fd2903a4cc69b287306e264d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12023, "upload_time": "2017-06-07T12:47:05", "url": "https://files.pythonhosted.org/packages/ae/81/2c0bed7d3f84fa02cc9a45f09b163a1f03d3a199cb600ee373b0251d561b/nelly-0.4.3.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "bb8a9cf56ff90e577e5d6ab528412b1b", "sha256": "fe48e26c02bc0f913a6138496156a2371deabe1ab835b0148eaba781d3ca7c2c" }, "downloads": -1, "filename": "nelly-0.6.0.tar.gz", "has_sig": false, "md5_digest": "bb8a9cf56ff90e577e5d6ab528412b1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12143, "upload_time": "2019-01-10T21:52:45", "url": "https://files.pythonhosted.org/packages/8d/cb/35945fc46a0c023dda4da33adea245f0c9b088b6c86d5b6326f5261d3796/nelly-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "a047bdc022b0657692d377c200039666", "sha256": "ead7b62ed699663460789ec5d2da033b8d243c4de0dd1080f14d5c70334e1973" }, "downloads": -1, "filename": "nelly-0.6.1.tar.gz", "has_sig": false, "md5_digest": "a047bdc022b0657692d377c200039666", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14073, "upload_time": "2019-02-13T16:19:01", "url": "https://files.pythonhosted.org/packages/72/8d/f0651372418b09dd350ec67fdc4b38aa92b52a666991cd559495022dc584/nelly-0.6.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a047bdc022b0657692d377c200039666", "sha256": "ead7b62ed699663460789ec5d2da033b8d243c4de0dd1080f14d5c70334e1973" }, "downloads": -1, "filename": "nelly-0.6.1.tar.gz", "has_sig": false, "md5_digest": "a047bdc022b0657692d377c200039666", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14073, "upload_time": "2019-02-13T16:19:01", "url": "https://files.pythonhosted.org/packages/72/8d/f0651372418b09dd350ec67fdc4b38aa92b52a666991cd559495022dc584/nelly-0.6.1.tar.gz" } ] }