Library to generate & parse text format protobufs in C.
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups
Base parsing function
Collaboration diagram for Base parsing function:


static ProtobufCMessage * protobuf_c_text_parse (const ProtobufCMessageDescriptor *descriptor, Scanner *scanner, ProtobufCTextError *result, ProtobufCAllocator *allocator)
 Base function for the API functions. More...

Detailed Description

Function Documentation

static ProtobufCMessage* protobuf_c_text_parse ( const ProtobufCMessageDescriptor *  descriptor,
Scanner scanner,
ProtobufCTextError result,
ProtobufCAllocator *  allocator 

Base function for the API functions.

The API functions take a string or a FILE. This function takes an appropriately initialised Scanner instead. After that it works the same as the protobuf_c_text_from* family of functions.

[in]descriptora ProtobufCMessageDescriptor of a message you want to deserialise.
[in]scannerA Scanner which will be used by the FSM to parse the text format protobuf.
[in,out]resultA ProtobufCTextError instance to record any errors. It is not an option to pass NULL for this and it must be checked for errors.
[in]allocatorAllocator functions.
NULL on error. A ProtobufCMessage representation of the text format protobuf on success.

Definition at line 1183 of file

References ProtobufCTextError::complete, State::error, State::error_str, ProtobufCTextError::error_txt, Token::id, State::msgs, scan(), scanner_free(), STATE_DONE, state_error(), state_free(), state_init(), STATE_OPEN, states, TOK_MALLOC_ERR, and token_free().

Referenced by protobuf_c_text_from_file(), and protobuf_c_text_from_string().

Here is the call graph for this function:

Here is the caller graph for this function: