Doxygen
Loading...
Searching...
No Matches
configimpl.l File Reference
#include <stdint.h>
#include "configimpl.h"
#include <algorithm>
#include <cctype>
#include <cerrno>
#include <cstdarg>
#include <cstdint>
#include <thread>
#include "config.h"
#include "configoptions.h"
#include "debug.h"
#include "dir.h"
#include "dotattributes.h"
#include "fileinfo.h"
#include "language.h"
#include "portable.h"
#include "regex.h"
#include "textstream.h"
#include "version.h"
#include "doxygen_lex.h"
#include "configimpl.l.h"
Include dependency graph for configimpl.l:

Go to the source code of this file.

Classes

struct  ConfigFileState

Macros

#define YY_NO_INPUT   1
#define YY_NO_UNISTD_H   1
#define SHOW_INCLUDES   0
#define MAX_INCLUDE_DEPTH   10
#define YY_NEVER_INTERACTIVE   1
#define unput_string(yytext, yyleng)
#define YY_INPUT(buf, result, max_size)
#define LEX_NO_REENTRANT

Functions

static const char * stateToString (int state)
static DString configStringRecode (const DString &str, const DString &fromEncoding, const DString &toEncoding)
static bool containsEnvVar (DString &str)
static DString convertToComment (const DString &s, const DString &u)
static bool convertStringToBool (const DString &str, bool &isValid)
static const char * getLexerFILE ()
static int yyread (char *buf, int max_size)
static void checkEncoding ()
static DString stripComment (const DString &s)
static void processStoreRepl (DString &storeReplStr)
static void processString ()
static void processList ()
static FILE * tryPath (const DString &path, const DString &fileName)
static void substEnvVarsInStrList (StringVector &sl)
static void substEnvVarsInString (DString &s)
static FILE * findFile (const DString &fileName)
static void readIncludeFile (const DString &incName)
int yylex (void)
static DString configFileToString (const DString &name)
static void cleanUpPaths (StringVector &str)
static bool checkFileName (const DString &s, const char *optionName)
static void checkList (StringVector list, const char *name, bool equalRequired, bool valueRequired)
static void adjustBoolSetting (const char *depOption, const char *optionName, bool expectedValue)
static void adjustStringSetting (const char *depOption, const char *optionName, const DString &expectedValue)
static void adjustColorStyleSetting (const char *depOption)
static void updateAttribute (DotAttributes &attr, DString name, ConfigObsolete *value)

Variables

static const char * warning_str = "warning: "
static const char * error_str = "error: "
static const char * g_inputString = nullptr
static int g_inputPosition = 0
static int g_yyLineNr = 1
static DString g_yyFileName
static DString g_cmd
static DStringg_string = nullptr
static StringVectorg_list = nullptr
static DString g_listStr
static StringVector g_includePathList
static std::vector< std::unique_ptr< ConfigFileState > > g_includeStack
static bool g_configUpdate = false
static DString g_encoding
static ConfigImplg_config = nullptr
static Config::CompareMode g_compareMode = Config::CompareMode::Full
static DString g_localStoreRepl
static const reg::Ex reEnvVar (R"(\$\‍((\a[\w.-]*)\‍))")
static const reg::Ex reEnvVarExt (R"(\$\‍((\a[\w.-]*\‍(\a[\w.-]*\‍))\‍))")
static const reg::Ex reEnvVarCMake (R"(@\a\w*@)")
static const reg::Ex reEnvVar1CMake (R"(\${\a\w*})")

Macro Definition Documentation

◆ LEX_NO_REENTRANT

#define LEX_NO_REENTRANT

Definition at line 661 of file configimpl.l.

◆ MAX_INCLUDE_DEPTH

#define MAX_INCLUDE_DEPTH   10

Definition at line 79 of file configimpl.l.

Referenced by readIncludeFile().

◆ SHOW_INCLUDES

#define SHOW_INCLUDES   0

Definition at line 48 of file configimpl.l.

◆ unput_string

#define unput_string ( yytext,
yyleng )
Value:
do { for (int i=(int)yyleng-1;i>=0;i--) unput(yytext[i]); } while(0)

Definition at line 653 of file configimpl.l.

◆ YY_INPUT

#define YY_INPUT ( buf,
result,
max_size )
Value:
result=yyread(buf,max_size);
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
Definition code.l:3981

Definition at line 657 of file configimpl.l.

◆ YY_NEVER_INTERACTIVE

#define YY_NEVER_INTERACTIVE   1

Definition at line 80 of file configimpl.l.

◆ YY_NO_INPUT

#define YY_NO_INPUT   1

Definition at line 44 of file configimpl.l.

◆ YY_NO_UNISTD_H

#define YY_NO_UNISTD_H   1

Definition at line 45 of file configimpl.l.

Function Documentation

◆ adjustBoolSetting()

void adjustBoolSetting ( const char * depOption,
const char * optionName,
bool expectedValue )
static

Definition at line 1701 of file configimpl.l.

1702{
1703 // lookup option by name
1704 const ConfigValues::Info *option = ConfigValues::instance().get(optionName);
1705 if (option && option->type==ConfigValues::Info::Bool) // safety check
1706 {
1707 if (ConfigValues::instance().*(option->value.b)!=expectedValue) // current value differs from expectation
1708 {
1709 err("When enabling {} the {} option should be {}. I'll adjust it for you.\n",depOption,optionName,expectedValue? "enabled" : "disabled");
1710 ConfigValues::instance().*(option->value.b)=expectedValue; // adjust option
1711 }
1712 }
#define err(fmt,...)
Definition message.h:127
1713}

References err.

Referenced by Config::checkAndCorrect().

◆ adjustColorStyleSetting()

void adjustColorStyleSetting ( const char * depOption)
static

Definition at line 1729 of file configimpl.l.

1730{
1731 auto updateColorStyle = [&depOption](HTML_COLORSTYLE_t curStyle,HTML_COLORSTYLE_t newStyle)
1732 {
1733 err("When enabling '{}' the 'HTML_COLORSTYLE' option should be either 'LIGHT' or 'DARK' but has value '{}'. I'll adjust it for you to '{}'.\n",
1734 depOption,
1735 HTML_COLORSTYLE_enum2str(curStyle),
1736 HTML_COLORSTYLE_enum2str(newStyle));
1737 Config_updateEnum(HTML_COLORSTYLE,newStyle);
1738 };
1739 auto colorStyle = Config_getEnum(HTML_COLORSTYLE);
1740 switch (colorStyle)
1741 {
1742 case HTML_COLORSTYLE_t::LIGHT:
1743 case HTML_COLORSTYLE_t::DARK:
1744 // no adjustment needed
1745 break;
1746 case HTML_COLORSTYLE_t::AUTO_LIGHT:
1747 case HTML_COLORSTYLE_t::TOGGLE:
1748 updateColorStyle(colorStyle,HTML_COLORSTYLE_t::LIGHT);
1749 break;
1750 case HTML_COLORSTYLE_t::AUTO_DARK:
1751 updateColorStyle(colorStyle,HTML_COLORSTYLE_t::DARK);
1752 break;
1753 }
#define Config_updateEnum(name, value)
Definition config.h:42
#define Config_getEnum(name)
Definition config.h:35
1754}

