ros-parser 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.
- ros_parser/__init__.py +44 -0
- ros_parser/_lark_standalone_runtime.py +3547 -0
- ros_parser/_utils.py +149 -0
- ros_parser/message_path/README.md +264 -0
- ros_parser/message_path/__init__.py +31 -0
- ros_parser/message_path/_standalone_parser.py +18 -0
- ros_parser/message_path/_standalone_parser.pyi +19 -0
- ros_parser/message_path/grammar.lark +81 -0
- ros_parser/message_path/models.py +676 -0
- ros_parser/message_path/parser.py +162 -0
- ros_parser/models.py +209 -0
- ros_parser/py.typed +0 -0
- ros_parser/ros1_msg/__init__.py +23 -0
- ros_parser/ros1_msg/_standalone_parser.py +18 -0
- ros_parser/ros1_msg/_standalone_parser.pyi +5 -0
- ros_parser/ros1_msg/grammar.lark +116 -0
- ros_parser/ros1_msg/parser.py +372 -0
- ros_parser/ros1_msg/schema_parser.py +100 -0
- ros_parser/ros2_msg/__init__.py +23 -0
- ros_parser/ros2_msg/_standalone_parser.py +18 -0
- ros_parser/ros2_msg/_standalone_parser.pyi +17 -0
- ros_parser/ros2_msg/grammar.lark +134 -0
- ros_parser/ros2_msg/parser.py +505 -0
- ros_parser/ros2_msg/schema_parser.py +91 -0
- ros_parser-0.1.0.dist-info/METADATA +101 -0
- ros_parser-0.1.0.dist-info/RECORD +27 -0
- ros_parser-0.1.0.dist-info/WHEEL +4 -0
ros_parser/__init__.py
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""ROS message, service, and action definition parser.
|
|
2
|
+
|
|
3
|
+
Supports both ROS1 and ROS2 message formats.
|
|
4
|
+
|
|
5
|
+
For ROS2, use:
|
|
6
|
+
from ros_parser.ros2_msg import parse_message_string
|
|
7
|
+
from ros_parser import ros2_msg
|
|
8
|
+
|
|
9
|
+
For ROS1, use:
|
|
10
|
+
from ros_parser.ros1_msg import parse_message_string
|
|
11
|
+
from ros_parser import ros1_msg
|
|
12
|
+
|
|
13
|
+
For shared models:
|
|
14
|
+
from ros_parser.models import MessageDefinition, Field, Type, Constant
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from . import ros1_msg, ros2_msg
|
|
18
|
+
from .message_path import ValidationError
|
|
19
|
+
from .models import (
|
|
20
|
+
PRIMITIVE_TYPE_NAMES,
|
|
21
|
+
ActionDefinition,
|
|
22
|
+
Constant,
|
|
23
|
+
Field,
|
|
24
|
+
MessageDefinition,
|
|
25
|
+
PrimitiveType,
|
|
26
|
+
ServiceDefinition,
|
|
27
|
+
Type,
|
|
28
|
+
)
|
|
29
|
+
from .ros2_msg.schema_parser import parse_schema_to_definitions
|
|
30
|
+
|
|
31
|
+
__all__ = [
|
|
32
|
+
"PRIMITIVE_TYPE_NAMES",
|
|
33
|
+
"ActionDefinition",
|
|
34
|
+
"Constant",
|
|
35
|
+
"Field",
|
|
36
|
+
"MessageDefinition",
|
|
37
|
+
"PrimitiveType",
|
|
38
|
+
"ServiceDefinition",
|
|
39
|
+
"Type",
|
|
40
|
+
"ValidationError",
|
|
41
|
+
"parse_schema_to_definitions",
|
|
42
|
+
"ros1_msg",
|
|
43
|
+
"ros2_msg",
|
|
44
|
+
]
|