ROS 2 rclcpp + rcl - kilted  kilted
ROS 2 C++ Client Library with ROS Client Library
lexer.h
Go to the documentation of this file.
1 // Copyright 2018 Open Source Robotics Foundation, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
16 
17 #ifndef RCL__LEXER_H_
18 #define RCL__LEXER_H_
19 
20 #include <stddef.h>
21 
22 #include "rcl/allocator.h"
23 #include "rcl/macros.h"
24 #include "rcl/types.h"
25 #include "rcl/visibility_control.h"
26 
27 #if __cplusplus
28 extern "C"
29 {
30 #endif
31 
33 typedef enum rcl_lexeme_e
34 {
79  // TODO(hidmic): remove when parameter names are standardized to
80  // use slashes in lieu of dots
84 
85 
87 
109 RCL_PUBLIC
110 RCL_WARN_UNUSED
111 rcl_ret_t
113  const char * text,
114  rcl_lexeme_t * lexeme,
115  size_t * length);
116 
117 #if __cplusplus
118 }
119 #endif
120 
121 #endif // RCL__LEXER_H_
rcl_lexeme_e
Type of lexeme found by lexical analysis.
Definition: lexer.h:34
@ RCL_LEXEME_WILD_ONE
Definition: lexer.h:76
@ RCL_LEXEME_NS
__ns
Definition: lexer.h:50
@ RCL_LEXEME_TOKEN
a name between slashes, must match (([a-zA-Z](_)?)|_)([0-9a-zA-Z](_)?)*
Definition: lexer.h:72
@ RCL_LEXEME_NONE
Indicates no valid lexeme was found (end of input not reached)
Definition: lexer.h:36
@ RCL_LEXEME_EOF
Indicates end of input has been reached.
Definition: lexer.h:38
@ RCL_LEXEME_URL_TOPIC
rostopic://
Definition: lexer.h:44
@ RCL_LEXEME_BR2
\2
Definition: lexer.h:56
@ RCL_LEXEME_BR8
\8
Definition: lexer.h:68
@ RCL_LEXEME_BR4
\4
Definition: lexer.h:60
@ RCL_LEXEME_BR9
\9
Definition: lexer.h:70
@ RCL_LEXEME_URL_SERVICE
rosservice://
Definition: lexer.h:42
@ RCL_LEXEME_BR1
\1
Definition: lexer.h:54
@ RCL_LEXEME_BR6
\6
Definition: lexer.h:64
@ RCL_LEXEME_TILDE_SLASH
~/
Definition: lexer.h:40
@ RCL_LEXEME_FORWARD_SLASH
/
Definition: lexer.h:74
@ RCL_LEXEME_SEPARATOR
:=
Definition: lexer.h:52
@ RCL_LEXEME_BR3
\3
Definition: lexer.h:58
@ RCL_LEXEME_BR5
\5
Definition: lexer.h:62
@ RCL_LEXEME_BR7
\7
Definition: lexer.h:66
@ RCL_LEXEME_NODE
__node or __name
Definition: lexer.h:48
@ RCL_LEXEME_DOT
.
Definition: lexer.h:82
@ RCL_LEXEME_WILD_MULTI
**
Definition: lexer.h:78
@ RCL_LEXEME_COLON
:
Definition: lexer.h:46
enum rcl_lexeme_e rcl_lexeme_t
Type of lexeme found by lexical analysis.
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_lexer_analyze(const char *text, rcl_lexeme_t *lexeme, size_t *length)
Do lexical analysis on a string.
Definition: lexer.c:598
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:24