summaryrefslogtreecommitdiffstats
path: root/src/pyscanner.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2006-08-09 08:29:54 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2006-08-09 08:29:54 (GMT)
commitcdd729544999bf6ff5ce3efb5a64957058f040f3 (patch)
treea09074ed1c9a5c1efb292f69db4f9bbb3a97cb19 /src/pyscanner.l
parent243272688a4a3bc7921b7d05dda927f4adf3036c (diff)
downloadDoxygen-cdd729544999bf6ff5ce3efb5a64957058f040f3.zip
Doxygen-cdd729544999bf6ff5ce3efb5a64957058f040f3.tar.gz
Doxygen-cdd729544999bf6ff5ce3efb5a64957058f040f3.tar.bz2
Release-1.4.7-20060809
Diffstat (limited to 'src/pyscanner.l')
-rw-r--r--src/pyscanner.l18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 63d6fd4..ea4776b 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -108,6 +108,9 @@ static bool g_hideClassDocs;
static QCString g_defVal;
static int g_braceCount;
+
+static bool g_lexInit = FALSE;
+
//-----------------------------------------------------------------------------
@@ -1060,7 +1063,7 @@ STARTDOCSYMS ^{B}"##"/[^#]
<VariableDec>{
"=" { // the assignment operator
- printf("====== VariableDec at line %d\n",yyLineNr);
+ //printf("====== VariableDec at line %d\n",yyLineNr);
}
{B} { // spaces
}
@@ -1415,6 +1418,7 @@ static void parseCompounds(Entry *rt)
groupEnterCompound(yyFileName,yyLineNr,ce->name);
pyscanYYlex() ;
+ g_lexInit=TRUE;
delete current; current=0;
ce->program.resize(0);
@@ -1481,6 +1485,7 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
pyscanYYrestart( pyscanYYin );
BEGIN( Search );
pyscanYYlex();
+ g_lexInit=TRUE;
groupLeaveFile(yyFileName,yyLineNr);
@@ -1527,6 +1532,7 @@ static void parsePrototype(const QCString &text)
BEGIN( FunctionDec );
pyscanYYlex();
+ g_lexInit=TRUE;
current->name = current->name.stripWhiteSpace();
if (current->section == Entry::MEMBERDOC_SEC && current->args.isEmpty())
@@ -1544,6 +1550,16 @@ static void parsePrototype(const QCString &text)
//printf("**** parsePrototype end\n");
}
+void pyscanFreeScanner()
+{
+#if defined(YY_FLEX_SUBMINOR_VERSION)
+ if (g_lexInit)
+ {
+ pyscanYYlex_destroy();
+ }
+#endif
+}
+
//----------------------------------------------------------------------------
void PythonLanguageScanner::parseInput(const char *fileName,const char *fileBuf,Entry *root)