TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
google::protobuf::compiler::Parser Class Reference

#include <parser.h>

Classes

class  LocationRecorder
 

Public Member Functions

 Parser ()
 
 ~Parser ()
 
bool Parse (io::Tokenizer *input, FileDescriptorProto *file)
 
void RecordSourceLocationsTo (SourceLocationTable *location_table)
 
void RecordErrorsTo (io::ErrorCollector *error_collector)
 
const string & GetSyntaxIdentifier ()
 
void SetRequireSyntaxIdentifier (bool value)
 
void SetStopAfterSyntaxIdentifier (bool value)
 

Private Types

enum  OptionStyle { OPTION_ASSIGNMENT, OPTION_STATEMENT }
 

Private Member Functions

void SkipStatement ()
 
void SkipRestOfBlock ()
 
bool AtEnd ()
 
bool LookingAt (const char *text)
 
bool LookingAtType (io::Tokenizer::TokenType token_type)
 
bool TryConsume (const char *text)
 
bool Consume (const char *text, const char *error)
 
bool Consume (const char *text)
 
bool ConsumeIdentifier (string *output, const char *error)
 
bool ConsumeInteger (int *output, const char *error)
 
bool ConsumeSignedInteger (int *output, const char *error)
 
bool ConsumeInteger64 (uint64 max_value, uint64 *output, const char *error)
 
bool ConsumeNumber (double *output, const char *error)
 
bool ConsumeString (string *output, const char *error)
 
bool TryConsumeEndOfDeclaration (const char *text, const LocationRecorder *location)
 
bool ConsumeEndOfDeclaration (const char *text, const LocationRecorder *location)
 
void AddError (int line, int column, const string &error)
 
void AddError (const string &error)
 
bool ParseSyntaxIdentifier ()
 
bool ParseTopLevelStatement (FileDescriptorProto *file, const LocationRecorder &root_location)
 
bool ParseMessageDefinition (DescriptorProto *message, const LocationRecorder &message_location, const FileDescriptorProto *containing_file)
 
bool ParseEnumDefinition (EnumDescriptorProto *enum_type, const LocationRecorder &enum_location, const FileDescriptorProto *containing_file)
 
bool ParseServiceDefinition (ServiceDescriptorProto *service, const LocationRecorder &service_location, const FileDescriptorProto *containing_file)
 
bool ParsePackage (FileDescriptorProto *file, const LocationRecorder &root_location, const FileDescriptorProto *containing_file)
 
bool ParseImport (RepeatedPtrField< string > *dependency, RepeatedField< int32 > *public_dependency, RepeatedField< int32 > *weak_dependency, const LocationRecorder &root_location, const FileDescriptorProto *containing_file)
 
bool ParseOption (Message *options, const LocationRecorder &options_location, const FileDescriptorProto *containing_file)
 
bool ParseMessageBlock (DescriptorProto *message, const LocationRecorder &message_location, const FileDescriptorProto *containing_file)
 
bool ParseEnumBlock (EnumDescriptorProto *enum_type, const LocationRecorder &enum_location, const FileDescriptorProto *containing_file)
 
bool ParseServiceBlock (ServiceDescriptorProto *service, const LocationRecorder &service_location, const FileDescriptorProto *containing_file)
 
bool ParseMessageStatement (DescriptorProto *message, const LocationRecorder &message_location, const FileDescriptorProto *containing_file)
 
bool ParseEnumStatement (EnumDescriptorProto *message, const LocationRecorder &enum_location, const FileDescriptorProto *containing_file)
 
bool ParseServiceStatement (ServiceDescriptorProto *message, const LocationRecorder &service_location, const FileDescriptorProto *containing_file)
 
bool ParseMessageField (FieldDescriptorProto *field, RepeatedPtrField< DescriptorProto > *messages, const LocationRecorder &parent_location, int location_field_number_for_nested_type, const LocationRecorder &field_location, const FileDescriptorProto *containing_file)
 
bool ParseMessageFieldNoLabel (FieldDescriptorProto *field, RepeatedPtrField< DescriptorProto > *messages, const LocationRecorder &parent_location, int location_field_number_for_nested_type, const LocationRecorder &field_location, const FileDescriptorProto *containing_file)
 
bool ParseExtensions (DescriptorProto *message, const LocationRecorder &extensions_location, const FileDescriptorProto *containing_file)
 
bool ParseExtend (RepeatedPtrField< FieldDescriptorProto > *extensions, RepeatedPtrField< DescriptorProto > *messages, const LocationRecorder &parent_location, int location_field_number_for_nested_type, const LocationRecorder &extend_location, const FileDescriptorProto *containing_file)
 
bool ParseOneof (OneofDescriptorProto *oneof_decl, DescriptorProto *containing_type, int oneof_index, const LocationRecorder &oneof_location, const LocationRecorder &containing_type_location, const FileDescriptorProto *containing_file)
 
bool ParseEnumConstant (EnumValueDescriptorProto *enum_value, const LocationRecorder &enum_value_location, const FileDescriptorProto *containing_file)
 
