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 "message.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*@)")
 

Macro Definition Documentation

◆ LEX_NO_REENTRANT

#define LEX_NO_REENTRANT

Definition at line 675 of file configimpl.l.

◆ MAX_INCLUDE_DEPTH

#define MAX_INCLUDE_DEPTH   10

Definition at line 93 of file configimpl.l.

Referenced by readIncludeFile().

◆ SHOW_INCLUDES

#define SHOW_INCLUDES   0

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

◆ YY_INPUT

#define YY_INPUT ( buf,
result,
max_size )
Value:
result=yyread(buf,max_size);
static int yyread(char *buf, int max_size)
Definition configimpl.l:678

Definition at line 671 of file configimpl.l.

◆ YY_NEVER_INTERACTIVE

#define YY_NEVER_INTERACTIVE   1

Definition at line 94 of file configimpl.l.

◆ YY_NO_INPUT

#define YY_NO_INPUT   1

Definition at line 49 of file configimpl.l.

◆ YY_NO_UNISTD_H

#define YY_NO_UNISTD_H   1

Definition at line 50 of file configimpl.l.

Function Documentation

◆ adjustBoolSetting()

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

Definition at line 1705 of file configimpl.l.

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

References err.

Referenced by Config::checkAndCorrect().

◆ adjustColorStyleSetting()

static void adjustColorStyleSetting ( const char * depOption)
static

Definition at line 1733 of file configimpl.l.

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

References Config_getEnum, Config_updateEnum, err, and qPrint().

Referenced by Config::checkAndCorrect().

◆ adjustStringSetting()

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

Definition at line 1719 of file configimpl.l.

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

References err, and qPrint().

Referenced by Config::checkAndCorrect().

◆ checkEncoding()

static void checkEncoding ( )
static

Definition at line 736 of file configimpl.l.

737{
738 ConfigString *option = dynamic_cast<ConfigString*>(g_config->get("DOXYFILE_ENCODING"));
739 g_encoding = *option->valueRef();
Class representing a string type option.
Definition configimpl.h:187
QCString * valueRef()
Definition configimpl.h:200
static QCString g_encoding
Definition configimpl.l:662
static ConfigImpl * g_config
Definition configimpl.l:663
740}

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

Referenced by processString().

◆ checkFileName()

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

Definition at line 1657 of file configimpl.l.

1658{
1659 QCString val = s.stripWhiteSpace().lower();
1660 if ((val=="yes" || val=="true" || val=="1" || val=="all") ||
1661 (val=="no" || val=="false" || val=="0" || val=="none"))
1662 {
1663 err("file name expected for option %s, got %s instead. Ignoring...\n",optionName,qPrint(s));
1664 return false;
1665 }
1666 return true;
This is an alternative implementation of QCString.
Definition qcstring.h:101
QCString lower() const
Definition qcstring.h:234
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition qcstring.h:245
1667}

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

Referenced by Config::checkAndCorrect().

◆ checkList()

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

Definition at line 1675 of file configimpl.l.

1676{
1677 for (const auto &s: list)
1678 {
1679 QCString item=s.c_str();
1680 item=item.stripWhiteSpace();
1681 int i=item.find('=');
1682 if (i==-1 && equalRequired)
1683 {
1684 err("Illegal format for option %s, no equal sign ('=') specified for item '%s'\n",name,qPrint(item));
1685 }
1686 if (i!=-1)
1687 {
1688 QCString myName=item.left(i).stripWhiteSpace();
1689 if (myName.isEmpty())
1690 {
1691 err("Illegal format for option %s, no name specified for item '%s'\n",name,qPrint(item));
1692 }
1693 else if (valueRequired)
1694 {
1695 QCString myValue=item.right(item.length()-i-1).stripWhiteSpace();
1696 if (myValue.isEmpty())
1697 {
1698 err("Illegal format for option %s, no value specified for item '%s'\n",name,qPrint(item));
1699 }
1700 }
1701 }
1702 }
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:153
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
QCString right(size_t len) const
Definition qcstring.h:219
QCString left(size_t len) const
Definition qcstring.h:214
1703}

References err, QCString::find(), QCString::isEmpty(), QCString::left(), QCString::length(), qPrint(), QCString::right(), and QCString::stripWhiteSpace().

Referenced by Config::checkAndCorrect().

◆ cleanUpPaths()

static void cleanUpPaths ( StringVector & str)
static

Definition at line 1638 of file configimpl.l.

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

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

Referenced by Config::checkAndCorrect().

◆ configFileToString()

