summaryrefslogtreecommitdiffstats
path: root/src/commentcnv.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2012-11-18 21:43:28 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2012-11-18 21:43:28 (GMT)
commitfee4053bd3dd075a2dd2cba4da8166ec5307eadd (patch)
tree94365b932426de715b3a479094b7056e0c4f878b /src/commentcnv.l
parentceb4115c7b941039411e1793e01239610ff112a2 (diff)
downloadDoxygen-fee4053bd3dd075a2dd2cba4da8166ec5307eadd.zip
Doxygen-fee4053bd3dd075a2dd2cba4da8166ec5307eadd.tar.gz
Doxygen-fee4053bd3dd075a2dd2cba4da8166ec5307eadd.tar.bz2
Release-1.8.2-20121118
Diffstat (limited to 'src/commentcnv.l')
-rw-r--r--src/commentcnv.l24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/commentcnv.l b/src/commentcnv.l
index e9fc74b..88d9ce3 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -18,6 +18,7 @@
%{
#define YY_NEVER_INTERACTIVE 1
+
#include <stdio.h>
#include <stdlib.h>
@@ -33,6 +34,7 @@
#include "config.h"
#include "doxygen.h"
#include "util.h"
+#include "condparser.h"
#include <assert.h>
@@ -178,30 +180,22 @@ static inline void copyToOutput(const char *s,int len)
static void startCondSection(const char *sectId)
{
+ CondParser prs;
+ bool expResult = prs.parse(g_fileName,g_lineNr,sectId);
g_condStack.push(new CondCtx(g_lineNr,sectId,g_skip));
if (guardType == Guard_Cond)
{
- if (Config_getList("ENABLED_SECTIONS").find(sectId)!=-1)
- {
- //printf("*** Section is enabled!\n");
- }
- else
+ if (expResult)
{
- //printf("*** Section is disabled!\n");
g_skip=TRUE;
}
}
else if (guardType == Guard_CondNot)
{
- if (Config_getList("ENABLED_SECTIONS").find(sectId)!=-1)
+ if (!expResult)
{
- //printf("*** Section is disabled!\n");
g_skip=TRUE;
}
- else
- {
- //printf("*** Section is enabled!\n");
- }
}
}
@@ -276,7 +270,7 @@ void replaceComment(int offset);
BEGIN(CComment);
}
}
-<Scan>"!>" {
+<Scan>"!>"|"!<"|"!!" {
if (g_lang!=SrcLangExt_Fortran)
{
REJECT;
@@ -360,7 +354,7 @@ void replaceComment(int offset);
BEGIN(CComment);
}
}
-<Scan>"!>" {
+<Scan>"!>"|"!<"|"!!" {
if (g_lang!=SrcLangExt_Fortran)
{
REJECT;
@@ -709,7 +703,7 @@ void replaceComment(int offset);
}
}
}
-<CondLine>[a-z_A-Z][a-z_A-Z0-9.\-]* {
+<CondLine>[!()&| \ta-z_A-Z0-9.\-]+ {
bool oldSkip=g_skip;
startCondSection(yytext);
if (g_condCtx==CComment && !oldSkip && g_skip)