bool ParseEnumConstantOptions (EnumValueDescriptorProto *value, const LocationRecorder &enum_value_location, const FileDescriptorProto *containing_file)
 
bool ParseServiceMethod (MethodDescriptorProto *method, const LocationRecorder &method_location, const FileDescriptorProto *containing_file)
 
bool ParseOptions (const LocationRecorder &parent_location, const FileDescriptorProto *containing_file, const int optionsFieldNumber, Message *mutable_options)
 
bool ParseLabel (FieldDescriptorProto::Label *label, const FileDescriptorProto *containing_file)
 
bool ParseType (FieldDescriptorProto::Type *type, string *type_name)
 
bool ParseUserDefinedType (string *type_name)
 
bool ParseFieldOptions (FieldDescriptorProto *field, const LocationRecorder &field_location, const FileDescriptorProto *containing_file)
 
bool ParseDefaultAssignment (FieldDescriptorProto *field, const LocationRecorder &field_location, const FileDescriptorProto *containing_file)
 
bool ParseOption (Message *options, const LocationRecorder &options_location, const FileDescriptorProto *containing_file, OptionStyle style)
 
bool ParseOptionNamePart (UninterpretedOption *uninterpreted_option, const LocationRecorder &part_location, const FileDescriptorProto *containing_file)
 
bool ParseUninterpretedBlock (string *value)
 
 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS (Parser)
 

Private Attributes

io::Tokenizerinput_
 
io::ErrorCollectorerror_collector_
 
SourceCodeInfosource_code_info_
 
SourceLocationTablesource_location_table_
 
bool had_errors_
 
bool require_syntax_identifier_
 
bool stop_after_syntax_identifier_
 
string syntax_identifier_
 
string upcoming_doc_comments_
 

Member Enumeration Documentation

Enumerator
OPTION_ASSIGNMENT 
OPTION_STATEMENT 
430  {
431  OPTION_ASSIGNMENT, // just "name = value"
432  OPTION_STATEMENT // "option name = value;"
433  };

Constructor & Destructor Documentation

google::protobuf::compiler::Parser::Parser ( )
google::protobuf::compiler::Parser::~Parser ( )

Member Function Documentation