static QCString configFileToString ( const QCString & name)
static

Definition at line 1577 of file configimpl.l.

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

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

Referenced by ConfigImpl::parse().

◆ configStringRecode()

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

Definition at line 700 of file configimpl.l.

704{
705 if (inputEncoding.isEmpty() || outputEncoding.isEmpty() || inputEncoding==outputEncoding) return str;
706 size_t inputSize=str.length();
707 size_t outputSize=inputSize*4;
708 QCString output(outputSize, QCString::ExplicitSize);
709 void *cd = portable_iconv_open(outputEncoding.data(),inputEncoding.data());
710 if (cd==reinterpret_cast<void *>(-1))
711 {
712 ConfigImpl::config_term("Error: unsupported character conversion: '%s'->'%s'\n"
713 "Check the 'DOXYFILE_ENCODING' setting in the config file!\n",
714 qPrint(inputEncoding),qPrint(outputEncoding));
715 }
716 size_t iLeft=inputSize;
717 size_t oLeft=outputSize;
718 const char *inputPtr = str.data();
719 char *outputPtr = output.rawData();
720 if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
721 {
722 outputSize-=oLeft;
723 output.resize(outputSize);
724 output.at(outputSize)='\0';
725 //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,qPrint(srcBuf));
726 }
727 else
728 {
729 ConfigImpl::config_term("Error: failed to translate characters from %s to %s: %s\n",
730 qPrint(inputEncoding),qPrint(outputEncoding),strerror(errno));
731 }
733 return output;
@ ExplicitSize
Definition qcstring.h:133
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:159
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)
734}

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

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

◆ containsEnvVar()

static bool containsEnvVar ( QCString & str)
static

Definition at line 1401 of file configimpl.l.

1402{
1403 reg::Match m;
1404 std::string s = str.str();
const std::string & str() const
Definition qcstring.h:537
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 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
1406}

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

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

◆ convertStringToBool()

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

Definition at line 227 of file configimpl.l.

228{
229 isValid=false;
230 QCString val = str.stripWhiteSpace().lower();
231 if (!val.isEmpty())
232 {
233 if (val=="yes" || val=="true" || val=="1" || val=="all")
234 {
235 isValid=true;
236 return true;
237 }
238 else if (val=="no" || val=="false" || val=="0" || val=="none")
239 {
240 isValid=true;
241 return false;
242 }
243 }
244 return false;
245}

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

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

◆ convertToComment()

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

Definition at line 98 of file configimpl.l.

99{
100 //printf("convertToComment(%s)=%s\n",qPrint(s),qPrint(u));
101 QCString result;
102 if (!s.isEmpty())
103 {
105 const char *p=tmp.data();
106 char c = 0;
107 if (p)
108 {
109 result+="#";
110 if (*p && *p!='\n')
111 {
112 result+=" ";
113 }
114 while ((c=*p++))
115 {
116 if (c=='\n')
117 {
118 result+="\n#";
119 if (*p && *p!='\n')
120 {
121 result+=" ";
122 }
123 }
124 else result+=c;
125 }
126 result+='\n';
127 }
128 }
129 if (!u.isEmpty())
130 {
131 if (!result.isEmpty()) result+='\n';
132 result+= u;
133 }
134 return result;
135}

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

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

◆ findFile()

static FILE * findFile ( const QCString & fileName)
static

Definition at line 947 of file configimpl.l.

948{
949 if (fileName.isEmpty())
950 {
951 return 0;
952 }
953 if (Portable::isAbsolutePath(fileName))
954 {
955 return tryPath(QCString(), fileName);
956 }
958 for (const auto &s : g_includePathList)
959 {
960 FILE *f = tryPath(s.c_str(),fileName);
961 if (f) return f;
962 }
963 // try cwd if g_includePathList fails
964 return tryPath(".",fileName);
static StringVector g_includePathList
Definition configimpl.l:659
static void substEnvVarsInStrList(StringVector &sl)
static FILE * tryPath(const QCString &path, const QCString &fileName)
Definition configimpl.l:931
bool isAbsolutePath(const QCString &fileName)
Definition portable.cpp:514
965}

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

Referenced by readIncludeFile(), and readIncludeFile().

◆ getLexerFILE()

static const char * getLexerFILE ( )
inlinestatic

Definition at line 674 of file configimpl.l.

674{return __FILE__;}

◆ processList()

static void processList ( )
static

Definition at line 838 of file configimpl.l.

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

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

◆ processStoreRepl()

static void processStoreRepl ( QCString & storeReplStr)
static

Definition at line 770 of file configimpl.l.

