9 #ifndef ICARUSCODE_PMT_ALGORITHMS_KEYVALUEPARSER_H
10 #define ICARUSCODE_PMT_ALGORITHMS_KEYVALUEPARSER_H
18 #include <string_view>
24 namespace icarus::details {
class KeyValueParser; }
138 template <
typename Key>
150 (
unsigned int iLine, std::string
const& line, std::string
const&
msg);
157 #endif // ICARUSCODE_PMT_ALGORITHMS_KEYVALUEPARSER_H
KeyValueParser(FormatParams_t formatParams=DefaultFormatParameters, icarus::ParsingToolkit::Params_t parserParams=icarus::ParsingToolkit::DefaultParameters)
Creates a parser with the specified parsing parameters.
keyType keySepType(Key const &key) const
Returns the type of key.
icarus::ParsingToolkit fPTK
Parsing toolkit (and its parameters).
ParsedData_t operator()(std::istream &stream) const
Simple parsed data format.
Collection of items with key/values structure.
static const FormatParams_t DefaultFormatParameters
keyType highlightSeparator(std::vector< std::string_view > &tokens) const
Modifies tokens placing the key/value separator in its own token.
Parser to fill a KeyValuesData structure out of a character buffer.
FormatParams_t fFmt
Parser format parameters.
then echo File list $list not found else cat $list while read file do echo $file sed s
ParsedData_t parse(std::istream &stream) const
Parses the stream and returns a data structure with the content.
ParserError(unsigned int iLine, std::string const &line, std::string const &msg)
icarus::KeyValuesData ParsedData_t
Type of returned data.
std::vector< std::string > fKeys
Sorted keys cache.
ParsedData_t parse(std::istream &&stream) const