rcl
master
C API providing common ROS client library functionality.
|
Go to the documentation of this file.
17 #ifndef RCL__LEXER_LOOKAHEAD_H_
18 #define RCL__LEXER_LOOKAHEAD_H_
24 #include "rcl/macros.h"
26 #include "rcl/visibility_control.h"
34 struct rcl_lexer_lookahead2_impl_t;
40 struct rcl_lexer_lookahead2_impl_t *
impl;
202 const char ** lexeme_text,
203 size_t * lexeme_text_length);
236 const char ** lexeme_text,
237 size_t * lexeme_text_length);
264 #endif // RCL__LEXER_LOOKAHEAD_H_
rcl_ret_t rcl_lexer_lookahead2_init(rcl_lexer_lookahead2_t *buffer, const char *text, rcl_allocator_t allocator)
Initialize an rcl_lexer_lookahead2_t instance.
rcl_lexeme_t
Type of lexeme found by lexical analysis.
Definition: lexer.h:33
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:23
rcl_lexer_lookahead2_t rcl_get_zero_initialized_lexer_lookahead2()
Get a zero initialized rcl_lexer_lookahead2_t instance.
rcl_ret_t rcl_lexer_lookahead2_peek2(rcl_lexer_lookahead2_t *buffer, rcl_lexeme_t *next_type1, rcl_lexeme_t *next_type2)
Look ahead at the next two lexemes in the string.
struct rcl_lexer_lookahead2_impl_t * impl
Pointer to the lexer look ahead2 implementation.
Definition: lexer_lookahead.h:40
rcl_ret_t rcl_lexer_lookahead2_accept(rcl_lexer_lookahead2_t *buffer, const char **lexeme_text, size_t *lexeme_text_length)
Accept a lexeme and advance analysis.
rcl_ret_t rcl_lexer_lookahead2_fini(rcl_lexer_lookahead2_t *buffer)
Finalize an instance of an rcl_lexer_lookahead2_t structure.
Track lexical analysis and allow looking ahead 2 lexemes.
Definition: lexer_lookahead.h:37
struct rcl_lexer_lookahead2_t rcl_lexer_lookahead2_t
Track lexical analysis and allow looking ahead 2 lexemes.
rcl_ret_t rcl_lexer_lookahead2_peek(rcl_lexer_lookahead2_t *buffer, rcl_lexeme_t *next_type)
Look ahead at the next lexeme in the string.
const char * rcl_lexer_lookahead2_get_text(const rcl_lexer_lookahead2_t *buffer)
Get the text at the point where it is currently being analyzed.
rcl_ret_t rcl_lexer_lookahead2_expect(rcl_lexer_lookahead2_t *buffer, rcl_lexeme_t type, const char **lexeme_text, size_t *lexeme_text_length)
Require the next lexeme to be a certain type and advance analysis.