15 #ifndef RCL__LEXER_LOOKAHEAD_H_ 16 #define RCL__LEXER_LOOKAHEAD_H_ 32 struct rcl_lexer_lookahead2_impl_t;
37 struct rcl_lexer_lookahead2_impl_t *
impl;
199 const char ** lexeme_text,
200 size_t * lexeme_text_length);
233 const char ** lexeme_text,
234 size_t * lexeme_text_length);
261 #endif // RCL__LEXER_LOOKAHEAD_H_
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.
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.
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.
rmw_ret_t rcl_ret_t
Definition: types.h:20
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_fini(rcl_lexer_lookahead2_t *buffer)
Finalize an instance of an rcl_lexer_lookahead2_t structure.
struct rcl_lexer_lookahead2_t rcl_lexer_lookahead2_t
Track lexical analysis and allow looking ahead 2 lexemes.
struct rcl_lexer_lookahead2_impl_t * impl
Definition: lexer_lookahead.h:37
#define RCL_WARN_UNUSED
Ignored return values of functions with this macro will emit a warning.
Definition: macros.h:25
rcl_lexer_lookahead2_t rcl_get_zero_initialized_lexer_lookahead2()
Get a zero initialized rcl_lexer_lookahead2_t instance.
#define RCL_PUBLIC
Definition: visibility_control.h:48
rcl_lexeme_t
Type of lexeme found by lexical analysis.
Definition: lexer.h:31
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.
Track lexical analysis and allow looking ahead 2 lexemes.
Definition: lexer_lookahead.h:35
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.