statable 3.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- statable-3.1.0/PKG-INFO +151 -0
- statable-3.1.0/README.md +124 -0
- statable-3.1.0/codegen/__init__.py +38 -0
- statable-3.1.0/codegen/c_code_generator.py +1752 -0
- statable-3.1.0/codegen/code_merger.py +371 -0
- statable-3.1.0/codegen/code_templates.py +509 -0
- statable-3.1.0/codegen/config.py +167 -0
- statable-3.1.0/codegen/enum_generator.py +377 -0
- statable-3.1.0/codegen/event_queue_generator.py +303 -0
- statable-3.1.0/codegen/interrupt_generator.py +345 -0
- statable-3.1.0/codegen/naming_convention.py +171 -0
- statable-3.1.0/codegen/osal_generator.py +282 -0
- statable-3.1.0/codegen/role_function_generator.py +1244 -0
- statable-3.1.0/codegen/sample_data.py +269 -0
- statable-3.1.0/codegen/state_actions_generator.py +395 -0
- statable-3.1.0/codegen/struct_generator.py +721 -0
- statable-3.1.0/codegen/timer_generator.py +299 -0
- statable-3.1.0/codegen/transition_generator.py +907 -0
- statable-3.1.0/codegen/type_mapper.py +69 -0
- statable-3.1.0/codegen/validate/__init__.py +38 -0
- statable-3.1.0/codegen/validate/change_actions.py +90 -0
- statable-3.1.0/codegen/validate/change_applier.py +416 -0
- statable-3.1.0/codegen/validate/clipboard_manager.py +47 -0
- statable-3.1.0/codegen/validate/data/__init__.py +30 -0
- statable-3.1.0/codegen/validate/data/action_definitions.py +200 -0
- statable-3.1.0/codegen/validate/data/keywords.py +46 -0
- statable-3.1.0/codegen/validate/data/prompt_templates.py +176 -0
- statable-3.1.0/codegen/validate/data/validation_rules.py +205 -0
- statable-3.1.0/codegen/validate/items/__init__.py +30 -0
- statable-3.1.0/codegen/validate/items/base_validator.py +25 -0
- statable-3.1.0/codegen/validate/items/cell_validator.py +275 -0
- statable-3.1.0/codegen/validate/items/custom_type_validator.py +75 -0
- statable-3.1.0/codegen/validate/items/event_validator.py +78 -0
- statable-3.1.0/codegen/validate/items/flag_validator.py +74 -0
- statable-3.1.0/codegen/validate/items/interrupt_validator.py +75 -0
- statable-3.1.0/codegen/validate/items/queue_validator.py +73 -0
- statable-3.1.0/codegen/validate/items/role_function_validator.py +175 -0
- statable-3.1.0/codegen/validate/items/state_validator.py +88 -0
- statable-3.1.0/codegen/validate/items/timer_validator.py +120 -0
- statable-3.1.0/codegen/validate/items/transition_validator.py +113 -0
- statable-3.1.0/codegen/validate/items/variable_validator.py +132 -0
- statable-3.1.0/codegen/validate/logger.py +52 -0
- statable-3.1.0/codegen/validate/models.py +177 -0
- statable-3.1.0/codegen/validate/prompt_generator.py +724 -0
- statable-3.1.0/codegen/validate/response_parser.py +154 -0
- statable-3.1.0/codegen/validate/response_validator.py +275 -0
- statable-3.1.0/codegen/validate/validation_dialog.py +322 -0
- statable-3.1.0/codegen/validate/validator.py +94 -0
- statable-3.1.0/codegen/variable_generator.py +419 -0
- statable-3.1.0/pyproject.toml +48 -0
- statable-3.1.0/setup.cfg +4 -0
- statable-3.1.0/statable/__init__.py +71 -0
- statable-3.1.0/statable/__main__.py +49 -0
- statable-3.1.0/statable/cli.py +251 -0
- statable-3.1.0/statable/global_defs.py +256 -0
- statable-3.1.0/statable/mermaid_gen.py +144 -0
- statable-3.1.0/statable/model.py +426 -0
- statable-3.1.0/statable/parser.py +64 -0
- statable-3.1.0/statable/sample_data.py +435 -0
- statable-3.1.0/statable/shared/__init__.py +24 -0
- statable-3.1.0/statable/shared/condition_library.py +63 -0
- statable-3.1.0/statable/shared/literal_library.py +66 -0
- statable-3.1.0/statable/shared/role_function_library.py +150 -0
- statable-3.1.0/statable/state_machine.py +121 -0
- statable-3.1.0/statable/xml_io.py +1164 -0
- statable-3.1.0/statable.egg-info/PKG-INFO +151 -0
- statable-3.1.0/statable.egg-info/SOURCES.txt +160 -0
- statable-3.1.0/statable.egg-info/dependency_links.txt +1 -0
- statable-3.1.0/statable.egg-info/entry_points.txt +2 -0
- statable-3.1.0/statable.egg-info/requires.txt +7 -0
- statable-3.1.0/statable.egg-info/top_level.txt +3 -0
- statable-3.1.0/statable_gui/__init__.py +23 -0
- statable-3.1.0/statable_gui/action_edit_dialog.py +214 -0
- statable-3.1.0/statable_gui/code_generation_dialog.py +486 -0
- statable-3.1.0/statable_gui/code_generation_settings_dialog.py +522 -0
- statable-3.1.0/statable_gui/common_widgets.py +537 -0
- statable-3.1.0/statable_gui/condition_builder_dialog.py +500 -0
- statable-3.1.0/statable_gui/condition_edit_dialog.py +123 -0
- statable-3.1.0/statable_gui/condition_template_dialog.py +58 -0
- statable-3.1.0/statable_gui/config.py +21 -0
- statable-3.1.0/statable_gui/dialogs.py +439 -0
- statable-3.1.0/statable_gui/event_definition_dialog.py +605 -0
- statable-3.1.0/statable_gui/event_delivery_settings_dialog.py +191 -0
- statable-3.1.0/statable_gui/event_queue_dialog.py +245 -0
- statable-3.1.0/statable_gui/global_defs.py +167 -0
- statable-3.1.0/statable_gui/global_defs_dialog.py +796 -0
- statable-3.1.0/statable_gui/i18n/__init__.py +118 -0
- statable-3.1.0/statable_gui/interrupt_handler_edit_dialog.py +810 -0
- statable-3.1.0/statable_gui/layer_settings_dialog.py +180 -0
- statable-3.1.0/statable_gui/libcntrl/__init__.py +23 -0
- statable-3.1.0/statable_gui/libcntrl/condition_library.py +13 -0
- statable-3.1.0/statable_gui/libcntrl/literal_library.py +13 -0
- statable-3.1.0/statable_gui/libcntrl/literal_management_dialog.py +185 -0
- statable-3.1.0/statable_gui/libcntrl/role_function_edit_dialog.py +145 -0
- statable-3.1.0/statable_gui/libcntrl/role_function_library.py +13 -0
- statable-3.1.0/statable_gui/literal_definition_dialog.py +62 -0
- statable-3.1.0/statable_gui/logger.py +83 -0
- statable-3.1.0/statable_gui/main_window.py +1380 -0
- statable-3.1.0/statable_gui/matrix_table.py +413 -0
- statable-3.1.0/statable_gui/preference_keys.py +18 -0
- statable-3.1.0/statable_gui/preferences.py +74 -0
- statable-3.1.0/statable_gui/role_function_dialog.py +244 -0
- statable-3.1.0/statable_gui/sample_data.py +11 -0
- statable-3.1.0/statable_gui/state_actions_dialog.py +398 -0
- statable-3.1.0/statable_gui/symbol_picker.py +170 -0
- statable-3.1.0/statable_gui/traceball.py +37 -0
- statable-3.1.0/statable_gui/transition_editor_direct/__init__.py +15 -0
- statable-3.1.0/statable_gui/transition_editor_direct/actions_tab.py +856 -0
- statable-3.1.0/statable_gui/transition_editor_direct/code_widget.py +344 -0
- statable-3.1.0/statable_gui/transition_editor_direct/coverage_analyzer.py +163 -0
- statable-3.1.0/statable_gui/transition_editor_direct/dialog.py +335 -0
- statable-3.1.0/statable_gui/transition_editor_direct/draft.py +270 -0
- statable-3.1.0/statable_gui/transition_editor_direct/edit_dialogs.py +160 -0
- statable-3.1.0/statable_gui/transition_editor_direct/overview_tab.py +173 -0
- statable-3.1.0/statable_gui/transition_editor_direct/palette_widget.py +233 -0
- statable-3.1.0/statable_gui/transition_editor_direct/relations_edit_dialog.py +156 -0
- statable-3.1.0/statable_gui/transition_editor_direct/relations_tab.py +230 -0
- statable-3.1.0/statable_gui/transition_editor_direct/system_global_dialog.py +52 -0
- statable-3.1.0/statable_gui/transition_editor_direct/transition_actions_dialog.py +109 -0
- statable-3.1.0/statable_gui/transition_editor_direct/transitions_tab.py +620 -0
- statable-3.1.0/statable_gui/validation_dialog.py +285 -0
- statable-3.1.0/statable_gui/widgets.py +1315 -0
- statable-3.1.0/tests/test_readme_consistency.py +482 -0
- statable-3.1.0/tests/test_v2_2_p1.py +800 -0
- statable-3.1.0/tests/test_v2_2_p12_10.py +455 -0
- statable-3.1.0/tests/test_v2_2_p12_2.py +442 -0
- statable-3.1.0/tests/test_v2_2_p12_5.py +484 -0
- statable-3.1.0/tests/test_v2_2_p12_6.py +383 -0
- statable-3.1.0/tests/test_v2_2_p12_7.py +46 -0
- statable-3.1.0/tests/test_v2_2_p12_8.py +360 -0
- statable-3.1.0/tests/test_v2_2_p12_9.py +301 -0
- statable-3.1.0/tests/test_v2_2_p2.py +712 -0
- statable-3.1.0/tests/test_v2_2_p3.py +578 -0
- statable-3.1.0/tests/test_v2_2_p4a.py +683 -0
- statable-3.1.0/tests/test_v2_2_p4b.py +428 -0
- statable-3.1.0/tests/test_v2_3_p1.py +209 -0
- statable-3.1.0/tests/test_v2_4_p1_merge.py +573 -0
- statable-3.1.0/tests/test_v2_5_p1.py +654 -0
- statable-3.1.0/tests/test_v2_5_p10.py +176 -0
- statable-3.1.0/tests/test_v2_5_p11.py +267 -0
- statable-3.1.0/tests/test_v2_5_p2.py +302 -0
- statable-3.1.0/tests/test_v2_5_p3.py +297 -0
- statable-3.1.0/tests/test_v2_5_p4.py +349 -0
- statable-3.1.0/tests/test_v2_5_p5.py +263 -0
- statable-3.1.0/tests/test_v2_5_p6.py +309 -0
- statable-3.1.0/tests/test_v2_5_p8.py +204 -0
- statable-3.1.0/tests/test_v2_5_p9.py +360 -0
- statable-3.1.0/tests/test_v2_6_p1.py +305 -0
- statable-3.1.0/tests/test_v2_6_p2.py +313 -0
- statable-3.1.0/tests/test_v2_6_p3.py +414 -0
- statable-3.1.0/tests/test_v2_7_p3.py +483 -0
- statable-3.1.0/tests/test_v2_7_p4.py +646 -0
- statable-3.1.0/tests/test_v2_7_p5_validation.py +356 -0
- statable-3.1.0/tests/test_v2_8_p1_ai_prompt.py +475 -0
- statable-3.1.0/tests/test_v2_8_p2_response_parser.py +336 -0
- statable-3.1.0/tests/test_v2_8_p3_response_validator.py +391 -0
- statable-3.1.0/tests/test_v2_8_p4_gui_integration.py +159 -0
- statable-3.1.0/tests/test_v3_0_g1_shared.py +166 -0
- statable-3.1.0/tests/test_v3_0_s1_packaging.py +129 -0
- statable-3.1.0/tests/test_v3_0_s2_public_api.py +136 -0
- statable-3.1.0/tests/test_v3_0_s3_cli.py +205 -0
- statable-3.1.0/tests/test_v3_0_s4_docs.py +134 -0
statable-3.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: statable
|
|
3
|
+
Version: 3.1.0
|
|
4
|
+
Summary: MISRA C:2012-aware state machine design and C code generation for embedded systems
|
|
5
|
+
Author: Hideki Akashi
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/akashi-hideki/StaTable
|
|
8
|
+
Project-URL: Repository, https://github.com/akashi-hideki/StaTable
|
|
9
|
+
Project-URL: Issues, https://github.com/akashi-hideki/StaTable/issues
|
|
10
|
+
Keywords: state machine,MISRA,embedded,code generation,C
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
19
|
+
Classifier: Topic :: Software Development :: Embedded Systems
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
Provides-Extra: gui
|
|
23
|
+
Requires-Dist: PySide6>=6.0; extra == "gui"
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pycparser; extra == "dev"
|
|
27
|
+
|
|
28
|
+
# StaTable
|
|
29
|
+
|
|
30
|
+
**MISRA C:2012-aware state machine design and C code generation for embedded systems.**
|
|
31
|
+
|
|
32
|
+
[](https://github.com/akashi-hideki/StaTable/blob/main/LICENSE)
|
|
33
|
+
[](https://www.python.org/)
|
|
34
|
+
[](https://github.com/akashi-hideki/StaTable)
|
|
35
|
+
[](https://www.misra.org.uk/)
|
|
36
|
+
|
|
37
|
+
StaTable is a Python-based tool for designing state machines and
|
|
38
|
+
generating **MISRA C:2012-compliant C code** for embedded systems.
|
|
39
|
+
It provides a CLI, a Python SDK, and a PySide6 GUI.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Features
|
|
44
|
+
|
|
45
|
+
- **MISRA C:2012-aware C code generation** — validated with `cppcheck` + official MISRA addon
|
|
46
|
+
- **Multi-layer state machines** — Driver / Middleware / Application with priority execution
|
|
47
|
+
- **State actions (Entry / Exit / Do)** — table-driven dispatch with user-code markers
|
|
48
|
+
- **35 validation rules** across 11 categories with AI-assisted diagnostics
|
|
49
|
+
- **Marker-based user code preservation** — regenerate without losing your custom code
|
|
50
|
+
- **CLI + SDK + GUI** — integrate into any workflow
|
|
51
|
+
- **Pure Python** — easy to install and extend
|
|
52
|
+
- **i18n**: English and Simplified Chinese (简体中文)
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Installation
|
|
57
|
+
|
|
58
|
+
**SDK + CLI only:**
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
pip install statable
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**With GUI (PySide6):**
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
pip install "statable[gui]"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Development:**
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
pip install "statable[dev]"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Quick Start
|
|
79
|
+
|
|
80
|
+
### CLI
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
statable-cli version
|
|
84
|
+
statable-cli generate --xml design.xml --out generated/ --format json
|
|
85
|
+
statable-cli validate --xml design.xml --format json --exit-on-error
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Python SDK
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
from statable import State, Event, Transition, StateMachine, StateType, EventKind
|
|
92
|
+
from statable.global_defs import GlobalDefinitions
|
|
93
|
+
from codegen import CCodeGenerator, CodeGenerationConfig
|
|
94
|
+
|
|
95
|
+
sm = StateMachine()
|
|
96
|
+
sm.add_state(State(name="Idle", type=StateType.INITIAL))
|
|
97
|
+
sm.add_state(State(name="Running"))
|
|
98
|
+
sm.add_event(Event(name="START", kind=EventKind.SIGNAL))
|
|
99
|
+
sm.set_initial("Idle")
|
|
100
|
+
sm.add_transition(Transition(source="Idle", event="START", target="Running"))
|
|
101
|
+
|
|
102
|
+
cfg = CodeGenerationConfig()
|
|
103
|
+
gen = CCodeGenerator(config=cfg)
|
|
104
|
+
files = gen.generate_all_layers([("Application", sm)], GlobalDefinitions())
|
|
105
|
+
gen.save_generated_code(files, "generated/")
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### GUI
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
python -m statable
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Menu: **Language / 语言** → switch between **English** and **简体中文**.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Requirements
|
|
119
|
+
|
|
120
|
+
- Python 3.10 or later
|
|
121
|
+
- PySide6 >= 6.0 (for GUI)
|
|
122
|
+
- pycparser (optional, for advanced parsing)
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Links
|
|
127
|
+
|
|
128
|
+
- **Homepage**: https://github.com/akashi-hideki/StaTable
|
|
129
|
+
- **Documentation**: https://github.com/akashi-hideki/StaTable/blob/main/README.md
|
|
130
|
+
- **Issues**: https://github.com/akashi-hideki/StaTable/issues
|
|
131
|
+
- **Chinese README**: https://github.com/akashi-hideki/StaTable/blob/main/README_zh-CN.md
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
Apache License 2.0 — free for commercial and personal use.
|
|
138
|
+
|
|
139
|
+
See [LICENSE](https://github.com/akashi-hideki/StaTable/blob/main/LICENSE) for details.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Acknowledgments
|
|
144
|
+
|
|
145
|
+
- [PySide6](https://www.qt.io/qt-for-python) — Qt 6 for Python
|
|
146
|
+
- [cppcheck](https://cppcheck.sourceforge.io/) — static analysis
|
|
147
|
+
- All contributors and users
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
If StaTable helps you, please consider giving it a ⭐ on GitHub.
|
statable-3.1.0/README.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# StaTable
|
|
2
|
+
|
|
3
|
+
**MISRA C:2012-aware state machine design and C code generation for embedded systems.**
|
|
4
|
+
|
|
5
|
+
[](https://github.com/akashi-hideki/StaTable/blob/main/LICENSE)
|
|
6
|
+
[](https://www.python.org/)
|
|
7
|
+
[](https://github.com/akashi-hideki/StaTable)
|
|
8
|
+
[](https://www.misra.org.uk/)
|
|
9
|
+
|
|
10
|
+
StaTable is a Python-based tool for designing state machines and
|
|
11
|
+
generating **MISRA C:2012-compliant C code** for embedded systems.
|
|
12
|
+
It provides a CLI, a Python SDK, and a PySide6 GUI.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- **MISRA C:2012-aware C code generation** — validated with `cppcheck` + official MISRA addon
|
|
19
|
+
- **Multi-layer state machines** — Driver / Middleware / Application with priority execution
|
|
20
|
+
- **State actions (Entry / Exit / Do)** — table-driven dispatch with user-code markers
|
|
21
|
+
- **35 validation rules** across 11 categories with AI-assisted diagnostics
|
|
22
|
+
- **Marker-based user code preservation** — regenerate without losing your custom code
|
|
23
|
+
- **CLI + SDK + GUI** — integrate into any workflow
|
|
24
|
+
- **Pure Python** — easy to install and extend
|
|
25
|
+
- **i18n**: English and Simplified Chinese (简体中文)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
**SDK + CLI only:**
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
pip install statable
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**With GUI (PySide6):**
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
pip install "statable[gui]"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Development:**
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
pip install "statable[dev]"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Quick Start
|
|
52
|
+
|
|
53
|
+
### CLI
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
statable-cli version
|
|
57
|
+
statable-cli generate --xml design.xml --out generated/ --format json
|
|
58
|
+
statable-cli validate --xml design.xml --format json --exit-on-error
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Python SDK
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
from statable import State, Event, Transition, StateMachine, StateType, EventKind
|
|
65
|
+
from statable.global_defs import GlobalDefinitions
|
|
66
|
+
from codegen import CCodeGenerator, CodeGenerationConfig
|
|
67
|
+
|
|
68
|
+
sm = StateMachine()
|
|
69
|
+
sm.add_state(State(name="Idle", type=StateType.INITIAL))
|
|
70
|
+
sm.add_state(State(name="Running"))
|
|
71
|
+
sm.add_event(Event(name="START", kind=EventKind.SIGNAL))
|
|
72
|
+
sm.set_initial("Idle")
|
|
73
|
+
sm.add_transition(Transition(source="Idle", event="START", target="Running"))
|
|
74
|
+
|
|
75
|
+
cfg = CodeGenerationConfig()
|
|
76
|
+
gen = CCodeGenerator(config=cfg)
|
|
77
|
+
files = gen.generate_all_layers([("Application", sm)], GlobalDefinitions())
|
|
78
|
+
gen.save_generated_code(files, "generated/")
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### GUI
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
python -m statable
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Menu: **Language / 语言** → switch between **English** and **简体中文**.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Requirements
|
|
92
|
+
|
|
93
|
+
- Python 3.10 or later
|
|
94
|
+
- PySide6 >= 6.0 (for GUI)
|
|
95
|
+
- pycparser (optional, for advanced parsing)
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Links
|
|
100
|
+
|
|
101
|
+
- **Homepage**: https://github.com/akashi-hideki/StaTable
|
|
102
|
+
- **Documentation**: https://github.com/akashi-hideki/StaTable/blob/main/README.md
|
|
103
|
+
- **Issues**: https://github.com/akashi-hideki/StaTable/issues
|
|
104
|
+
- **Chinese README**: https://github.com/akashi-hideki/StaTable/blob/main/README_zh-CN.md
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
Apache License 2.0 — free for commercial and personal use.
|
|
111
|
+
|
|
112
|
+
See [LICENSE](https://github.com/akashi-hideki/StaTable/blob/main/LICENSE) for details.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Acknowledgments
|
|
117
|
+
|
|
118
|
+
- [PySide6](https://www.qt.io/qt-for-python) — Qt 6 for Python
|
|
119
|
+
- [cppcheck](https://cppcheck.sourceforge.io/) — static analysis
|
|
120
|
+
- All contributors and users
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
If StaTable helps you, please consider giving it a ⭐ on GitHub.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# codegen package
|
|
2
|
+
"""
|
|
3
|
+
StaTable code generation layer
|
|
4
|
+
|
|
5
|
+
[v1.5 added]
|
|
6
|
+
- Keep re-exports minimal
|
|
7
|
+
- CCodeGenerator loads many submodules at generation time,
|
|
8
|
+
so it is not re-exported at top level (to reduce startup time)
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
__version__ = "3.1.0"
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
'CCodeGenerator',
|
|
15
|
+
'CodeGenerationConfig',
|
|
16
|
+
'ConfigManager',
|
|
17
|
+
'validate',
|
|
18
|
+
'__version__',
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def __getattr__(name):
|
|
23
|
+
"""\n PEP 562 lazy import\n"""
|
|
24
|
+
if name == 'CCodeGenerator':
|
|
25
|
+
from .c_code_generator import CCodeGenerator
|
|
26
|
+
return CCodeGenerator
|
|
27
|
+
if name == 'CodeGenerationConfig':
|
|
28
|
+
from .config import CodeGenerationConfig
|
|
29
|
+
return CodeGenerationConfig
|
|
30
|
+
if name == 'ConfigManager':
|
|
31
|
+
from .config import ConfigManager
|
|
32
|
+
return ConfigManager
|
|
33
|
+
if name == 'validate':
|
|
34
|
+
import importlib
|
|
35
|
+
return importlib.import_module('.validate', __name__)
|
|
36
|
+
raise AttributeError(
|
|
37
|
+
f"module 'codegen' has no attribute {name!r}"
|
|
38
|
+
)
|