nos 0.1.0__py3-none-any.whl
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.
- nos/__init__.py +11 -0
- nos/ast/__init__.py +19 -0
- nos/ast/builder.py +1583 -0
- nos/ast/nodes.py +437 -0
- nos/ast/visitor.py +180 -0
- nos/codegen/__init__.py +16 -0
- nos/codegen/generator.py +79 -0
- nos/codegen/launch_transpiler.py +284 -0
- nos/codegen/python_generator.py +754 -0
- nos/compiler/__init__.py +10 -0
- nos/compiler/main.py +203 -0
- nos/compiler/pipeline.py +555 -0
- nos/runtime/__init__.py +19 -0
- nos/runtime/decorators.py +134 -0
- nos/runtime/nos_node.py +126 -0
- nos/runtime/qos.py +105 -0
- nos/security/__init__.py +39 -0
- nos/security/sanitizer.py +700 -0
- nos/semantic/__init__.py +13 -0
- nos/semantic/analyzer.py +661 -0
- nos/semantic/symbol_table.py +227 -0
- nos-0.1.0.dist-info/METADATA +332 -0
- nos-0.1.0.dist-info/RECORD +37 -0
- nos-0.1.0.dist-info/WHEEL +5 -0
- nos-0.1.0.dist-info/entry_points.txt +2 -0
- nos-0.1.0.dist-info/licenses/LICENSE +202 -0
- nos-0.1.0.dist-info/top_level.txt +2 -0
- tests/__init__.py +10 -0
- tests/conftest.py +50 -0
- tests/integration/__init__.py +0 -0
- tests/integration/test_callbacks.py +64 -0
- tests/integration/test_pipeline.py +245 -0
- tests/unit/__init__.py +0 -0
- tests/unit/test_analyzer.py +235 -0
- tests/unit/test_ast_builder.py +229 -0
- tests/unit/test_generators.py +304 -0
- tests/unit/test_sanitizer.py +622 -0
nos/__init__.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""NOS (Node Orchestration System) - A declarative DSL for ROS2 robotics.
|
|
2
|
+
|
|
3
|
+
NOS Phase 1 (Core Language) provides:
|
|
4
|
+
- ANTLR4 grammar definitions for .nos, .node, and .interface files
|
|
5
|
+
- AST representation and semantic analysis
|
|
6
|
+
- Python code generator for ROS2 nodes
|
|
7
|
+
- Launch file transpiler
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
__version__ = "0.1.0"
|
|
11
|
+
__all__ = ["compiler", "ast", "semantic", "codegen"]
|
nos/ast/__init__.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""AST (Abstract Syntax Tree) module for NOS.
|
|
2
|
+
|
|
3
|
+
Contains all AST node definitions and the builder that converts
|
|
4
|
+
ANTLR4 parse trees to AST nodes.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from .nodes import *
|
|
8
|
+
from .visitor import ASTVisitor
|
|
9
|
+
from .builder import ASTBuilder
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
'ASTNode', 'PackageDecl', 'NodeDecl', 'LaunchDecl',
|
|
13
|
+
'ParameterDecl', 'SubscriptionDecl', 'PublicationDecl',
|
|
14
|
+
'ServiceDecl', 'ActionDecl', 'CallbackDecl',
|
|
15
|
+
'Type', 'PrimitiveType', 'ListType', 'StructType', 'QualifiedType',
|
|
16
|
+
'Expression', 'LiteralExpression', 'IdentifierExpression',
|
|
17
|
+
'Constraint', 'LifecycleDecl', 'ComponentDecl',
|
|
18
|
+
'ASTVisitor', 'ASTBuilder'
|
|
19
|
+
]
|