Doxygen
Loading...
Searching...
No Matches
configimpl.l File Reference
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>
#include <stdarg.h>
#include <errno.h>
#include <thread>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstdint>
#include "config.h"
#include "regex.h"
#include "configimpl.h"
#include "version.h"
#include "portable.h"
#include "language.h"
#include "configoptions.h"
#include "fileinfo.h"
#include "dir.h"
#include "textstream.h"
#include "dotattributes.h"
#include "debug.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 QCString configStringRecode (const QCString &str, const QCString &fromEncoding, const QCString &toEncoding)
static bool containsEnvVar (QCString &str)
static QCString convertToComment (const QCString &s, const QCString &u)
static bool convertStringToBool (const QCString &str, bool &isValid)
static const char * getLexerFILE ()
static int yyread (char *buf, int max_size)
static void checkEncoding ()
static QCString stripComment (const QCString &s)
static void processStoreRepl (QCString &storeReplStr)
static void processString ()
static void processList ()
static FILE * tryPath (const QCString &path, const QCString &fileName)
static void substEnvVarsInStrList (StringVector &sl)
static void substEnvVarsInString (QCString &s)
static FILE * findFile (const QCString &fileName)
static void readIncludeFile (const QCString &incName)
int yylex (void)
static QCString configFileToString (const QCString &name)
static void cleanUpPaths (StringVector &str)
static bool checkFileName (const QCString &s, const char *optionName)
static void checkList (const 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 QCString &expectedValue)
static void adjustColorStyleSetting (const char *depOption)
static void updateAttribute (DotAttributes &attr, QCString 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 QCString g_yyFileName
static QCString g_cmd
static QCStringg_string = nullptr
static StringVectorg_list = nullptr
static QCString g_listStr
static StringVector g_includePathList
static std::vector< std::unique_ptr< ConfigFileState > > g_includeStack
static bool g_configUpdate = FALSE
static QCString g_encoding
static ConfigImplg_config = nullptr
static Config::CompareMode g_compareMode = Config::CompareMode::Full
static QCString 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 665 of file configimpl.l.

◆ MAX_INCLUDE_DEPTH

#define MAX_INCLUDE_DEPTH   10

Definition at line 83 of file configimpl.l.

Referenced by readIncludeFile().

◆ SHOW_INCLUDES

#define SHOW_INCLUDES   0

Definition at line 52 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 657 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:3963

Definition at line 661 of file configimpl.l.

◆ YY_NEVER_INTERACTIVE

#define YY_NEVER_INTERACTIVE   1

Definition at line 84 of file configimpl.l.

◆ YY_NO_INPUT

#define YY_NO_INPUT   1

Definition at line 48 of file configimpl.l.

◆ YY_NO_UNISTD_H

#define YY_NO_UNISTD_H   1

Definition at line 49 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 QCString & 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 726 of file configimpl.l.

727{
728 ConfigString *option = dynamic_cast<ConfigString*>(g_config->get("DOXYFILE_ENCODING"));
729 g_encoding = *option->valueRef();
Class representing a string type option.
Definition configimpl.h:188
QCString * valueRef()
Definition configimpl.h:201
static QCString g_encoding
Definition configimpl.l:652
static ConfigImpl * g_config
Definition configimpl.l:653
730}

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

Referenced by processString().

◆ checkFileName()

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

Definition at line 1653 of file configimpl.l.

1654{
1655 QCString 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;
This is an alternative implementation of QCString.
Definition qcstring.h:101
QCString lower() const
Definition qcstring.h:249
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition qcstring.h:260
1663}

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

Referenced by Config::checkAndCorrect().

◆ checkList()

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

Definition at line 1671 of file configimpl.l.

1672{
1673 for (const auto &s: list)
1674 {
1675 QCString item = s;
1676 item=item.stripWhiteSpace();
1677 int i=item.find('=');
1678 if (i==-1 && equalRequired)
1679 {
1680 err("Illegal format for option {}, no equal sign ('=') specified for item '{}'\n",name,item);
1681 }
1682 if (i!=-1)
1683 {
1684 QCString myName=item.left(i).stripWhiteSpace();
1685 if (myName.isEmpty())
1686 {
1687 err("Illegal format for option {}, no name specified for item '{}'\n",name,item);
1688 }
1689 else if (valueRequired)
1690 {
1691 QCString myValue=item.right(item.length()-i-1).stripWhiteSpace();
1692 if (myValue.isEmpty())
1693 {
1694 err("Illegal format for option {}, no value specified for item '{}'\n",name,item);
1695 }
1696 }
1697 }
1698 }
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:166
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163
QCString right(size_t len) const
Definition qcstring.h:234
QCString left(size_t len) const
Definition qcstring.h:229
1699}

References err, QCString::find(), QCString::isEmpty(), QCString::left(), QCString::length(), QCString::right(), and QCString::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:23
1651}

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

Referenced by Config::checkAndCorrect().

◆ configFileToString()

