libcluon
0.0.148
|
#include "cluon/MessageParser.hpp"
#include "cluon/stringtoolbox.hpp"
#include "cpp-peglib/peglib.h"
#include <algorithm>
#include <functional>
#include <iostream>
#include <memory>
#include <regex>
#include <string>
#include <vector>
Namespaces | |
cluon | |
Functions | |
else | cluon::if ("CHARACTER"==f->name) |
else | if ("IDENTIFIER"==f->original_name) |
if (_fieldIdentifier.empty()) | |
if (0< STRING_TO_DATATYPE_MAP.count(_fieldDataType)) | |
mf | fieldDataTypeName (::stringtoolbox::trim(_fieldDataType)) |
mf | fieldName (::stringtoolbox::trim(_fieldName)) |
mf | fieldIdentifier ((!_fieldIdentifier.empty() ? static_cast< uint32_t >(std::stoi(::stringtoolbox::trim(_fieldIdentifier))) :fieldIdentifierCounter)) |
mf | defaultInitializationValue (_fieldDefaultInitializerValue) |
mm | add (std::move(mf)) |
if ("MESSAGES_SPECIFICATION"==ast.name) | |
peg::parser | p (grammarMessageSpecificationLanguage) |
p | enable_ast () |
catch (std::regex_error &) | |
catch (std::bad_cast &) | |
if (p.parse(inputWithoutComments.c_str(), ast)) | |
Variables | |
cluon::else | |
std::map< std::string, MetaMessage::MetaField::MetaFieldDataTypes > | STRING_TO_DATATYPE_MAP |
MetaMessage::MetaField | mf |
else | |
return | mm |
p | log |
std::pair< std::vector< MetaMessage >, MessageParserErrorCodes > | retVal {} |
std::string | inputWithoutComments {input} |
try | |
std::shared_ptr< peg::Ast > | ast {} |
catch | ( | std::regex_error & | ) |
catch | ( | std::bad_cast & | ) |
mf defaultInitializationValue | ( | _fieldDefaultInitializerValue | ) |
p enable_ast | ( | ) |
mf fieldDataTypeName | ( | ::stringtoolbox::trim(_fieldDataType) | ) |
mf fieldIdentifier | ( | (!_fieldIdentifier.empty() ? static_cast< uint32_t >(std::stoi(::stringtoolbox::trim(_fieldIdentifier))) :fieldIdentifierCounter) | ) |
Referenced by cluon::ToProtoVisitor::visit().
mf fieldName | ( | ::stringtoolbox::trim(_fieldName) | ) |
else if | ( | "IDENTIFIER" | = = f->original_name | ) |
if | ( | _fieldIdentifier. | empty() | ) |
if | ( | ) |
if | ( | "MESSAGES_SPECIFICATION" | = = ast.name | ) |
References p().
if | ( | p. | parseinputWithoutComments.c_str(), ast | ) |
References retVal.
peg::parser p | ( | grammarMessageSpecificationLanguage | ) |
Referenced by if().
std::shared_ptr<peg::Ast> ast {} |
Referenced by cluon::MessageParser::parse().
else |
inputWithoutComments {input} |
p log |
MetaMessage::MetaField mf |
Referenced by cluon::MetaMessage::add().
return mm |
return retVal {} |
Referenced by cluon::ToCSVVisitor::csv(), cluon::OD4Session::dataTrigger(), cluon::ToJSONVisitor::encodeBase64(), cluon::extractEnvelope(), cluon::FromJSONVisitor::FromJSONVisitor(), cluon::FromMsgPackVisitor::FromMsgPackVisitor(), cluon::getCommandlineArguments(), cluon::EnvelopeConverter::getJSONFromEnvelope(), cluon::EnvelopeConverter::getJSONFromProtoEncodedEnvelope(), cluon::EnvelopeConverter::getProtoEncodedEnvelopeFromJSON(), cluon::SharedMemory::getTimeStamp(), if(), cluon::ToJSONVisitor::json(), cluon::ToODVDVisitor::messageSpecification(), cluon::SharedMemory::name(), cluon::MessageParser::parse(), cluon::LCMToGenericMessage::setMessageSpecification(), cluon::EnvelopeConverter::setMessageSpecification(), cluon::Player::setPlayerListener(), cluon::SharedMemory::setTimeStamp(), cluon::TCPConnection::TCPConnection(), cluon::TCPServer::TCPServer(), cluon::UDPReceiver::UDPReceiver(), cluon::UDPSender::UDPSender(), and cluon::UDPReceiver::~UDPReceiver().
std::map<std::string, MetaMessage::MetaField::MetaFieldDataTypes> STRING_TO_DATATYPE_MAP |
try |