References Config_getEnum, Config_updateEnum, and err.

Referenced by Config::checkAndCorrect().

◆ adjustStringSetting()

void adjustStringSetting ( const char * depOption,
const char * optionName,
const DString & expectedValue )
static

Definition at line 1715 of file configimpl.l.

1716{
1717 // lookup option by name
1718 const ConfigValues::Info *option = ConfigValues::instance().get(optionName);
1719 if (option && option->type==ConfigValues::Info::String) // safety check
1720 {
1721 if (ConfigValues::instance().*(option->value.s)!=expectedValue) // current value differs from expectation
1722 {
1723 err("When enabling {} the {} option should have value '{}'. I'll adjust it for you.\n",depOption,optionName,expectedValue);
1724 ConfigValues::instance().*(option->value.s)=expectedValue; // adjust option
1725 }
1726 }
1727}

References err.

Referenced by Config::checkAndCorrect().

◆ checkEncoding()

void checkEncoding ( )
static

Definition at line 721 of file configimpl.l.

722{
723 ConfigString *option = dynamic_cast<ConfigString*>(g_config->get("DOXYFILE_ENCODING"));
724 g_encoding = *option->valueRef();
ConfigOption * get(const DString &name) const
Definition configimpl.h:396
Class representing a string type option.
Definition configimpl.h:184
DString * valueRef()
Definition configimpl.h:197
static ConfigImpl * g_config
Definition configimpl.l:649
static DString g_encoding
Definition configimpl.l:648
725}

References g_config, g_encoding, ConfigImpl::get(), and ConfigString::valueRef().

Referenced by processString().

◆ checkFileName()

bool checkFileName ( const DString & s,
const char * optionName )
static

Definition at line 1653 of file configimpl.l.

1654{
1655 DString val = s.stripWhiteSpace().lower();
1656 if ((val=="yes" || val=="true" || val=="1" || val=="all") ||
1657 (val=="no" || val=="false" || val=="0" || val=="none"))
1658 {
1659 err("file name expected for option {}, got {} instead. Ignoring...\n",optionName,s);
1660 return false;
1661 }
1662 return true;
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:84
DString lower() const
Definition dstring.h:326
DString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition dstring.h:337
1663}

References err, DString::lower(), and DString::stripWhiteSpace().

Referenced by Config::checkAndCorrect().

◆ checkList()

void checkList ( StringVector list,
const char * name,
bool equalRequired,
bool valueRequired )
inlinestatic

Definition at line 1671 of file configimpl.l.

1672{
1673 for (const auto &s: list)
1674 {
1675 DString item = s;
1676 item=item.stripWhiteSpace();
1677 size_t i=item.find('=');
1678 if (i==DString::npos && equalRequired)
1679 {
1680 err("Illegal format for option {}, no equal sign ('=') specified for item '{}'\n",name,item);
1681 }
1682 if (i!=DString::npos)
1683 {
1684 DString myName=item.left(i).stripWhiteSpace();
1685 if (myName.empty())
1686 {
1687 err("Illegal format for option {}, no name specified for item '{}'\n",name,item);
1688 }
1689 else if (valueRequired)
1690 {
1691 DString myValue=item.mid(i+1).stripWhiteSpace();
1692 if (myValue.empty())
1693 {
1694 err("Illegal format for option {}, no value specified for item '{}'\n",name,item);
1695 }
1696 }
1697 }
1698 }
DString mid(size_t index, size_t len=npos) const
Definition dstring.h:318
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
Definition dstring.h:148
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
Definition dstring.h:178
size_t find(char c, size_t pos=0) const
Definition dstring.h:239
DString left(size_t len) const
Definition dstring.h:306
1699}

References DString::empty(), err, DString::find(), DString::left(), DString::mid(), DString::npos, and DString::stripWhiteSpace().

Referenced by Config::checkAndCorrect().

◆ cleanUpPaths()

void cleanUpPaths ( StringVector & str)
static

Definition at line 1634 of file configimpl.l.

1635{
1636 for (size_t i=0;i<str.size();i++)
1637 {
1638 std::string path = str[i];
1639 std::replace(path.begin(),path.end(),'\\','/');
1640 if ((path[0]!='/' && (path.size()<=2 || path[1]!=':')) || path[path.size()-1]!='/')
1641 {
1642 FileInfo fi(path);
1643 if (fi.exists() && fi.isDir())
1644 {
1645 path = fi.absFilePath();
1646 if (path[path.size()-1]!='/') path+='/';
1647 }
1648 }
1649 str[i]=path;
1650 }
Minimal replacement for QFileInfo.
Definition fileinfo.h:26
1651}

References FileInfo::absFilePath(), FileInfo::exists(), and FileInfo::isDir().

Referenced by Config::checkAndCorrect().

◆ configFileToString()

DString configFileToString ( const DString & name)
static

Definition at line 1573 of file configimpl.l.

1574{
1575 if (name.empty()) return DString();
1576
1577 auto stream2string = [](std::istream &in) -> std::string
1578 {
1579 std::string ret;
1580 char buffer[4096];
1581 while (in.read(buffer, sizeof(buffer))) ret.append(buffer, sizeof(buffer));
1582 ret.append(buffer, static_cast<uint32_t>(in.gcount()));
1583 if (!ret.empty() && ret[ret.length()-1]!='\n') ret+='\n'; // to help the scanner
1584 return ret;
1585 };
1586
1587 if (name=="-") // read from stdin
1588 {
1589 // read contents from stdin into contents string
1590 return stream2string(std::cin);
1591 }
1592 else // read from file
1593 {
1594 std::ifstream f = Portable::openInputStream(name);
1595 if (!f.is_open())
1596 {
1597 ConfigImpl::config_term("file '{}' not found or could not be opened\n",name);
1598 return "";
1599 }
1600 return stream2string(f);
1601 }
static void config_term(fmt::format_string< Args... > fmt, Args &&... args)
Definition configimpl.h:617
std::ifstream openInputStream(const DString &name, bool binary=false, bool openAtEnd=false)
Definition portable.cpp:692
1602}

