ROS 2 rclcpp + rcl - rolling  rolling-e7363f10
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/macros.h"
23 #include "rcl/types.h"
24 #include "rcl/visibility_control.h"
25 
26 #if __cplusplus
27 extern "C"
28 {
29 #endif
30 
32 typedef enum rcl_lexeme_e
33 {
78  // TODO(hidmic): remove when parameter names are standardized to
79  // use slashes in lieu of dots
83 
84 
86 
108 RCL_PUBLIC
109 RCL_WARN_UNUSED
110 rcl_ret_t
112  const char * text,
113  rcl_lexeme_t * lexeme,
114  size_t * length);
115 
116 #if __cplusplus
117 }
118 #endif
119 
120 #endif // RCL__LEXER_H_
rcl_lexeme_e
Type of lexeme found by lexical analysis.
Definition: lexer.h:33
@ RCL_LEXEME_WILD_ONE
Definition: lexer.h:75
@ RCL_LEXEME_NS
__ns
Definition: lexer.h:49
@ RCL_LEXEME_TOKEN
a name between slashes, must match (([a-zA-Z](_)?)|_)([0-9a-zA-Z](_)?)*
Definition: lexer.h:71
@ RCL_LEXEME_NONE
Indicates no valid lexeme was found (end of input not reached)
Definition: lexer.h:35
@ RCL_LEXEME_EOF
Indicates end of input has been reached.
Definition: lexer.h:37
@ RCL_LEXEME_URL_TOPIC
rostopic://
Definition: lexer.h:43
@ RCL_LEXEME_BR2
\2
Definition: lexer.h:55
@ RCL_LEXEME_BR8
\8
Definition: lexer.h:67
@ RCL_LEXEME_BR4
\4
Definition: lexer.h:59
@ RCL_LEXEME_BR9
\9
Definition: lexer.h:69
@ RCL_LEXEME_URL_SERVICE
rosservice://
Definition: lexer.h:41
@ RCL_LEXEME_BR1
\1
Definition: lexer.h:53
@ RCL_LEXEME_BR6
\6
Definition: lexer.h:63
@ RCL_LEXEME_TILDE_SLASH
~/
Definition: lexer.h:39
@ RCL_LEXEME_FORWARD_SLASH
/
Definition: lexer.h:73
@ RCL_LEXEME_SEPARATOR
:=
Definition: lexer.h:51
@ RCL_LEXEME_BR3
\3
Definition: lexer.h:57
@ RCL_LEXEME_BR5
\5
Definition: lexer.h:61
@ RCL_LEXEME_BR7
\7
Definition: lexer.h:65
@ RCL_LEXEME_NODE
__node or __name
Definition: lexer.h:47
@ RCL_LEXEME_DOT
.
Definition: lexer.h:81
@ RCL_LEXEME_WILD_MULTI
**
Definition: lexer.h:77
@ RCL_LEXEME_COLON
:
Definition: lexer.h:45
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:601
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:25