771{
772 // strip leading and trailing whitespace
773 QCString s = stripComment(storeReplStr.stripWhiteSpace());
774 // recode the string
775 storeReplStr=configStringRecode(s,g_encoding,"UTF-8");
776}

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

◆ processString()

static void processString ( )
static

Definition at line 778 of file configimpl.l.

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

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

◆ readIncludeFile()

static void readIncludeFile ( const QCString & incName)
static

Definition at line 967 of file configimpl.l.

968{
969 if (g_includeStack.size()==MAX_INCLUDE_DEPTH) {
970 ConfigImpl::config_term("maximum include depth (%d) reached, %s is not included. Aborting...\n",
971 MAX_INCLUDE_DEPTH,qPrint(incName));
972 }
static std::vector< std::unique_ptr< ConfigFileState > > g_includeStack
Definition configimpl.l:660
#define MAX_INCLUDE_DEPTH
Definition configimpl.l:93
973
974 QCString inc = incName;
976 inc = inc.stripWhiteSpace();
977 size_t incLen = inc.length();
978 if (incLen>0 && inc.at(0)=='"' && inc.at(incLen-1)=='"') // strip quotes
979 {
980 inc=inc.mid(1,incLen-2);
981 }
static void substEnvVarsInString(QCString &s)
982
983 FILE *f;
984
985 if ((f=findFile(inc))) // see if the include file can be found
986 {
987 // For debugging
static FILE * findFile(const QCString &fileName)
Definition configimpl.l:947
988#if SHOW_INCLUDES
989 for (size_t i=0;i<g_includeStack.size();i++) msg(" ");
990 msg("@INCLUDE = %s: parsing...\n",qPrint(inc));
void msg(const char *fmt,...)
Definition message.cpp:98
991#endif
992
993 // store the state of the old file
995 fs->oldState=YY_CURRENT_BUFFER;
996 fs->lineNr=g_yyLineNr;
998 fs->filePtr=f;
999 // push the state on the stack
1000 g_includeStack.push_back(std::unique_ptr<ConfigFileState>(fs));
1001 // set the scanner to the include file
1002 yy_switch_to_buffer(yy_create_buffer(f, YY_BUF_SIZE));
1003 fs->newState=YY_CURRENT_BUFFER;
1004 g_yyFileName=inc;
1005 }
1006 else
1007 {
1008 ConfigImpl::config_term("@INCLUDE = %s: not found!\n",qPrint(inc));
1009 }
#define YY_BUF_SIZE
Definition commentcnv.l:19
YY_BUFFER_STATE newState
Definition configimpl.l:647
QCString fileName
Definition configimpl.l:648
YY_BUFFER_STATE oldState
Definition configimpl.l:646
1010}

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, qPrint(), QCString::stripWhiteSpace(), substEnvVarsInString(), and YY_BUF_SIZE.

◆ stateToString()

static const char * stateToString ( int state)
static

◆ stripComment()

static QCString stripComment ( const QCString & s)
static

Definition at line 742 of file configimpl.l.

743{
744 // check if there is a comment at the end of the string
745 bool insideQuote=false;
746 size_t l = s.length();
747 for (size_t i=0;i<l;i++)
748 {
749 char c = s.at(i);
750 if (c=='\\') // skip over escaped characters
751 {
752 i++;
753 }
754 else if (c=='"') // toggle inside/outside quotation
755 {
756 insideQuote=!insideQuote;
757 }
758 else if (!insideQuote && c=='#') // found start of a comment
759 {
760 if (i<l-1 && s.at(i+1)=='#') // ## -> user comment
761 {
762 g_config->appendUserComment(s.mid(i)+"\n");
763 }
764 return s.left(i).stripWhiteSpace();
765 }
766 }
767 return s;
768}

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

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

◆ substEnvVarsInString()

static void substEnvVarsInString ( QCString & s)
static

Definition at line 1408 of file configimpl.l.

1409{
1410 if (str.isEmpty()) return;
1411 auto replace = [](const std::string &s, const reg::Ex &re) -> std::string
1412 {
1413 reg::Iterator it(s,re);
1415 std::string result;
1416 size_t p = 0;
1417 for (; it!=end ; ++it)
1418 {
1419 const auto &match = *it;
1420 size_t i = match.position();
1421 size_t l = match.length();
1422 result+=s.substr(p,i-p);
1423 std::string matchContents = match[1].str();
1424 QCString env=Portable::getenv(matchContents.c_str()); // get content of $(..) match
1425 substEnvVarsInString(env); // recursively expand variables if needed.
1426 result+=env.str();
1427 p=i+l;
1428 }
1429 result+=s.substr(p);
1430 return result;
1431 };
Class representing a regular expression.
Definition regex.h:39
Iterator class to iterator through matches.
Definition regex.h:232
DirIterator end(const DirIterator &) noexcept
Definition dir.cpp:175
QCString getenv(const QCString &variable)
Definition portable.cpp:338
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
1432
1434}

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()

