ConfigParser.h
Go to the documentation of this file.
Definition: CachePeer.h:31
Definition: ConfigParser.h:168
char * nextElement(TokenType &type)
Definition: ConfigParser.cc:664
char parseBuffer[CONFIG_LINE_LIMIT]
Temporary buffer to store data to parse.
Definition: ConfigParser.h:197
Definition: ConfigParser.h:46
bool optionalKvPair(char *&key, char *&value)
Definition: ConfigParser.cc:422
static const char * CfgPos
Pointer to the next element in cfgLine string.
Definition: ConfigParser.h:225
static bool RecognizeQuotedPair_
The next tokens may contain quoted-pair (-escaped) characters.
Definition: ConfigParser.h:229
void rejectDuplicateDirective()
rejects configuration due to a repeated directive
Definition: ConfigParser.cc:558
static enum ConfigParser::ParsingStates KvPairState_
Parsing state while parsing kv-pair tokens.
Definition: ConfigParser.cc:31
std::unique_ptr< RegexPattern > regex(const char *expectedRegexDescription)
extracts and returns a regex (including any optional flags)
Definition: ConfigParser.cc:483
static std::queue< char * > CfgLineTokens_
Store the list of tokens for current configuration line.
Definition: ConfigParser.h:226
static bool ParseKvPair_
The next token will be handled as kv-pair token.
Definition: ConfigParser.h:231
static char * NextElement(TokenType &type)
Wrapper method for TokenParse.
Definition: ConfigParser.cc:318
static bool RecognizeQuotedValues
configuration_includes_quoted_values in squid.conf
Definition: ConfigParser.h:152
static bool ParseQuotedOrToEol_
The next tokens will be handled as quoted or to_eol token.
Definition: ConfigParser.h:228
bool skipOptional(const char *keyword)
either extracts the given (optional) token or returns false
Definition: ConfigParser.cc:584
void closeDirective()
stops parsing the current configuration directive
Definition: ConfigParser.cc:565
static char * UnQuote(const char *token, const char **next=nullptr)
Definition: ConfigParser.cc:139
static bool PreviewMode_
The next token will not popped from cfg files, will just previewd.
Definition: ConfigParser.h:230
static bool NextKvPair(char *&key, char *&value)
Definition: ConfigParser.cc:448
CachePeer & cachePeer(const char *peerNameTokenDescription)
extracts a cache_peer name token and returns the corresponding CachePeer
Definition: ConfigParser.cc:508
static void SetCfgLine(char *line)
Set the configuration file line to parse.
Definition: ConfigParser.cc:204
SBuf token(const char *expectedTokenDescription)
extracts and returns a required token
Definition: ConfigParser.cc:574
static const char * QuoteString(const String &var)
Definition: ConfigParser.cc:534
static char * TokenParse(const char *&nextToken, TokenType &type)
Definition: ConfigParser.cc:222
Definition: SquidString.h:26
Definition: wordlist.h:20