rcl
master
C API providing common ROS client library functionality.
include
rcl
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
15
#ifndef RCL__LEXER_H_
16
#define RCL__LEXER_H_
17
18
#include <stddef.h>
19
20
#include "
rcl/allocator.h
"
21
#include "
rcl/macros.h
"
22
#include "
rcl/types.h
"
23
#include "
rcl/visibility_control.h
"
24
25
#if __cplusplus
26
extern
"C"
27
{
28
#endif
29
31
typedef
enum
rcl_lexeme_t
32
{
34
RCL_LEXEME_NONE
= 0,
36
RCL_LEXEME_EOF
= 1,
38
RCL_LEXEME_TILDE_SLASH
= 2,
40
RCL_LEXEME_URL_SERVICE
= 3,
42
RCL_LEXEME_URL_TOPIC
= 4,
44
RCL_LEXEME_COLON
= 5,
46
RCL_LEXEME_NODE
= 6,
48
RCL_LEXEME_NS
= 7,
50
RCL_LEXEME_SEPARATOR
= 8,
52
RCL_LEXEME_BR1
= 9,
54
RCL_LEXEME_BR2
= 10,
56
RCL_LEXEME_BR3
= 11,
58
RCL_LEXEME_BR4
= 12,
60
RCL_LEXEME_BR5
= 13,
62
RCL_LEXEME_BR6
= 14,
64
RCL_LEXEME_BR7
= 15,
66
RCL_LEXEME_BR8
= 16,
68
RCL_LEXEME_BR9
= 17,
70
RCL_LEXEME_TOKEN
= 18,
72
RCL_LEXEME_FORWARD_SLASH
= 19,
74
RCL_LEXEME_WILD_ONE
= 20,
76
RCL_LEXEME_WILD_MULTI
= 21
77
}
rcl_lexeme_t
;
78
79
81
105
RCL_PUBLIC
106
RCL_WARN_UNUSED
107
rcl_ret_t
108
rcl_lexer_analyze
(
109
const
char
* text,
110
rcl_allocator_t
allocator,
111
rcl_lexeme_t
* lexeme,
112
size_t
* length);
113
114
#if __cplusplus
115
}
116
#endif
117
118
#endif // RCL__LEXER_H_
RCL_LEXEME_BR1
\1
Definition:
lexer.h:52
RCL_LEXEME_NONE
Indicates no valid lexeme was found (end of input not reached)
Definition:
lexer.h:34
types.h
RCL_LEXEME_BR6
\6
Definition:
lexer.h:62
rcl_ret_t
rmw_ret_t rcl_ret_t
Definition:
types.h:20
RCL_LEXEME_BR9
\9
Definition:
lexer.h:68
RCL_LEXEME_BR2
\2
Definition:
lexer.h:54
RCL_LEXEME_WILD_ONE
Definition:
lexer.h:74
RCL_LEXEME_URL_SERVICE
rosservice://
Definition:
lexer.h:40
RCL_LEXEME_SEPARATOR
:=
Definition:
lexer.h:50
visibility_control.h
macros.h
RCL_LEXEME_BR5
\5
Definition:
lexer.h:60
RCL_LEXEME_BR3
\3
Definition:
lexer.h:56
RCL_LEXEME_TOKEN
a name between slashes, must match (([a-zA-Z](_)?)|_)([0-9a-zA-Z](_)?)*
Definition:
lexer.h:70
RCL_LEXEME_NS
__ns
Definition:
lexer.h:48
RCL_LEXEME_EOF
Indicates end of input has been reached.
Definition:
lexer.h:36
RCL_WARN_UNUSED
#define RCL_WARN_UNUSED
Ignored return values of functions with this macro will emit a warning.
Definition:
macros.h:25
rcutils_allocator_t
RCL_LEXEME_TILDE_SLASH
~/
Definition:
lexer.h:38
RCL_PUBLIC
#define RCL_PUBLIC
Definition:
visibility_control.h:48
RCL_LEXEME_BR7
\7
Definition:
lexer.h:64
RCL_LEXEME_WILD_MULTI
**
Definition:
lexer.h:76
RCL_LEXEME_BR8
\8
Definition:
lexer.h:66
rcl_lexeme_t
rcl_lexeme_t
Type of lexeme found by lexical analysis.
Definition:
lexer.h:31
RCL_LEXEME_URL_TOPIC
rostopic://
Definition:
lexer.h:42
allocator.h
RCL_LEXEME_COLON
:
Definition:
lexer.h:44
RCL_LEXEME_BR4
\4
Definition:
lexer.h:58
RCL_LEXEME_FORWARD_SLASH
/
Definition:
lexer.h:72
rcl_lexer_analyze
rcl_ret_t rcl_lexer_analyze(const char *text, rcl_allocator_t allocator, rcl_lexeme_t *lexeme, size_t *length)
Do lexical analysis on a string.
RCL_LEXEME_NODE
__node
Definition:
lexer.h:46
Generated by
1.8.14