Name | xcm-parser JSON |
Version |
0.2.7
JSON |
| download |
home_page | None |
Summary | Executable Shlaer-Mellor Class Model Parser |
upload_time | 2024-11-27 15:02:23 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
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. |
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.
|
# Executable Class Model Parser
Parses an *.xcm file (Executable Class Model) to yield an abstract syntax tree using python named tuples
### Why you need this
You need to process an *.xcm file in preparation for populating a database or some other purpose
### Installation
Create or use a python 3.11+ environment. Then
% pip install xcm-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 xcm-parser.parser import ClassModelParser
You can then specify a path as shown:
result = ClassModelParser.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...
% xcm elevator.xcm
The .xcm extension is not necessary, but the file must contain xcm text. See this repository's wiki for
more about the xcm language. The grammar is defined in the [class_model.peg](https://github.com/modelint/xcm-parser/blob/main/src/xcm_parser/class_model.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:
% xcm elevator.xcm -D
This will create a scrall-diagnostics folder in your current working directory and deposite a coupel 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 `xcm-parser.log` in a diagnostics directory within your working directory
Raw data
{
"_id": null,
"home_page": null,
"name": "xcm-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/92/08/5813ff7cc950e67fdb906c3ec50028c3e88409ea0c951299c3141481d351/xcm_parser-0.2.7.tar.gz",
"platform": null,
"description": "# Executable Class Model Parser\n\nParses an *.xcm file (Executable Class Model) to yield an abstract syntax tree using python named tuples\n\n### Why you need this\n\nYou need to process an *.xcm file in preparation for populating a database or some other purpose\n\n### Installation\n\nCreate or use a python 3.11+ environment. Then\n\n% pip install xcm-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 xcm-parser.parser import ClassModelParser\n\nYou can then specify a path as shown:\n\n result = ClassModelParser.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 % xcm elevator.xcm\n\nThe .xcm extension is not necessary, but the file must contain xcm text. See this repository's wiki for\nmore about the xcm language. The grammar is defined in the [class_model.peg](https://github.com/modelint/xcm-parser/blob/main/src/xcm_parser/class_model.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 % xcm elevator.xcm -D\n\nThis will create a scrall-diagnostics folder in your current working directory and deposite a coupel 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 `xcm-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": "Executable Shlaer-Mellor Class Model Parser",
"version": "0.2.7",
"project_urls": {
"documentation": "https://github.com/modelint/xcm-parser/wiki",
"repository": "https://github.com/modelint/xcm-parser"
},
"split_keywords": [
"action language",
" executable uml",
" class model",
" mbse",
" xuml",
" xtuml",
" platform independent",
" sysml"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "eb0bca271136d88a99404a552764f4cc280f680882796ee464f703f80db6a481",
"md5": "48fbd4574bfadcc519f853ea8a0cc731",
"sha256": "5c4de14a28ae88c1c70b22d3d7d78bab2edeb7fb1da0537bc03f522031a1c13d"
},
"downloads": -1,
"filename": "xcm_parser-0.2.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "48fbd4574bfadcc519f853ea8a0cc731",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 13342,
"upload_time": "2024-11-27T15:02:22",
"upload_time_iso_8601": "2024-11-27T15:02:22.241422Z",
"url": "https://files.pythonhosted.org/packages/eb/0b/ca271136d88a99404a552764f4cc280f680882796ee464f703f80db6a481/xcm_parser-0.2.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "92085813ff7cc950e67fdb906c3ec50028c3e88409ea0c951299c3141481d351",
"md5": "abb14c19391cf81d1521c770cbd04e68",
"sha256": "25bd90d74fa3de7d5674d0359aee9a448e13e409e6616517e905b2e5c0c403a3"
},
"downloads": -1,
"filename": "xcm_parser-0.2.7.tar.gz",
"has_sig": false,
"md5_digest": "abb14c19391cf81d1521c770cbd04e68",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 12828,
"upload_time": "2024-11-27T15:02:23",
"upload_time_iso_8601": "2024-11-27T15:02:23.438161Z",
"url": "https://files.pythonhosted.org/packages/92/08/5813ff7cc950e67fdb906c3ec50028c3e88409ea0c951299c3141481d351/xcm_parser-0.2.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-27 15:02:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "modelint",
"github_project": "xcm-parser",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "xcm-parser"
}