diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2012-11-18 21:43:28 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2012-11-18 21:43:28 (GMT) |
commit | 1a68946cfa3e3ee749a683fdabc93e6b5311adeb (patch) | |
tree | 94365b932426de715b3a479094b7056e0c4f878b /src/commentcnv.l | |
parent | 9c9313827b29876de43ad5305fd7ac162013359c (diff) | |
download | Doxygen-1a68946cfa3e3ee749a683fdabc93e6b5311adeb.zip Doxygen-1a68946cfa3e3ee749a683fdabc93e6b5311adeb.tar.gz Doxygen-1a68946cfa3e3ee749a683fdabc93e6b5311adeb.tar.bz2 |
Release-1.8.2-20121118
Diffstat (limited to 'src/commentcnv.l')
-rw-r--r-- | src/commentcnv.l | 24 |
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) |