mls-parser


Namemls-parser JSON
Version 0.0.5 PyPI version JSON
download
home_pageNone
SummaryFlatland Model Layout Sheet Parser
upload_time2024-12-19 19:02:02
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT License Copyright (c) 2019-2023 Leon Starr Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords action language executable uml class model mbse xuml xtuml platform independent sysml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Model Layout Sheet Parser

Parses an *.mls file (Model Layout Sheet) to yield an abstract syntax tree using python named tuples

### Why you need this

You need to process an *.mls file to layout a model diagram

### Installation

Create or use a python 3.11+ environment. Then

% pip install mls-parser

At this point you can invoke the parser via the command line or from your python script.

#### From your python script

You need this import statement at a minimum:

    from mls_parser.parser import LayoutParser

You can then specify a path as shown:

    result = LayoutParser.parse_file(file_input=path_to_file, debug=False)

In either case, `result` will be a list of parsed class model elements. You may find the header of the `visitor.py`
file helpful in interpreting these results.

#### From the command line

This is not the intended usage scenario, but may be helpful for testing or exploration. Since the parser
may generate some diagnostic info you may want to create a fresh working directory and cd into it
first. From there...

    % mls elevator.mls

The .xcm extension is not necessary, but the file must contain xcm text. See this repository's wiki for
more about the mls language. The grammar is defined in the [layout.peg](https://github.com/modelint/mls-parser/blob/main/src/mls_parser/layout.peg) file. (if the link breaks after I do some update to the code, 
just browse through the code looking for the class_model.peg file, and let me know so I can fix it)

You can also specify a debug option like this:

    % mls elevator.mls -D

This will create a scrall-diagnostics folder in your current working directory and deposite a couple of PDFs defining
the parse of both the class model grammar: `class_model_tree.pdf` and your supplied text: `class_model.pdf`.

You should also see a file named `mls_parser.log` in a diagnostics directory within your working directory

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mls-parser",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "action language, executable uml, class model, mbse, xuml, xtuml, platform independent, sysml",
    "author": null,
    "author_email": "Leon Starr <leon_starr@modelint.com>",
    "download_url": "https://files.pythonhosted.org/packages/50/00/99fd3b47b5f6df7762f273bc493ed01ad1fb5bc568999ebb8a93f49102fe/mls_parser-0.0.5.tar.gz",
    "platform": null,
    "description": "# Model Layout Sheet Parser\n\nParses an *.mls file (Model Layout Sheet) to yield an abstract syntax tree using python named tuples\n\n### Why you need this\n\nYou need to process an *.mls file to layout a model diagram\n\n### Installation\n\nCreate or use a python 3.11+ environment. Then\n\n% pip install mls-parser\n\nAt this point you can invoke the parser via the command line or from your python script.\n\n#### From your python script\n\nYou need this import statement at a minimum:\n\n    from mls_parser.parser import LayoutParser\n\nYou can then specify a path as shown:\n\n    result = LayoutParser.parse_file(file_input=path_to_file, debug=False)\n\nIn either case, `result` will be a list of parsed class model elements. You may find the header of the `visitor.py`\nfile helpful in interpreting these results.\n\n#### From the command line\n\nThis is not the intended usage scenario, but may be helpful for testing or exploration. Since the parser\nmay generate some diagnostic info you may want to create a fresh working directory and cd into it\nfirst. From there...\n\n    % mls elevator.mls\n\nThe .xcm extension is not necessary, but the file must contain xcm text. See this repository's wiki for\nmore about the mls language. The grammar is defined in the [layout.peg](https://github.com/modelint/mls-parser/blob/main/src/mls_parser/layout.peg) file. (if the link breaks after I do some update to the code, \njust browse through the code looking for the class_model.peg file, and let me know so I can fix it)\n\nYou can also specify a debug option like this:\n\n    % mls elevator.mls -D\n\nThis will create a scrall-diagnostics folder in your current working directory and deposite a couple of PDFs defining\nthe parse of both the class model grammar: `class_model_tree.pdf` and your supplied text: `class_model.pdf`.\n\nYou should also see a file named `mls_parser.log` in a diagnostics directory within your working directory\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2019-2023 Leon Starr  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Flatland Model Layout Sheet Parser",
    "version": "0.0.5",
    "project_urls": {
        "documentation": "https://github.com/modelint/mls-parser/wiki",
        "repository": "https://github.com/modelint/mls-parser"
    },
    "split_keywords": [
        "action language",
        " executable uml",
        " class model",
        " mbse",
        " xuml",
        " xtuml",
        " platform independent",
        " sysml"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2cde01fe68ca5707a4188579c0b329ea69f1df70999eceec5e72eae86229852f",
                "md5": "7e7d19588e4a7e197fca6261b6211e94",
                "sha256": "1535029f2b44a06b1689f397a3c8e928d2b9cd4f1429b364759dc3a8c526c955"
            },
            "downloads": -1,
            "filename": "mls_parser-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7e7d19588e4a7e197fca6261b6211e94",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 15365,
            "upload_time": "2024-12-19T19:02:01",
            "upload_time_iso_8601": "2024-12-19T19:02:01.661001Z",
            "url": "https://files.pythonhosted.org/packages/2c/de/01fe68ca5707a4188579c0b329ea69f1df70999eceec5e72eae86229852f/mls_parser-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "500099fd3b47b5f6df7762f273bc493ed01ad1fb5bc568999ebb8a93f49102fe",
                "md5": "fde534a0dc99179f5b08525f872cbe3e",
                "sha256": "641f6cb57ae621eec4502d045c5e8983342c9f7d7cf14335e40890d4bb778de9"
            },
            "downloads": -1,
            "filename": "mls_parser-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "fde534a0dc99179f5b08525f872cbe3e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 14724,
            "upload_time": "2024-12-19T19:02:02",
            "upload_time_iso_8601": "2024-12-19T19:02:02.629428Z",
            "url": "https://files.pythonhosted.org/packages/50/00/99fd3b47b5f6df7762f273bc493ed01ad1fb5bc568999ebb8a93f49102fe/mls_parser-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-19 19:02:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "modelint",
    "github_project": "mls-parser",
    "github_not_found": true,
    "lcname": "mls-parser"
}
        
Elapsed time: 0.82731s