{ "info": { "author": "Baptiste Fontaine", "author_email": "b@ptistefontaine.fr", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3" ], "description": "=====\nEolas\n=====\n\n**Eolas** is a toy language derived from a `@Maitre_Eolas\u2019 Tweet`_. A few\npeople responded to the Tweet saying it was invalid code and it wouldn\u2019t be\npossible to write such program in any language due to obvious flaws like ``=``\nfor comparison and strings without quotes.\n\nThis project provides an interpreter for that language. It parses the original\nprogram and evaluates it as intended.\n\n.. _`@Maitre_Eolas\u2019 Tweet`: https://twitter.com/Maitre_Eolas/status/830450153391849472\n\nInstall\n-------\n\n**Eolas** is distributed as a Python3 library and executable::\n\n pip install eolas\n\nNote: you may need to use ``pip3`` instead of ``pip`` if your default\ninstallation is Python 2.\n\nRun\n---\n\nRun ``eolas --help`` to see all options. The interpreter reads from ``STDIN``\nunless you give it a filename. You may also evaluate short programs using\n``--eval \"\"``.\n\nYou can set the original memory using ``--set name=value``. Compare the results\nwhen the interpreter is run on the original program::\n\n $ eolas code.eolas\n lose\n $ eolas --set 'avocat=Maitre Eolas' code.eolas\n Win\n\nSpecification\n-------------\n\nThe original code block::\n\n {\n IF (avocat = Maitre Eolas)\n THEN (Result = Win)\n ELSE\n (Result = lose)\n return 0;\n }\n\nIn **Eolas**, a program is a suite of instructions wrapped in curly brackets.\n\nInstructions\n~~~~~~~~~~~~\n\n**Eolas** has three instructions:\n\n* ``IF (condition) THEN (instruction) ELSE (instruction)``: Usual if/then/else.\n The ``ELSE`` part is mandatory as well as parentheses everywhere. You can\u2019t\n have more than one instruction in each part. The condition can be any\n expression.\n* Assignment: assignments in **Eolas** work as expected, using the syntax\n ``name = value``. All variables are global and names may contain spaces.\n* ``return code``: Interrupt the program with the given exit code.\n\nA program may store its result in a special variable ``Result``. It\u2019ll be\nprinted by the interpreter at the end.\n\nExpressions\n~~~~~~~~~~~\n\nOnly three value types are supported: integers, strings, and booleans. There is\nno literal for booleans; they can only be obtained through comparison\noperators. There\u2019s only one such operator for now: ``=`` to check for equality.\n\nThe ``=`` operator is right-associative, so you can write code like this::\n\n { this_is_true = 42 = 42 }\n\nVariables may contain spaces and evaluate to their string representation if\nthey\u2019re not set. There is no other way to write strings, and as such empty\nstrings can\u2019t be written.\n\nNegative integers are not supported.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bfontaine/eolas", "keywords": "", "license": "Copyright \u00a9 2017 \u2013 Baptiste Fontaine\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", "maintainer": "", "maintainer_email": "", "name": "eolas", "package_url": "https://pypi.org/project/eolas/", "platform": "", "project_url": "https://pypi.org/project/eolas/", "project_urls": { "Homepage": "https://github.com/bfontaine/eolas" }, "release_url": "https://pypi.org/project/eolas/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "Eolas interpreter", "version": "0.1.0" }, "last_serial": 2682404, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e7f8cffb76f9bbc4b6450a02aecaa200", "sha256": "5988228bab26ca02feaf40a595b24cc028f3b7efd73ede4951dc9f955ab94ed1" }, "downloads": -1, "filename": "eolas-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e7f8cffb76f9bbc4b6450a02aecaa200", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6350, "upload_time": "2017-03-04T15:46:44", "url": "https://files.pythonhosted.org/packages/78/69/2323c82747a8f1c8a449cd6e9d592986d290be18f6aa1499ef243cc1afab/eolas-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e7f8cffb76f9bbc4b6450a02aecaa200", "sha256": "5988228bab26ca02feaf40a595b24cc028f3b7efd73ede4951dc9f955ab94ed1" }, "downloads": -1, "filename": "eolas-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e7f8cffb76f9bbc4b6450a02aecaa200", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6350, "upload_time": "2017-03-04T15:46:44", "url": "https://files.pythonhosted.org/packages/78/69/2323c82747a8f1c8a449cd6e9d592986d290be18f6aa1499ef243cc1afab/eolas-0.1.0.tar.gz" } ] }