Go to the documentation of this file.
37 #ifndef GOOGLE_PROTOBUF_IO_TOKENIZER_H__
38 #define GOOGLE_PROTOBUF_IO_TOKENIZER_H__
44 #include <google/protobuf/stubs/common.h>
45 #include <google/protobuf/stubs/logging.h>
46 #include <google/protobuf/port_def.inc>
67 class PROTOBUF_EXPORT ErrorCollector {
94 class PROTOBUF_EXPORT Tokenizer {
150 const Token& current();
253 require_space_after_number_ = require;
259 allow_multiline_strings_ = allow;
264 bool report_whitespace()
const;
265 void set_report_whitespace(
bool report);
269 bool report_newlines()
const;
270 void set_report_newlines(
bool report);
303 bool allow_f_after_float_;
304 CommentStyle comment_style_;
305 bool require_space_after_number_;
306 bool allow_multiline_strings_;
307 bool report_whitespace_ =
false;
308 bool report_newlines_ =
false;
313 static const int kTabWidth = 8;
325 inline void StopRecording();
329 inline void StartToken();
333 inline void EndToken();
348 void ConsumeString(
char delimiter);
356 TokenType ConsumeNumber(
bool started_with_zero,
bool started_with_dot);
380 NextCommentStatus TryConsumeCommentStart();
384 bool TryConsumeWhitespace();
388 bool TryConsumeNewline();
400 template <
typename CharacterClass>
401 inline bool LookingAt();
406 template <
typename CharacterClass>
407 inline bool TryConsumeOne();
410 inline bool TryConsume(
char c);
413 template <
typename CharacterClass>
414 inline void ConsumeZeroOrMore();
419 template <
typename CharacterClass>
420 inline void ConsumeOneOrMore(
const char*
error);
438 #include <google/protobuf/port_undef.inc>
440 #endif // GOOGLE_PROTOBUF_IO_TOKENIZER_H__
const char * prev_trailing_comments
const Descriptor::ReservedRange value
#define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName)
void set_require_space_after_number(bool require)
GRPC_CUSTOM_ZEROCOPYINPUTSTREAM ZeroCopyInputStream
const char * next_leading_comments
void set_comment_style(CommentStyle style)
def ParseInteger(text, is_signed=False, is_long=False)
void set_allow_multiline_strings(bool allow)
static AllocList * Next(int i, AllocList *prev, LowLevelAlloc::Arena *arena)
static uint8 buffer_[kBufferSize]
void AddError(const std::string &message)
unsigned __int64 uint64_t
static void ParseStringAppend(const std::string &text, std::string *output)
strings_internal::ParsedFloat ParseFloat(const char *begin, const char *end, chars_format format_flags)
const char * detached_comments[10]
static void ParseString(const std::string &text, std::string *output)
void set_allow_f_after_float(bool value)
virtual void AddWarning(int, ColumnNumber, const std::string &)
MockErrorCollector error_collector_
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:39