37 #ifndef GOOGLE_PROTOBUF_COMPILER_PARSER_H__
38 #define GOOGLE_PROTOBUF_COMPILER_PARSER_H__
49 namespace protobuf {
class Message; }
56 class SourceLocationTable;
84 source_location_table_ = location_table;
90 error_collector_ = error_collector;
102 require_syntax_identifier_ =
value;
114 stop_after_syntax_identifier_ =
value;
118 class LocationRecorder;
132 void SkipStatement();
136 void SkipRestOfBlock();
147 inline bool LookingAt(
const char* text);
153 bool TryConsume(
const char* text);
160 bool Consume(
const char* text,
const char* error);
163 bool Consume(
const char* text);
165 bool ConsumeIdentifier(
string*
output,
const char* error);
167 bool ConsumeInteger(
int*
output,
const char* error);
169 bool ConsumeSignedInteger(
int*
output,
const char* error);
175 bool ConsumeNumber(
double*
output,
const char* error);
177 bool ConsumeString(
string*
output,
const char* error);
188 bool TryConsumeEndOfDeclaration(
const char* text,
189 const LocationRecorder* location);
190 bool ConsumeEndOfDeclaration(
const char* text,
191 const LocationRecorder* location);
197 void AddError(
int line,
int column,
const string& error);
201 void AddError(
const string& error);
228 void AddPath(
int path_component);
247 void RecordLegacyLocation(
const Message* descriptor,
256 void AttachComments(
string* leading,
string* trailing)
const;
271 bool ParseSyntaxIdentifier();
305 bool ParseOption(
Message* options,
345 int location_field_number_for_nested_type,
354 int location_field_number_for_nested_type,
368 int location_field_number_for_nested_type,
402 const int optionsFieldNumber,
416 bool ParseUserDefinedType(
string* type_name);
438 bool ParseOption(
Message* options,
439 const LocationRecorder& options_location,
448 const LocationRecorder& part_location,
461 bool ParseUninterpretedBlock(
string*
value);
501 int* line,
int* column)
const;
504 void Add(
const Message* descriptor,
506 int line,
int column);
513 pair<const Message*, DescriptorPool::ErrorCollector::ErrorLocation>,
522 #endif // GOOGLE_PROTOBUF_COMPILER_PARSER_H__
SourceLocationTable * source_location_table_
Definition: parser.h:468
Definition: tokenizer.h:57
Definition: descriptor.pb.h:2511
OptionStyle
Definition: parser.h:430
SourceCodeInfo * source_code_info_
Definition: parser.h:467
Definition: descriptor.pb.h:1052
FieldDescriptorProto_Type
Definition: descriptor.pb.h:60
void SetRequireSyntaxIdentifier(bool value)
Definition: parser.h:101
LocationMap location_map_
Definition: parser.h:515
Definition: descriptor.pb.h:2797
#define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName)
Definition: common.h:89
Definition: tokenizer.h:83
string upcoming_doc_comments_
Definition: parser.h:476
Parser * parser_
Definition: parser.h:259
SourceCodeInfo::Location * location_
Definition: parser.h:260
Definition: message.h:165
Definition: descriptor.pb.h:1161
Definition: descriptor.pb.h:1267
bool stop_after_syntax_identifier_
Definition: parser.h:471
TokenType
Definition: tokenizer.h:91
bool had_errors_
Definition: parser.h:469
string syntax_identifier_
Definition: parser.h:472
const string & GetSyntaxIdentifier()
Definition: parser.h:95
void RecordSourceLocationsTo(SourceLocationTable *location_table)
Definition: parser.h:83
Definition: descriptor.pb.h:722
Definition: descriptor.pb.h:546
Definition: descriptor.pb.h:1376
uint64_t uint64
Definition: common.h:178
Definition: descriptor.pb.h:968
#define LIBPROTOBUF_EXPORT
Definition: common.h:105
io::ErrorCollector * error_collector_
Definition: parser.h:466
SPECIFIC_TYPE * Find(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > const &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:74
map< pair< const Message *, DescriptorPool::ErrorCollector::ErrorLocation >, pair< int, int > > LocationMap
Definition: parser.h:514
io::Tokenizer * input_
Definition: parser.h:465
ErrorLocation
Definition: descriptor.h:1257
Definition: BnetFileGenerator.h:47
const FieldDescriptor value
Definition: descriptor.h:1522
bool require_syntax_identifier_
Definition: parser.h:470
Definition: descriptor.pb.h:239
Definition: tokenizer.h:117
FieldDescriptorProto_Label
Definition: descriptor.pb.h:95
void SetStopAfterSyntaxIdentifier(bool value)
Definition: parser.h:113
Definition: descriptor.pb.h:2670
void RecordErrorsTo(io::ErrorCollector *error_collector)
Definition: parser.h:89