summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-11-21 19:55:57 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-11-21 19:55:57 (GMT)
commite7d47ec23ba1b109754d6e47b1eb4d341efc3b36 (patch)
tree92c6dfa19ac7530fdfb842b76a9a529abc0a6be9 /src/scanner.l
parent26f6f1aec1be0361eac7c6ebc4de93904bf42a98 (diff)
downloadDoxygen-e7d47ec23ba1b109754d6e47b1eb4d341efc3b36.zip
Doxygen-e7d47ec23ba1b109754d6e47b1eb4d341efc3b36.tar.gz
Doxygen-e7d47ec23ba1b109754d6e47b1eb4d341efc3b36.tar.bz2
Made code.l scanner reentrant
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 37fcb1c..2b277db 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -201,6 +201,8 @@ static bool g_nestedComment=0;
static std::vector< std::pair<Entry*,std::unique_ptr<Entry> > > g_outerScopeEntries;
+static CodeScanner g_codeScanner;
+
static const char *stateToString(int state);
//-----------------------------------------------------------------------------
@@ -7359,6 +7361,7 @@ void CLanguageScanner::parseInput(const char *fileName,
printlex(yy_flex_debug, FALSE, __FILE__, fileName);
}
+
void CLanguageScanner::parseCode(CodeOutputInterface & codeOutIntf,
const char * scopeName,
const QCString & input,
@@ -7375,7 +7378,7 @@ void CLanguageScanner::parseCode(CodeOutputInterface & codeOutIntf,
bool collectXRefs
)
{
- ::parseCCode(codeOutIntf,scopeName,input,lang,isExampleBlock,exampleName,
+ g_codeScanner.parseCCode(codeOutIntf,scopeName,input,lang,isExampleBlock,exampleName,
fileDef,startLine,endLine,inlineFragment,memberDef,
showLineNumbers,searchCtx,collectXRefs);
}
@@ -7392,7 +7395,7 @@ bool CLanguageScanner::needsPreprocessing(const QCString &extension) const
void CLanguageScanner::resetCodeParserState()
{
- ::resetCCodeParserState();
+ g_codeScanner.reset();
}
void CLanguageScanner::parsePrototype(const char *text)