static void substEnvVarsInStrList ( StringVector & sl)
static

Definition at line 1436 of file configimpl.l.

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

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

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

◆ tryPath()

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

Definition at line 931 of file configimpl.l.

932{
933 QCString absName=(!path.isEmpty() ? path+"/"+fileName : fileName);
934 FileInfo fi(absName.str());
935 if (fi.exists() && fi.isFile())
936 {
937 FILE *f=Portable::fopen(absName,"r");
938 if (!f) ConfigImpl::config_err("could not open file %s for reading\n",qPrint(absName));
939 return f;
940 }
941 return 0;
static void config_err(const char *fmt,...)
Definition configimpl.l:60
FILE * fopen(const QCString &fileName, const QCString &mode)
Definition portable.cpp:366
942}

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

Referenced by findFile().

◆ updateAttribute()

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

Definition at line 2233 of file configimpl.l.

2234{
2235 attr.updateValue(name,*value->valueStringRef());
QCString * valueStringRef()
Definition configimpl.h:295
void updateValue(const QCString &key, const QCString &inpValue)
update a given attribute with a new value.
2236}

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

Referenced by Config::updateObsolete().

◆ yylex()

int yylex ( void )

Definition at line 1027 of file configimpl.l.

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

Referenced by convertCppComments().

◆ yyread()

static int yyread ( char * buf,
int max_size )
static

Definition at line 678 of file configimpl.l.

679{
680 // no file included
681 if (g_includeStack.empty())
682 {
683 int c=0;
684 if (g_inputString==0) return c;
685 while( c < max_size && g_inputString[g_inputPosition] )
686 {
688 c++; buf++;
689 }
690 return c;
691 }
692 else
693 {
694 //assert(g_includeStack.current()->newState==YY_CURRENT_BUFFER);
695 return static_cast<int>(fread(buf,1,max_size,g_includeStack.back()->filePtr));
696 }
static const char * g_inputString
Definition configimpl.l:651
static int g_inputPosition
Definition configimpl.l:652
697}

References g_includeStack, g_inputPosition, and g_inputString.

Variable Documentation

◆ error_str

const char* error_str = "error: "
static

Definition at line 58 of file configimpl.l.

Referenced by ConfigImpl::config_err(), and ConfigImpl::config_term().

◆ g_cmd

QCString g_cmd
static

Definition at line 655 of file configimpl.l.

Referenced by processList(), and processString().

◆ g_compareMode

Definition at line 664 of file configimpl.l.

Referenced by Config::parse().

◆ g_config

ConfigImpl* g_config = nullptr
static

Definition at line 663 of file configimpl.l.

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

◆ g_configUpdate

bool g_configUpdate = FALSE
static

Definition at line 661 of file configimpl.l.

Referenced by ConfigImpl::parseString().

◆ g_encoding

QCString g_encoding
static

◆ g_includePathList

StringVector g_includePathList
static

Definition at line 659 of file configimpl.l.

Referenced by findFile().

◆ g_includeStack

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

Definition at line 660 of file configimpl.l.

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

◆ g_inputPosition

int g_inputPosition = 0
static

Definition at line 652 of file configimpl.l.

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

◆ g_inputString

const char* g_inputString = nullptr
static

Definition at line 651 of file configimpl.l.

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

◆ g_list

StringVector* g_list = nullptr
static

Definition at line 657 of file configimpl.l.

Referenced by processList().

◆ g_listStr

QCString g_listStr
static

Definition at line 658 of file configimpl.l.

Referenced by processList().

◆ g_localStoreRepl

QCString g_localStoreRepl
static

Definition at line 665 of file configimpl.l.

◆ g_string

QCString* g_string = nullptr
static

Definition at line 656 of file configimpl.l.

Referenced by processString().

◆ g_yyFileName

QCString g_yyFileName
static

Definition at line 654 of file configimpl.l.

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

◆ g_yyLineNr

int g_yyLineNr = 1
static

Definition at line 653 of file configimpl.l.

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

◆ reEnvVar

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

◆ 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 57 of file configimpl.l.

Referenced by ConfigImpl::config_warn().