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());
static bool RecognizeQuotedPair_
The next tokens may contain quoted-pair (-escaped) characters.
Definition: ConfigParser.h:229
static bool PreviewMode_
The next token will not popped from cfg files, will just previewd.
Definition: ConfigParser.h:230
Definition: CachePeer.h:28
static bool RecognizeQuotedValues
configuration_includes_quoted_values in squid.conf
Definition: ConfigParser.h:152
static char * UnQuote(const char *token, const char **next=nullptr)
Definition: ConfigParser.cc:139
std::unique_ptr< RegexPattern > regex(const char *expectedRegexDescription)
extracts and returns a regex (including any optional flags)
Definition: ConfigParser.cc:483
size_t aclParseAclList(ConfigParser &, ACLList **config, const char *label)
Definition: Gadgets.cc:184
Definition: RegexPattern.h:23
CachePeer * findCachePeerByName(const char *const name)
cache_peer with a given name (or nil)
Definition: neighbors.cc:1048
static std::queue< char * > CfgLineTokens_
Store the list of tokens for current configuration line.
Definition: ConfigParser.h:226
static bool ParseQuotedOrToEol_
The next tokens will be handled as quoted or to_eol token.
Definition: ConfigParser.h:228
static bool ParseKvPair_
The next token will be handled as kv-pair token.
Definition: ConfigParser.h:231
SBuf token(const char *expectedTokenDescription)
extracts and returns a required token
Definition: ConfigParser.cc:574
void rejectDuplicateDirective()
rejects configuration due to a repeated directive
Definition: ConfigParser.cc:558
bool optionalKvPair(char *&key, char *&value)
Definition: ConfigParser.cc:422
Definition: SquidString.h:25
char * nextElement(TokenType &type)
Definition: ConfigParser.cc:664
CachePeer & cachePeer(const char *peerNameTokenDescription)
extracts a cache_peer name token and returns the corresponding CachePeer
Definition: ConfigParser.cc:508
static bool NextKvPair(char *&key, char *&value)
Definition: ConfigParser.cc:448
void closeDirective()
stops parsing the current configuration directive
Definition: ConfigParser.cc:565
Definition: forward.h:15
static const char * QuoteString(const String &var)
Definition: ConfigParser.cc:534
static char * NextElement(TokenType &type)
Wrapper method for TokenParse.
Definition: ConfigParser.cc:318
bool skipOptional(const char *keyword)
either extracts the given (optional) token or returns false
Definition: ConfigParser.cc:584
static void SetCfgLine(char *line)
Set the configuration file line to parse.
Definition: ConfigParser.cc:204
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63
static enum ConfigParser::ParsingStates KvPairState_
Parsing state while parsing kv-pair tokens.
Definition: ConfigParser.cc:31
static const char * CfgPos
Pointer to the next element in cfgLine string.
Definition: ConfigParser.h:225
Definition: ConfigParser.h:167
const char * cfg_directive
During parsing, the name of the current squid.conf directive being parsed.
Definition: cache_cf.cc:270
static char * TokenParse(const char *&nextToken, TokenType &type)
Definition: ConfigParser.cc:222
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products