summaryrefslogtreecommitdiffstats
path: root/src/pyscanner.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2006-08-09 08:29:54 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2006-08-09 08:29:54 (GMT)
commitf1ddf16acd015f8cf9ffc1fbf5719e8c764150e2 (patch)
treea09074ed1c9a5c1efb292f69db4f9bbb3a97cb19 /src/pyscanner.l
parent3a7dcb4cbc953fcf5ab62243743707e5e0e3d379 (diff)
downloadDoxygen-f1ddf16acd015f8cf9ffc1fbf5719e8c764150e2.zip
Doxygen-f1ddf16acd015f8cf9ffc1fbf5719e8c764150e2.tar.gz
Doxygen-f1ddf16acd015f8cf9ffc1fbf5719e8c764150e2.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)