QCString configFileToString ( const QCString & name)
static

Definition at line 1573 of file configimpl.l.

1574{
1575 if (name.isEmpty()) return QCString();
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:621
std::ifstream openInputStream(const QCString &name, bool binary=false, bool openAtEnd=false)
Definition portable.cpp:660
1602}

References ConfigImpl::config_term(), QCString::isEmpty(), and Portable::openInputStream().

Referenced by ConfigImpl::parse().

◆ configStringRecode()

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

Definition at line 690 of file configimpl.l.

694{
695 if (inputEncoding.isEmpty() || outputEncoding.isEmpty() || inputEncoding==outputEncoding) return str;
696 size_t inputSize=str.length();
697 size_t outputSize=inputSize*4;
698 QCString output(outputSize, QCString::ExplicitSize);
699 void *cd = portable_iconv_open(outputEncoding.data(),inputEncoding.data());
700 if (cd==reinterpret_cast<void *>(-1))
701 {
702 ConfigImpl::config_term("Error: unsupported character conversion: '{}'->'{}'\n"
703 "Check the 'DOXYFILE_ENCODING' setting in the config file!\n",
704 inputEncoding,outputEncoding);
705 }
706 size_t iLeft=inputSize;
707 size_t oLeft=outputSize;
708 const char *inputPtr = str.data();
709 char *outputPtr = output.rawData();
710 if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
711 {
712 outputSize-=oLeft;
713 output.resize(outputSize);
714 output.at(outputSize)='\0';
715 //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,qPrint(srcBuf));
716 }
717 else
718 {
719 ConfigImpl::config_term("Error: failed to translate characters from {} to {}: {}\n",
720 inputEncoding,outputEncoding,strerror(errno));
721 }
723 return output;
@ ExplicitSize
Definition qcstring.h:146
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:172
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)
724}

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

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

◆ containsEnvVar()

bool containsEnvVar ( QCString & 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 qcstring.h:552
Object representing the matching results.
Definition regex.h:153
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:748
1402}

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

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

◆ convertStringToBool()

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

Definition at line 217 of file configimpl.l.

218{
219 isValid=false;
220 QCString val = str.stripWhiteSpace().lower();
221 if (!val.isEmpty())
222 {
223 if (val=="yes" || val=="true" || val=="1" || val=="all")
224 {
225 isValid=true;
226 return true;
227 }
228 else if (val=="no" || val=="false" || val=="0" || val=="none")
229 {
230 isValid=true;
231 return false;
232 }
233 }
234 return false;
235}

References QCString::isEmpty(), QCString::lower(), and QCString::stripWhiteSpace().

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

◆ convertToComment()

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

Definition at line 88 of file configimpl.l.

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

References QCString::data(), QCString::isEmpty(), and QCString::stripWhiteSpace().

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

◆ findFile()

FILE * findFile ( const QCString & fileName)
static

Definition at line 941 of file configimpl.l.

942{
943 if (fileName.isEmpty())
944 {
945 return 0;
946 }
947 if (Portable::isAbsolutePath(fileName))
948 {
949 return tryPath(QCString(), fileName);
950 }
952 for (const auto &s : g_includePathList)
953 {
954 FILE *f = tryPath(s,fileName);
955 if (f) return f;
956 }
957 // try cwd if g_includePathList fails
958 return tryPath(".",fileName);
static StringVector g_includePathList
Definition configimpl.l:649
static void substEnvVarsInStrList(StringVector &sl)
static FILE * tryPath(const QCString &path, const QCString &fileName)
Definition configimpl.l:925
bool isAbsolutePath(const QCString &fileName)
Definition portable.cpp:498
959}

References g_includePathList, Portable::isAbsolutePath(), QCString::isEmpty(), substEnvVarsInStrList(), and tryPath().

Referenced by readIncludeFile(), and readIncludeFile().

◆ getLexerFILE()

const char * getLexerFILE ( )
inlinestatic

Definition at line 664 of file configimpl.l.

664{return __FILE__;}

◆ processList()

void processList ( )
static

Definition at line 828 of file configimpl.l.

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

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

◆ processStoreRepl()

void processStoreRepl ( QCString & storeReplStr)
static

Definition at line 760 of file configimpl.l.

761{
762 // strip leading and trailing whitespace
763 QCString s = stripComment(storeReplStr.stripWhiteSpace());
764 // recode the string
765 storeReplStr=configStringRecode(s,g_encoding,"UTF-8");
766}

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

◆ processString()

void processString ( )
static

Definition at line 768 of file configimpl.l.

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

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

◆ readIncludeFile()

void readIncludeFile ( const QCString & incName)
static

Definition at line 961 of file configimpl.l.

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

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

◆ stateToString()

const char * stateToString ( int state)
static

◆ stripComment()

QCString stripComment ( const QCString & s)
static

Definition at line 732 of file configimpl.l.

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

References QCString::at(), g_config, QCString::left(), QCString::length(), QCString::mid(), and QCString::stripWhiteSpace().

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

◆ substEnvVarsInString()

void substEnvVarsInString ( QCString & s)
static

Definition at line 1404 of file configimpl.l.

1405{
1406 if (str.isEmpty()) 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 QCString 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:232
DirIterator end(const DirIterator &) noexcept
Definition dir.cpp:175
QCString getenv(const QCString &variable)
Definition portable.cpp:322
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:770
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:759
1428
1430}

References end(), Portable::getenv(), QCString::isEmpty(), reEnvVar, reEnvVarExt, QCString::str(), QCString::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 QCString 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(' ')!=-1) || (result.find('\t')!=-1) || (result.find('"')!=-1);
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.isEmpty()) results.push_back(result.str());
1505 }
1506 }
1507 sl = results;
1508}

References QCString::at(), QCString::find(), QCString::isEmpty(), QCString::length(), QCString::mid(), QCString::right(), QCString::str(), and substEnvVarsInString().

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

◆ tryPath()

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

Definition at line 925 of file configimpl.l.

926{
927 QCString absName=(!path.isEmpty() ? path+"/"+fileName : fileName);
928 FileInfo fi(absName.str());
929 if (fi.exists() && fi.isFile())
930 {
931 FILE *f=Portable::fopen(absName,"r");
932 if (!f) ConfigImpl::config_err("could not open file {} for reading\n",absName);
933 return f;
934 }
935 return 0;
static void config_err(fmt::format_string< Args... > fmt, Args &&... args)
Definition configimpl.h:615
FILE * fopen(const QCString &fileName, const QCString &mode)
Definition portable.cpp:350
936}

References ConfigImpl::config_err(), FileInfo::exists(), Portable::fopen(), QCString::isEmpty(), FileInfo::isFile(), and QCString::str().

Referenced by findFile().

◆ updateAttribute()

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

Definition at line 2246 of file configimpl.l.

2247{
2248 attr.updateValue(name,*value->valueStringRef());
QCString * valueStringRef()
Definition configimpl.h:296
void updateValue(const QCString &key, const QCString &inpValue)
2249}

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

Referenced by Config::updateObsolete().

◆ yylex()

int yylex ( void )

Definition at line 1021 of file configimpl.l.

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

Referenced by convertCppComments().

◆ yyread()

int yyread ( char * buf,
int max_size )
static

Definition at line 668 of file configimpl.l.

669{
670 // no file included
671 if (g_includeStack.empty())
672 {
673 int c=0;
674 if (g_inputString==0) return c;
675 while( c < max_size && g_inputString[g_inputPosition] )
676 {
678 c++; buf++;
679 }
680 return c;
681 }
682 else
683 {
684 //assert(g_includeStack.current()->newState==YY_CURRENT_BUFFER);
685 return static_cast<int>(fread(buf,1,max_size,g_includeStack.back()->filePtr));
686 }
static const char * g_inputString
Definition configimpl.l:641
static int g_inputPosition
Definition configimpl.l:642
687}

References g_includeStack, g_inputPosition, and g_inputString.

Variable Documentation

◆ error_str

const char* error_str = "error: "
static

Definition at line 57 of file configimpl.l.

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

◆ g_cmd

QCString g_cmd
static

Definition at line 645 of file configimpl.l.

Referenced by processList(), and processString().

◆ g_compareMode

Definition at line 654 of file configimpl.l.

Referenced by Config::parse().

◆ g_config

ConfigImpl* g_config = nullptr
static

Definition at line 653 of file configimpl.l.

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

◆ g_configUpdate

bool g_configUpdate = FALSE
static

Definition at line 651 of file configimpl.l.

Referenced by ConfigImpl::parseString().

◆ g_encoding

QCString g_encoding
static

◆ g_includePathList

StringVector g_includePathList
static

Definition at line 649 of file configimpl.l.

Referenced by findFile().

◆ g_includeStack

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

Definition at line 650 of file configimpl.l.

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

◆ g_inputPosition

int g_inputPosition = 0
static

Definition at line 642 of file configimpl.l.

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

◆ g_inputString

const char* g_inputString = nullptr
static

Definition at line 641 of file configimpl.l.

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

◆ g_list

StringVector* g_list = nullptr
static

Definition at line 647 of file configimpl.l.

Referenced by processList().

◆ g_listStr

QCString g_listStr
static

Definition at line 648 of file configimpl.l.

Referenced by processList().

◆ g_localStoreRepl

QCString g_localStoreRepl
static

Definition at line 655 of file configimpl.l.

◆ g_string

QCString* g_string = nullptr
static

Definition at line 646 of file configimpl.l.

Referenced by processString().

◆ g_yyFileName

QCString g_yyFileName
static

Definition at line 644 of file configimpl.l.

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

◆ g_yyLineNr

int g_yyLineNr = 1
static

Definition at line 643 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 56 of file configimpl.l.

Referenced by ConfigImpl::config_warn_().