void google::protobuf::compiler::Parser::AddError ( int  line,
int  column,
const string &  error 
)
private
void google::protobuf::compiler::Parser::AddError ( const string &  error)
private
bool google::protobuf::compiler::Parser::AtEnd ( )
inlineprivate
bool google::protobuf::compiler::Parser::Consume ( const char *  text,
const char *  error 
)
private
bool google::protobuf::compiler::Parser::Consume ( const char *  text)
private
bool google::protobuf::compiler::Parser::ConsumeEndOfDeclaration ( const char *  text,
const LocationRecorder location 
)
private
bool google::protobuf::compiler::Parser::ConsumeIdentifier ( string *  output,
const char *  error 
)
private
bool google::protobuf::compiler::Parser::ConsumeInteger ( int *  output,
const char *  error 
)
private
bool google::protobuf::compiler::Parser::ConsumeInteger64 ( uint64  max_value,
uint64 output,
const char *  error 
)
private
bool google::protobuf::compiler::Parser::ConsumeNumber ( double *  output,
const char *  error 
)
private
bool google::protobuf::compiler::Parser::ConsumeSignedInteger ( int *  output,
const char *  error 
)
private
bool google::protobuf::compiler::Parser::ConsumeString ( string *  output,
const char *  error 
)
private
const string& google::protobuf::compiler::Parser::GetSyntaxIdentifier ( )
inline
95 { return syntax_identifier_; }
string syntax_identifier_
Definition: parser.h:472
google::protobuf::compiler::Parser::GOOGLE_DISALLOW_EVIL_CONSTRUCTORS ( Parser  )
private
bool google::protobuf::compiler::Parser::LookingAt ( const char *  text)
inlineprivate
bool google::protobuf::compiler::Parser::LookingAtType ( io::Tokenizer::TokenType  token_type)
inlineprivate
bool google::protobuf::compiler::Parser::Parse ( io::Tokenizer input,
FileDescriptorProto file 
)
bool google::protobuf::compiler::Parser::ParseDefaultAssignment ( FieldDescriptorProto field,
const LocationRecorder field_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseEnumBlock ( EnumDescriptorProto enum_type,
const LocationRecorder enum_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseEnumConstant ( EnumValueDescriptorProto enum_value,
const LocationRecorder enum_value_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseEnumConstantOptions ( EnumValueDescriptorProto value,
const LocationRecorder enum_value_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseEnumDefinition ( EnumDescriptorProto enum_type,
const LocationRecorder enum_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseEnumStatement ( EnumDescriptorProto message,
const LocationRecorder enum_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseExtend ( RepeatedPtrField< FieldDescriptorProto > *  extensions,
RepeatedPtrField< DescriptorProto > *  messages,
const LocationRecorder parent_location,
int  location_field_number_for_nested_type,
const LocationRecorder extend_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseExtensions ( DescriptorProto message,
const LocationRecorder extensions_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseFieldOptions ( FieldDescriptorProto field,
const LocationRecorder field_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseImport ( RepeatedPtrField< string > *  dependency,
RepeatedField< int32 > *  public_dependency,
RepeatedField< int32 > *  weak_dependency,
const LocationRecorder root_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseLabel ( FieldDescriptorProto::Label label,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseMessageBlock ( DescriptorProto message,
const LocationRecorder message_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseMessageDefinition ( DescriptorProto message,
const LocationRecorder message_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseMessageField ( FieldDescriptorProto field,
RepeatedPtrField< DescriptorProto > *  messages,
const LocationRecorder parent_location,
int  location_field_number_for_nested_type,
const LocationRecorder field_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseMessageFieldNoLabel ( FieldDescriptorProto field,
RepeatedPtrField< DescriptorProto > *  messages,
const LocationRecorder parent_location,
int  location_field_number_for_nested_type,
const LocationRecorder field_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseMessageStatement ( DescriptorProto message,
const LocationRecorder message_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseOneof ( OneofDescriptorProto oneof_decl,
DescriptorProto containing_type,
int  oneof_index,
const LocationRecorder oneof_location,
const LocationRecorder containing_type_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseOption ( Message options,
const LocationRecorder options_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseOption ( Message options,
const LocationRecorder options_location,
const FileDescriptorProto containing_file,
OptionStyle  style 
)
private
bool google::protobuf::compiler::Parser::ParseOptionNamePart ( UninterpretedOption uninterpreted_option,
const LocationRecorder part_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseOptions ( const LocationRecorder parent_location,
const FileDescriptorProto containing_file,
const int  optionsFieldNumber,
Message mutable_options 
)
private
bool google::protobuf::compiler::Parser::ParsePackage ( FileDescriptorProto file,
const LocationRecorder root_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseServiceBlock ( ServiceDescriptorProto service,
const LocationRecorder service_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseServiceDefinition ( ServiceDescriptorProto service,
const LocationRecorder service_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseServiceMethod ( MethodDescriptorProto method,
const LocationRecorder method_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseServiceStatement ( ServiceDescriptorProto message,
const LocationRecorder service_location,
const FileDescriptorProto containing_file 
)
private
bool google::protobuf::compiler::Parser::ParseSyntaxIdentifier ( )
private
bool google::protobuf::compiler::Parser::ParseTopLevelStatement ( FileDescriptorProto file,
const LocationRecorder root_location 
)
private
bool google::protobuf::compiler::Parser::ParseType ( FieldDescriptorProto::Type type,
string *  type_name 
)
private
bool google::protobuf::compiler::Parser::ParseUninterpretedBlock ( string *  value)
private
bool google::protobuf::compiler::Parser::ParseUserDefinedType ( string *  type_name)
private
void google::protobuf::compiler::Parser::RecordErrorsTo ( io::ErrorCollector error_collector)
inline
89  {
90  error_collector_ = error_collector;
91  }
io::ErrorCollector * error_collector_
Definition: parser.h:466
void google::protobuf::compiler::Parser::RecordSourceLocationsTo ( SourceLocationTable location_table)
inline
83  {
84  source_location_table_ = location_table;
85  }
SourceLocationTable * source_location_table_
Definition: parser.h:468
void google::protobuf::compiler::Parser::SetRequireSyntaxIdentifier ( bool  value)
inline
101  {
103  }
const FieldDescriptor value
Definition: descriptor.h:1522
bool require_syntax_identifier_
Definition: parser.h:470
void google::protobuf::compiler::Parser::SetStopAfterSyntaxIdentifier ( bool  value)
inline
113  {
115  }
bool stop_after_syntax_identifier_
Definition: parser.h:471
const FieldDescriptor value
Definition: descriptor.h:1522
void google::protobuf::compiler::Parser::SkipRestOfBlock ( )
private
void google::protobuf::compiler::Parser::SkipStatement ( )
private
bool google::protobuf::compiler::Parser::TryConsume ( const char *  text)
private
bool google::protobuf::compiler::Parser::TryConsumeEndOfDeclaration ( const char *  text,
const LocationRecorder location 
)
private

Member Data Documentation

io::ErrorCollector* google::protobuf::compiler::Parser::error_collector_
private
bool google::protobuf::compiler::Parser::had_errors_
private
io::Tokenizer* google::protobuf::compiler::Parser::input_
private
bool google::protobuf::compiler::Parser::require_syntax_identifier_
private
SourceCodeInfo* google::protobuf::compiler::Parser::source_code_info_
private
SourceLocationTable* google::protobuf::compiler::Parser::source_location_table_
private
bool google::protobuf::compiler::Parser::stop_after_syntax_identifier_
private
string google::protobuf::compiler::Parser::syntax_identifier_
private
string google::protobuf::compiler::Parser::upcoming_doc_comments_
private

The documentation for this class was generated from the following file: