ConfigParser.cc
Go to the documentation of this file.
300 debugs(3, DBG_CRITICAL, "FATAL: Not alphanumeric character '"<< *s << "' in unquoted token " << tokenStart);
374 debugs(3, DBG_CRITICAL, "FATAL: can't open %s for reading parameters: includes are nested too deeply (>16)!\n" << path);
462 debugs(3, DBG_CRITICAL, "ERROR: Failure while parsing key=value token. Value missing after: " << key);
473 debugs(3, DBG_CRITICAL, "FATAL: Can not read regex expression while configuration_includes_quoted_values is enabled");
486 throw TextException("Cannot read regex expression while configuration_includes_quoted_values is enabled", Here());
569 throw TextException(ToSBuf("trailing garbage at the end of a configuration directive: ", garbage), Here());
size_t aclParseAclList(ConfigParser &, Acl::Tree **treep, const char *label)
Definition: Gadgets.cc:188
const char * cfg_directive
During parsing, the name of the current squid.conf directive being parsed.
Definition: cache_cf.cc:271
Definition: CachePeer.h:31
Definition: ConfigParser.h:168
char * nextElement(TokenType &type)
Definition: ConfigParser.cc:664
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: RegexPattern.h:24
Definition: SquidString.h:26
CachePeer * findCachePeerByName(const char *const name)
cache_peer with a given name (or nil)
Definition: neighbors.cc:1050
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63