References ConfigImpl::config_term(), DString::empty(), and Portable::openInputStream().

Referenced by ConfigImpl::parse().

◆ configStringRecode()

DString configStringRecode ( const DString & str,
const DString & fromEncoding,
const DString & toEncoding )
static

Definition at line 685 of file configimpl.l.

689{
690 if (inputEncoding.empty() || outputEncoding.empty() || inputEncoding==outputEncoding) return str;
691 size_t inputSize=str.length();
692 size_t outputSize=inputSize*4;
693 DString output(outputSize, DString::ExplicitSize);
694 void *cd = portable_iconv_open(outputEncoding.data(),inputEncoding.data());
695 if (cd==reinterpret_cast<void *>(-1))
696 {
697 ConfigImpl::config_term("Error: unsupported character conversion: '{}'->'{}'\n"
698 "Check the 'DOXYFILE_ENCODING' setting in the config file!\n",
699 inputEncoding,outputEncoding);
700 }
701 size_t iLeft=inputSize;
702 size_t oLeft=outputSize;
703 const char *inputPtr = str.data();
704 char *outputPtr = output.rawData();
705 if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
706 {
707 outputSize-=oLeft;
708 output.resize(outputSize);
709 output.at(outputSize)='\0';
710 //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,qPrint(srcBuf));
711 }
712 else
713 {
714 ConfigImpl::config_term("Error: failed to translate characters from {} to {}: {}\n",
715 inputEncoding,outputEncoding,strerror(errno));
716 }
718 return output;
@ ExplicitSize
Definition dstring.h:131
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition dstring.h:157
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition dstring.h:151
int portable_iconv_close(void *cd)
size_t portable_iconv(void *cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
void * portable_iconv_open(const char *tocode, const char *fromcode)
719}

References DString::at(), ConfigImpl::config_term(), DString::data(), DString::empty(), DString::ExplicitSize, DString::length(), portable_iconv(), portable_iconv_close(), portable_iconv_open(), DString::rawData(), and DString::resize().

Referenced by processList(), processStoreRepl(), processString(), and ConfigOption::writeStringValue().

◆ containsEnvVar()

bool containsEnvVar ( DString & str)
static

Definition at line 1397 of file configimpl.l.

1398{
1399 reg::Match m;
1400 std::string s = str.str();
const std::string & str() const
Definition dstring.h:645
Object representing the matching results.
Definition regex.h:154
static const reg::Ex reEnvVarExt(R"(\$\‍((\a[\w.-]*\‍(\a[\w.-]*\‍))\‍))")
static const reg::Ex reEnvVar(R"(\$\‍((\a[\w.-]*)\‍))")
static const reg::Ex reEnvVar1CMake(R"(\${\a\w*})")
static const reg::Ex reEnvVarCMake(R"(@\a\w*@)")
bool search(std::string_view str, Match &match, const Ex &re, size_t pos)
Search in a given string str starting at position pos for a match against regular expression re.
Definition regex.cpp:850
1402}

References reEnvVar, reEnvVar1CMake, reEnvVarCMake, reEnvVarExt, reg::search(), and DString::str().

Referenced by ConfigBool::compareDoxyfile(), ConfigInt::compareDoxyfile(), ConfigBool::convertStrToVal(), ConfigEnum::convertStrToVal(), and ConfigInt::convertStrToVal().

◆ convertStringToBool()

bool convertStringToBool ( const DString & str,
bool & isValid )
static

Definition at line 213 of file configimpl.l.

214{
215 isValid=false;
216 DString val = str.stripWhiteSpace().lower();
217 if (!val.empty())
218 {
219 if (val=="yes" || val=="true" || val=="1" || val=="all")
220 {
221 isValid=true;
222 return true;
223 }
224 else if (val=="no" || val=="false" || val=="0" || val=="none")
225 {
226 isValid=true;
227 return false;
228 }
229 }
230 return false;
231}

References DString::empty(), DString::lower(), and DString::stripWhiteSpace().

Referenced by ConfigBool::convertStrToVal(), and Config::updateObsolete().

◆ convertToComment()

DString convertToComment ( const DString & s,
const DString & u )
static

Definition at line 84 of file configimpl.l.

85{
86 //printf("convertToComment(%s)=%s\n",qPrint(s),qPrint(u));
87 DString result;
88 if (!s.empty())
89 {
91 const char *p=tmp.data();
92 char c = 0;
93 if (p)
94 {
95 result+="#";
96 if (*p && *p!='\n')
97 {
98 result+=" ";
99 }
100 while ((c=*p++))
101 {
102 if (c=='\n')
103 {
104 result+="\n#";
105 if (*p && *p!='\n')
106 {
107 result+=" ";
108 }
109 }
110 else result+=c;
111 }
112 result+='\n';
113 }
114 }
115 if (!u.empty())
116 {
117 if (!result.empty()) result+='\n';
118 result+= u;
119 }
120 return result;
121}

References DString::data(), DString::empty(), and DString::stripWhiteSpace().

Referenced by ConfigBool::writeTemplate(), ConfigEnum::writeTemplate(), ConfigImpl::writeTemplate(), ConfigInt::writeTemplate(), ConfigList::writeTemplate(), and ConfigString::writeTemplate().

◆ findFile()

FILE * findFile ( const DString & fileName)
static

Definition at line 936 of file configimpl.l.

937{
938 if (fileName.empty())
939 {
940 return 0;
941 }
942 if (Portable::isAbsolutePath(fileName))
943 {
944 return tryPath(DString(), fileName);
945 }
947 for (const auto &s : g_includePathList)
948 {
949 FILE *f = tryPath(s,fileName);
950 if (f) return f;
951 }
952 // try cwd if g_includePathList fails
953 return tryPath(".",fileName);
static FILE * tryPath(const DString &path, const DString &fileName)
Definition configimpl.l:920
static StringVector g_includePathList
Definition configimpl.l:645
static void substEnvVarsInStrList(StringVector &sl)
bool isAbsolutePath(const DString &fileName)
Definition portable.cpp:513
954}

References DString::empty(), g_includePathList, Portable::isAbsolutePath(), substEnvVarsInStrList(), and tryPath().

Referenced by readIncludeFile().

◆ getLexerFILE()

const char * getLexerFILE ( )
inlinestatic

Definition at line 660 of file configimpl.l.

660{return __FILE__;}

◆ processList()

void processList ( )
static

Definition at line 823 of file configimpl.l.

824{
825 bool allowCommaAsSeparator = g_cmd!="PREDEFINED";
static DString g_cmd
Definition configimpl.l:641
826
828 size_t l = s.length();
static DString stripComment(const DString &s)
Definition configimpl.l:727
static DString g_listStr
Definition configimpl.l:644
829
830 DString elemStr;
831 bool wasQuote=false;
832
833 // helper to push elemStr to the list and clear it
834 auto addElem = [&elemStr,&wasQuote]()
835 {
836 if (!elemStr.empty())
837 {
838 DString e = configStringRecode(elemStr,g_encoding,"UTF-8");
839 //printf("Processed list element '%s'\n",qPrint(e));
840 if (wasQuote) e = "\""+e+"\"";
841 wasQuote = false;
842 g_list->push_back(e.str());
843 elemStr="";
844 }
845 };
static StringVector * g_list
Definition configimpl.l:643
static DString configStringRecode(const DString &str, const DString &fromEncoding, const DString &toEncoding)
Definition configimpl.l:685
846
847 bool needsSeparator=false;
848 bool insideQuote=false;
849 bool warned=false;
850 for (size_t i=0;i<l;i++)
851 {
852 char c = s.at(i);
853 if (!needsSeparator && c=='\\') // escaped character
854 {
855 if (i<l-1 && s.at(i+1)=='"') // unescape the quote character
856 {
857 elemStr+='"';
858 }
859 else if (insideQuote && i<l-2 && s.at(i+1)=='\\' && s.at(i+2)=='"') // escaped "\" at the end of a quoted section
860 {
861 elemStr+="\\";
862 }
863 else // keep other escaped characters in escaped form
864 {
865 elemStr+=c;
866 if (i<l-1)
867 {
868 elemStr+=s.at(i+1);
869 }
870 }
871 i++; // skip over the escaped character
872 }
873 else if (!needsSeparator && c=='"') // quote character
874 {
875 if (!insideQuote)
876 {
877 insideQuote=true;
878 wasQuote=true;
879 }
880 else // this quote ends an element
881 {
882 insideQuote=false;
883 needsSeparator=true;
884 }
885 }
886 else if (!insideQuote && ((c==',' && allowCommaAsSeparator) || isspace(c))) // separator
887 {
888 needsSeparator=false;
889 addElem();
890 }
891 else // normal content character
892 {
893 if (needsSeparator)
894 {
895 if (!warned)
896 {
897 ConfigImpl::config_warn("Invalid value for '{}' tag at line {}, file {}: Values in list '{}' are not properly space {}separated\n",
898 g_cmd,g_yyLineNr,g_yyFileName,g_listStr.stripWhiteSpace(),allowCommaAsSeparator?"or comma ":"");
899 warned=true;
900 }
901 needsSeparator=false;
902 i--; // try the character again as part of a new element
903 addElem();
904 }
905 else
906 {
907 elemStr+=c;
908 }
909 }
910 }
911 // add last part
912 addElem();
913 if (insideQuote)
914 {
915 ConfigImpl::config_warn("Invalid value for '{}' tag at line {}, file {}: Values in list '{}' are not properly quoted\n",
917 }
static void config_warn(fmt::format_string< Args... > fmt, Args &&... args)
Definition configimpl.h:623
char & at(size_t i)
Returns a reference to the character at index i.
Definition dstring.h:686
static DString g_yyFileName
Definition configimpl.l:640
static int g_yyLineNr
Definition configimpl.l:639
918}

References DString::at(), ConfigImpl::config_warn(), configStringRecode(), DString::empty(), g_cmd, g_encoding, g_list, g_listStr, g_yyFileName, g_yyLineNr, DString::length(), DString::str(), stripComment(), and DString::stripWhiteSpace().

◆ processStoreRepl()

void processStoreRepl ( DString & storeReplStr)
static

Definition at line 755 of file configimpl.l.

756{
757 // strip leading and trailing whitespace
758 DString s = stripComment(storeReplStr.stripWhiteSpace());
759 // recode the string
760 storeReplStr=configStringRecode(s,g_encoding,"UTF-8");
761}

References configStringRecode(), g_encoding, stripComment(), and DString::stripWhiteSpace().

◆ processString()

void processString ( )
static

Definition at line 763 of file configimpl.l.

764{
765 // strip leading and trailing whitespace
767 size_t l = s.length();
static DString * g_string
Definition configimpl.l:642
768
769 // remove surrounding quotes if present (and not escaped)
770 if (l>=2 && s.at(0)=='"' && s.at(l-1)=='"' && // remove quotes
771 (s.at(l-2)!='\\' || (s.at(l-2)=='\\' && s.at(l-3)=='\\')))
772 {
773 s=s.mid(1,s.length()-2);
774 l=s.length();
775 }
776
777 // check for invalid and/or escaped quotes
778 bool warned=false;
779 DString result;
780 for (size_t i=0;i<l;i++)
781 {
782 char c = s.at(i);
783 if (c=='\\') // escaped character
784 {
785 if (i<l-1 && s.at(i+1)=='"') // unescape the quote character
786 {
787 result+='"';
788 }
789 else // keep other escaped characters in escaped form
790 {
791 result+=c;
792 if (i<l-1)
793 {
794 result+=s.at(i+1);
795 }
796 }
797 i++; // skip over the escaped character
798 }
799 else if (c=='"') // unescaped quote
800 {
801 if (!warned)
802 {
803 ConfigImpl::config_warn("Invalid value for '{}' tag at line {}, file {}: Value '{}' is not properly quoted\n",
805 }
806 warned=true;
807 }
808 else // normal character
809 {
810 result+=c;
811 }
812 }
813
814 // recode the string
815 *g_string=configStringRecode(result,g_encoding,"UTF-8");
816
817 // update encoding
static void checkEncoding()
Definition configimpl.l:721
819
820 //printf("Processed string '%s'\n",qPrint(g_string));
821}

References DString::at(), checkEncoding(), ConfigImpl::config_warn(), configStringRecode(), g_cmd, g_encoding, g_string, g_yyFileName, g_yyLineNr, DString::length(), DString::mid(), stripComment(), and DString::stripWhiteSpace().

◆ readIncludeFile()

void readIncludeFile ( const DString & incName)
static

Definition at line 956 of file configimpl.l.

957{
958 if (g_includeStack.size()==MAX_INCLUDE_DEPTH) {
959 ConfigImpl::config_term("maximum include depth ({:d}) reached, {} is not included. Aborting...\n",
960 MAX_INCLUDE_DEPTH,incName);
961 }
static std::vector< std::unique_ptr< ConfigFileState > > g_includeStack
Definition configimpl.l:646
#define MAX_INCLUDE_DEPTH
Definition configimpl.l:79
962
963 DString inc = incName;
965 inc = inc.stripWhiteSpace();
966 size_t incLen = inc.length();
967 if (incLen>0 && inc.at(0)=='"' && inc.at(incLen-1)=='"') // strip quotes
968 {
969 inc=inc.mid(1,incLen-2);
970 }
static void substEnvVarsInString(DString &s)
971
972 FILE *f;
973
974 if ((f=findFile(inc))) // see if the include file can be found
975 {
976 // For debugging
static FILE * findFile(const DString &fileName)
Definition configimpl.l:936
977#if SHOW_INCLUDES
978 for (size_t i=0;i<g_includeStack.size();i++) msg(" ");
979 msg("@INCLUDE = {}: parsing...\n",inc);
#define msg(fmt,...)
Definition message.h:94
980#endif
981
982 // store the state of the old file
984 fs->oldState=YY_CURRENT_BUFFER;
985 fs->lineNr=g_yyLineNr;
987 fs->filePtr=f;
988 // push the state on the stack
989 g_includeStack.push_back(std::unique_ptr<ConfigFileState>(fs));
990 // set the scanner to the include file
991 yy_switch_to_buffer(yy_create_buffer(f, YY_BUF_SIZE));
992 fs->newState=YY_CURRENT_BUFFER;
993 g_yyFileName=inc;
994 }
995 else
996 {
997 ConfigImpl::config_term("@INCLUDE = {}: not found!\n",inc);
998 }
#define YY_BUF_SIZE
Definition commentcnv.l:19
YY_BUFFER_STATE newState
Definition configimpl.l:633
YY_BUFFER_STATE oldState
Definition configimpl.l:632
999}

References DString::at(), ConfigImpl::config_term(), ConfigFileState::fileName, ConfigFileState::filePtr, findFile(), g_includeStack, g_yyFileName, g_yyLineNr, DString::length(), ConfigFileState::lineNr, MAX_INCLUDE_DEPTH, DString::mid(), msg, ConfigFileState::newState, ConfigFileState::oldState, DString::stripWhiteSpace(), substEnvVarsInString(), and YY_BUF_SIZE.

◆ stateToString()

const char * stateToString ( int state)
static

◆ stripComment()

DString stripComment ( const DString & s)
static

Definition at line 727 of file configimpl.l.

728{
729 // check if there is a comment at the end of the string
730 bool insideQuote=false;
731 size_t l = s.length();
732 for (size_t i=0;i<l;i++)
733 {
734 char c = s.at(i);
735 if (c=='\\') // skip over escaped characters
736 {
737 i++;
738 }
739 else if (c=='"') // toggle inside/outside quotation
740 {
741 insideQuote=!insideQuote;
742 }
743 else if (!insideQuote && c=='#') // found start of a comment
744 {
745 if (i<l-1 && s.at(i+1)=='#') // ## -> user comment
746 {
747 g_config->appendUserComment(s.mid(i)+"\n");
748 }
749 return s.left(i).stripWhiteSpace();
750 }
751 }
752 return s;
void appendUserComment(const DString &u)
Definition configimpl.h:568
753}

References ConfigImpl::appendUserComment(), DString::at(), g_config, DString::left(), DString::length(), DString::mid(), and DString::stripWhiteSpace().

Referenced by processList(), processStoreRepl(), and processString().

◆ substEnvVarsInString()

void substEnvVarsInString ( DString & s)
static

Definition at line 1404 of file configimpl.l.

1405{
1406 if (str.empty()) return;
1407 auto replace = [](const std::string &s, const reg::Ex &re) -> std::string
1408 {
1409 reg::Iterator it(s,re);
1411 std::string result;
1412 size_t p = 0;
1413 for (; it!=end ; ++it)
1414 {
1415 const auto &match = *it;
1416 size_t i = match.position();
1417 size_t l = match.length();
1418 result+=s.substr(p,i-p);
1419 std::string matchContents = match[1].str();
1420 DString env=Portable::getenv(matchContents); // get content of $(..) match
1421 substEnvVarsInString(env); // recursively expand variables if needed.
1422 result+=env.str();
1423 p=i+l;
1424 }
1425 result+=s.substr(p);
1426 return result;
1427 };
Class representing a regular expression.
Definition regex.h:39
Class to iterate through matches.
Definition regex.h:239
DirIterator end(const DirIterator &) noexcept
Definition dir.cpp:181
DString getenv(const DString &variable)
Definition portable.cpp:337
std::string replace(std::string_view str, const Ex &re, std::string_view replacement)
Searching in a given input string for parts that match regular expression re and replaces those parts...
Definition regex.cpp:872
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
Definition regex.cpp:861
1428
1430}

References DString::empty(), end(), Portable::getenv(), reEnvVar, reEnvVarExt, DString::str(), DString::stripWhiteSpace(), and substEnvVarsInString().

Referenced by readIncludeFile(), ConfigBool::substEnvVars(), ConfigEnum::substEnvVars(), ConfigInt::substEnvVars(), ConfigString::substEnvVars(), substEnvVarsInString(), and substEnvVarsInStrList().

◆ substEnvVarsInStrList()

void substEnvVarsInStrList ( StringVector & sl)
static

Definition at line 1432 of file configimpl.l.

1433{
1434 StringVector results;
1435 for (const auto &s : sl)
1436 {
1437 DString result = s;
1438 bool wasQuoted = ((result.at(0)=='"') && (result.at(result.length()-1)=='"'));
1439 if (wasQuoted)
1440 {
1441 result = result.mid(1,result.length()-2);
1442 }
1443 else
1444 {
1445 wasQuoted = (result.find(' ')!=DString::npos) || (result.find('\t')!=DString::npos) || (result.find('"')!=DString::npos);
1446 }
1447 // here we strip the quote again
1448 substEnvVarsInString(result);
std::vector< std::string > StringVector
Definition containers.h:33
1449
1450 //printf("Result %s was quoted=%d\n",qPrint(result),wasQuoted);
1451
1452 if (!wasQuoted) /* as a result of the expansion, a single string
1453 may have expanded into a list, which we'll
1454 add to sl. If the original string already
1455 contained multiple elements no further
1456 splitting is done to allow quoted items with spaces! */
1457 {
1458 int l = static_cast<int>(result.length());
1459 int p = 0;
1460 // skip spaces
1461 // search for a "word"
1462 for (int i=0;i<l;i++)
1463 {
1464 char c=0;
1465 // skip until start of new word
1466 while (i<l && ((c=result.at(i))==' ' || c=='\t')) i++;
1467 p=i; // p marks the start index of the word
1468 // skip until end of a word
1469 while (i<l && ((c=result.at(i))!=' ' && c!='\t' && c!='"')) i++;
1470 if (i<l) // not at the end of the string
1471 {
1472 if (c=='"') // word within quotes
1473 {
1474 p=i+1;
1475 for (i++;i<l;i++)
1476 {
1477 c=result.at(i);
1478 if (c=='"') // end quote
1479 {
1480 results.push_back(result.mid(p,i-p).str());
1481 p=i+1;
1482 break;
1483 }
1484 else if (c=='\\') // skip escaped stuff
1485 {
1486 i++;
1487 }
1488 }
1489 }
1490 else if (c==' ' || c=='\t') // separator
1491 {
1492 if (i>p) results.push_back(result.mid(p,i-p).str());
1493 p=i+1;
1494 }
1495 }
1496 }
1497 if (p!=l) // add the leftover as a string
1498 {
1499 results.push_back(result.right(l-p).str());
1500 }
1501 }
1502 else // just goto the next element in the list
1503 {
1504 if (!result.empty()) results.push_back(result.str());
1505 }
1506 }
1507 sl = results;
DString right(size_t len) const
Definition dstring.h:311
1508}

References DString::at(), DString::empty(), DString::find(), DString::length(), DString::mid(), DString::npos, DString::right(), DString::str(), and substEnvVarsInString().

Referenced by findFile(), and ConfigList::substEnvVars().

◆ tryPath()

FILE * tryPath ( const DString & path,
const DString & fileName )
static

Definition at line 920 of file configimpl.l.

921{
922 DString absName=(!path.empty() ? path+"/"+fileName : fileName);
923 FileInfo fi(absName.str());
924 if (fi.exists() && fi.isFile())
925 {
926 FILE *f=Portable::fopen(absName,"r");
927 if (!f) ConfigImpl::config_err("could not open file {} for reading\n",absName);
928 return f;
929 }
930 return 0;
static void config_err(fmt::format_string< Args... > fmt, Args &&... args)
Definition configimpl.h:611
FILE * fopen(const DString &fileName, const DString &mode)
Definition portable.cpp:365
931}

References ConfigImpl::config_err(), DString::empty(), FileInfo::exists(), Portable::fopen(), FileInfo::isFile(), and DString::str().

Referenced by findFile().

◆ updateAttribute()

void updateAttribute ( DotAttributes & attr,
DString name,
ConfigObsolete * value )
static

Definition at line 2249 of file configimpl.l.

2250{
2251 attr.updateValue(name,*value->valueStringRef());
DString * valueStringRef()
Definition configimpl.h:292
void updateValue(const DString &key, const DString &inpValue)
2252}

References DotAttributes::updateValue(), and ConfigObsolete::valueStringRef().

Referenced by Config::updateObsolete().

◆ yylex()

int yylex ( void )

Definition at line 1016 of file configimpl.l.

1022 {
1023 g_config->appendUserComment(yytext);
1024 g_yyLineNr++;
1025 }
1026<Start>"#".*"\n" { /* normal comment */
1027 g_yyLineNr++;
1028 }
1029
1030 /*-------------- TAG start ---------------*/
1031
1032<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" { g_cmd=yytext;
1034 ConfigOption *option = g_config->get(g_cmd);
1035 if (option==0) // oops not known
1036 {
1037 ConfigImpl::config_warn("ignoring unsupported tag '{}' at line {}, file {}\n",
1039 BEGIN(SkipInvalid);
1040 }
1041 else // known tag
1042 {
1044 option->setEncoding(g_encoding);
1045 switch(option->kind())
1046 {
1048 // shouldn't get here!
1049 BEGIN(SkipInvalid);
1050 break;
1052 g_list = dynamic_cast<ConfigList *>(option)->valueRef();
1053 g_list->clear();
1054 g_listStr="";
1055 BEGIN(GetStrList);
1056 break;
1058 g_string = dynamic_cast<ConfigEnum *>(option)->valueRef();
1059 g_string->clear();
1060 BEGIN(GetString);
1061 break;
1063 g_string = dynamic_cast<ConfigString *>(option)->valueRef();
1064 g_string->clear();
1065 BEGIN(GetString);
1066 break;
1068 g_string = dynamic_cast<ConfigInt *>(option)->valueStringRef();
1069 g_string->clear();
1070 BEGIN(GetString);
1071 break;
1073 g_string = dynamic_cast<ConfigBool *>(option)->valueStringRef();
1074 g_string->clear();
1075 BEGIN(GetString);
1076 break;
1078 if (g_configUpdate)
1079 {
1080 ConfigImpl::config_warn("Tag '{}' at line {} of file '{}' has become obsolete.\n"
1081 " This tag has been removed.\n", g_cmd,g_yyLineNr,g_yyFileName);
1082 }
1083 else
1084 {
1085 ConfigImpl::config_warn("Tag '{}' at line {} of file '{}' has become obsolete.\n"
1086 " To avoid this warning please remove this line from your configuration "
1087 "file or upgrade it using \"doxygen -u\"\n", g_cmd,g_yyLineNr,g_yyFileName);
1088 }
1089 dynamic_cast<ConfigObsolete*>(option)->markAsPresent();
1090 if (dynamic_cast<ConfigObsolete*>(option)->orgType()==ConfigOption::O_List)
1091 {
1092 g_list = dynamic_cast<ConfigObsolete*>(option)->valueListRef();
1093 g_list->clear();
1094 g_listStr="";
1095 BEGIN(GetStrList);
1096 }
1097 else
1098 {
1099 g_string = dynamic_cast<ConfigObsolete*>(option)->valueStringRef();
1100 g_string->clear();
1101 BEGIN(GetString);
1102 }
1103 break;
1105 if (g_configUpdate)
1106 {
1107 ConfigImpl::config_warn("Tag '{}' at line {} of file '{}' belongs to an option that was not enabled at compile time.\n"
1108 " This tag has been removed.\n", g_cmd,g_yyLineNr,g_yyFileName);
1109 }
1110 else
1111 {
1112 ConfigImpl::config_warn("Tag '{}' at line {} of file '{}' belongs to an option that was not enabled at compile time.\n"
1113 " To avoid this warning please remove this line from your configuration "
1114 "file or upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", g_cmd,g_yyLineNr,g_yyFileName);
1115 }
1116 BEGIN(SkipInvalid);
1117 break;
1118 }
1119 }
1120 }
Class representing a Boolean type option.
Definition configimpl.h:251
Class representing an enum type option.
Definition configimpl.h:153
DString takeUserComment()
Definition configimpl.h:590
Class representing an integer type option.
Definition configimpl.h:216
Class representing a list type option.
Definition configimpl.h:121
Section marker for obsolete options.
Definition configimpl.h:281
Abstract base class for any configuration option.
Definition configimpl.h:35
void setEncoding(const DString &e)
Definition configimpl.h:72
void setUserComment(const DString &u)
Definition configimpl.h:73
@ O_Disabled
Disabled compile time option.
Definition configimpl.h:51
@ O_List
A list of items.
Definition configimpl.h:45
@ O_Enum
A fixed set of items.
Definition configimpl.h:46
@ O_Bool
A boolean value.
Definition configimpl.h:49
@ O_String
A single item.
Definition configimpl.h:47
@ O_Obsolete
An obsolete option.
Definition configimpl.h:50
@ O_Int
An integer value.
Definition configimpl.h:48
@ O_Info
A section header.
Definition configimpl.h:44
OptionType kind() const
Definition configimpl.h:66
void clear()
Definition dstring.h:214
static bool g_configUpdate
Definition configimpl.l:647
1121<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"+=" { g_cmd=yytext;
1123 ConfigOption *option = g_config->get(g_cmd);
1124 if (option==0) // oops not known
1125 {
1126 ConfigImpl::config_warn("ignoring unsupported tag '{}' at line {}, file {}\n",
1128 BEGIN(SkipInvalid);
1129 }
1130 else // known tag
1131 {
1133 switch(option->kind())
1134 {
1136 // shouldn't get here!
1137 BEGIN(SkipInvalid);
1138 break;
1140 g_list = dynamic_cast<ConfigList *>(option)->valueRef();
1141 g_listStr="";
1142 BEGIN(GetStrList);
1143 break;
1148 ConfigImpl::config_warn("operator += not supported for '{}'. Ignoring line at line {}, file {}\n",
1149 yytext,g_yyLineNr,g_yyFileName);
1150 BEGIN(SkipInvalid);
1151 break;
1153 ConfigImpl::config_warn("Tag '{}' at line {} of file {} has become obsolete.\n"
1154 "To avoid this warning please update your configuration "
1155 "file using \"doxygen -u\"\n", g_cmd,g_yyLineNr,g_yyFileName);
1156 if (dynamic_cast<ConfigObsolete*>(option)->orgType()==ConfigOption::O_List)
1157 {
1158 g_list = dynamic_cast<ConfigObsolete*>(option)->valueListRef();
1159 g_listStr="";
1160 BEGIN(GetStrList);
1161 }
1162 else
1163 {
1164 BEGIN(SkipInvalid);
1165 }
1166 break;
1168 ConfigImpl::config_warn("Tag '{}' at line {} of file {} belongs to an option that was not enabled at compile time.\n"
1169 "To avoid this warning please remove this line from your configuration "
1170 "file, upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n",
1172 BEGIN(SkipInvalid);
1173 break;
1174 }
1175 }
1176 }
1177
1178 /*-------------- INCLUDE* ---------------*/
1179
1180<Start>"@INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); g_list=&g_includePathList; g_list->clear(); g_listStr=""; }
1181 /* include a g_config file */
1182<Start>"@INCLUDE"[ \t]*"=" { BEGIN(Include);}
1183<Start>"$("{REGEX_a}({REGEX_w}|[.-])*")" | // e.g. $(HOME)
1184<Start>"$("{REGEX_a}({REGEX_w}|[.-])*"("{REGEX_a}({REGEX_w}|[.-])*"))" { // e.g. $(PROGRAMFILES(X86))
1185 g_localStoreRepl = yytext;
1187 {
1188 BEGIN(StoreRepl);
1189 }
1190 else
1191 {
1194 }
1195 }
#define unput_string(yytext, yyleng)
Definition configimpl.l:653
static DString g_localStoreRepl
Definition configimpl.l:651
static Config::CompareMode g_compareMode
Definition configimpl.l:650
1196<Start>"@"{REGEX_a}{REGEX_w}*"@" {
1198 {
1199 g_localStoreRepl = yytext;
1200 BEGIN(StoreRepl);
1201 }
1202 else
1203 {
1204 ConfigImpl::config_warn("ignoring unknown '{}' at line {}, file {}\n",
1205 yytext,g_yyLineNr,g_yyFileName);
1206 }
1207 }
1208<Include>([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") {
1210 BEGIN(Start);
1211 }
static void readIncludeFile(const DString &incName)
Definition configimpl.l:956
1212<<EOF>> {
1213 //printf("End of include file\n");
1214 //printf("Include stack depth=%d\n",g_includeStack.count());
1215 if (g_includeStack.empty())
1216 {
1217 //printf("Terminating scanner!\n");
1218 yyterminate();
1219 }
1220 else
1221 {
1222 auto &fs=g_includeStack.back();
1223 fclose(fs->filePtr);
1224 YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER;
1225 yy_switch_to_buffer( fs->oldState );
1226 yy_delete_buffer( oldBuf );
1227 g_yyLineNr=fs->lineNr;
1228 g_yyFileName=fs->fileName;
1229 g_includeStack.pop_back();
1230 }
1231 }
#define yyterminate()
int fclose(FILE *f)
Definition portable.cpp:385
1232
1233<Start>[a-z_A-Z0-9]+ { ConfigImpl::config_warn("ignoring unknown tag '{}' at line {}, file {}\n",yytext,g_yyLineNr,g_yyFileName); }
1234 /*-------------- GetString ---------------*/
1235
1236<StoreRepl>\n {
1237 g_localStoreRepl += yytext;
1241 g_yyLineNr++; // end of string
1242 BEGIN(Start);
1243 }
void appendStoreRepl(const DString &u)
Definition configimpl.h:574
static void processStoreRepl(DString &storeReplStr)
Definition configimpl.l:755
1244<StoreRepl>\\‍[ \r\t]*\n { g_yyLineNr++; // line continuation
1245 g_localStoreRepl += yytext;
1246 }
1247<StoreRepl>"\\" { // escape character
1248 g_localStoreRepl += yytext;
1249 }
1250<StoreRepl>[^\n\\‍]+ { // string part without escape characters
1251 g_localStoreRepl += yytext;
1252 }
1253 /*-------------- GetString ---------------*/
1254
1255<GetString>\n { processString();
1256 g_yyLineNr++; // end of string
1257 BEGIN(Start);
1258 }
1259<GetString>\\‍[ \r\t]*\n { g_yyLineNr++; // line continuation
1260 *g_string+=' ';
1261 }
1262<GetString>"\\" { // escape character
1263 *g_string+=yytext;
1264 }
1265<GetString>[^\n\\‍]+ { // string part without escape characters
1266 *g_string+=yytext;
1267 }
1268
1269 /*-------------- GetStrList --------------*/
1270
1271<GetStrList>\n { processList();
1272 g_yyLineNr++; // end of list
1273 BEGIN(Start);
1274 }
1275<GetStrList>\\‍[ \r\t]*\n { g_yyLineNr++; // line continuation
1276 g_listStr+=' ';
1277 }
1278<GetStrList>"\\" { // escape character
1279 g_listStr+=yytext;
1280 }
1281<GetStrList>[^\n\\‍]+ { // string part without escape characters
1282 g_listStr+=yytext;
1283 }
1284
1285 /*-------------- SkipInvalid --------------*/
1286
1287<SkipInvalid>\n { g_yyLineNr++; // end of list
1288 BEGIN(Start);
1289 }
1290<SkipInvalid>\\‍[ \r\t]*\n { g_yyLineNr++; // line continuation
1291 }
1292<SkipInvalid>"\\" { // escape character
1293 }
1294<SkipInvalid>[^\n\\‍]+ { // string part without escape characters
1295 }
1296
1297 /*-------------- fall through -------------*/
1298
1299<*>\\‍[ \r\t]*\n { g_yyLineNr++; }
1300<*>[ \t\r]
1301<*>\n { g_yyLineNr++ ; }
1302<*>. {
1303 if (isprint(yytext[0]))
1304 ConfigImpl::config_warn("ignoring unknown character '{:c}' at line {}, file {}\n",yytext[0],g_yyLineNr,g_yyFileName);
1305 else
1306 ConfigImpl::config_warn("ignoring unknown character '0x{:x}' at line {}, file {}\n",yytext[0],g_yyLineNr,g_yyFileName);
1307 }
1308
1309%%

Referenced by convertCppComments().

◆ yyread()

int yyread ( char * buf,
int max_size )
static

Definition at line 664 of file configimpl.l.

665{
666 // no file included
667 if (g_includeStack.empty())
668 {
669 int c=0;
670 if (g_inputString==0) return c;
671 while( c < max_size && g_inputString[g_inputPosition] )
672 {
674 c++; buf++;
675 }
676 return c;
677 }
678 else
679 {
680 return static_cast<int>(fread(buf,1,max_size,g_includeStack.back()->filePtr));
681 }
static const char * g_inputString
Definition configimpl.l:637
static int g_inputPosition
Definition configimpl.l:638
682}

References g_includeStack, g_inputPosition, and g_inputString.

Variable Documentation

◆ error_str

const char* error_str = "error: "
static

Definition at line 53 of file configimpl.l.

Referenced by ConfigImpl::config_err_(), and ConfigImpl::config_term_().

◆ g_cmd

DString g_cmd
static

Definition at line 641 of file configimpl.l.

Referenced by processList(), and processString().

◆ g_compareMode

Definition at line 650 of file configimpl.l.

Referenced by Config::parse().

◆ g_config

ConfigImpl* g_config = nullptr
static

Definition at line 649 of file configimpl.l.

Referenced by checkEncoding(), Config::parse(), ConfigImpl::parseString(), and stripComment().

◆ g_configUpdate

bool g_configUpdate = false
static

Definition at line 647 of file configimpl.l.

Referenced by ConfigImpl::parseString().

◆ g_encoding

DString g_encoding
static

◆ g_includePathList

StringVector g_includePathList
static

Definition at line 645 of file configimpl.l.

Referenced by findFile().

◆ g_includeStack

std::vector< std::unique_ptr<ConfigFileState> > g_includeStack
static

Definition at line 646 of file configimpl.l.

Referenced by ConfigImpl::parseString(), readIncludeFile(), and yyread().

◆ g_inputPosition

int g_inputPosition = 0
static

Definition at line 638 of file configimpl.l.

Referenced by ConfigImpl::parseString(), and yyread().

◆ g_inputString

const char* g_inputString = nullptr
static

Definition at line 637 of file configimpl.l.

Referenced by ConfigImpl::parseString(), and yyread().

◆ g_list

StringVector* g_list = nullptr
static

Definition at line 643 of file configimpl.l.

Referenced by processList().

◆ g_listStr

DString g_listStr
static

Definition at line 644 of file configimpl.l.

Referenced by processList().

◆ g_localStoreRepl

DString g_localStoreRepl
static

Definition at line 651 of file configimpl.l.

◆ g_string

DString* g_string = nullptr
static

Definition at line 642 of file configimpl.l.

Referenced by processString().

◆ g_yyFileName

DString g_yyFileName
static

Definition at line 640 of file configimpl.l.

Referenced by ConfigImpl::parseString(), processList(), processString(), and readIncludeFile().

◆ g_yyLineNr

int g_yyLineNr = 1
static

Definition at line 639 of file configimpl.l.

Referenced by ConfigImpl::parseString(), processList(), processString(), and readIncludeFile().

◆ reEnvVar

const reg::Ex reEnvVar(R"(\$\‍((\a[\w.-]*)\‍))") ( R"(\$\‍((\a[\w.-]*)\‍))" )
static

◆ reEnvVar1CMake

const reg::Ex reEnvVar1CMake(R"(\${\a\w*})") ( R"(\${\a\w*})" )
static

Referenced by containsEnvVar().

◆ reEnvVarCMake

const reg::Ex reEnvVarCMake(R"(@\a\w*@)") ( R"(@\a\w*@)" )
static

Referenced by containsEnvVar().

◆ reEnvVarExt

const reg::Ex reEnvVarExt(R"(\$\‍((\a[\w.-]*\‍(\a[\w.-]*\‍))\‍))") ( R"(\$\‍((\a[\w.-]*\‍(\a[\w.-]*\‍))\‍))" )
static

◆ warning_str

const char* warning_str = "warning: "
static

Definition at line 52 of file configimpl.l.

Referenced by ConfigImpl::config_warn_().