diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2000-04-30 17:13:40 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2000-04-30 17:13:40 (GMT) |
commit | 26b5069ce70ddad043040a06b984beef02b89994 (patch) | |
tree | e8fc87186141ebce1c8547a44d7adcd0ec122e14 /src/pre.l | |
parent | e2b4a623decf7c8b4435f742f05d07323ad8d6f2 (diff) | |
download | Doxygen-26b5069ce70ddad043040a06b984beef02b89994.zip Doxygen-26b5069ce70ddad043040a06b984beef02b89994.tar.gz Doxygen-26b5069ce70ddad043040a06b984beef02b89994.tar.bz2 |
Release-1.1.2-20000430
Diffstat (limited to 'src/pre.l')
-rw-r--r-- | src/pre.l | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -125,7 +125,15 @@ static void decrLevel() static bool otherCaseDone() { - return g_levelGuard[g_level-1]; + if (g_level==0) + { + err("Error: Found an #else without a preceding #if.\n"); + return TRUE; + } + else + { + return g_levelGuard[g_level-1]; + } } static void setCaseDone(bool value) @@ -1079,7 +1087,7 @@ BN [ \t\r\n] g_guardExpr.resize(0); BEGIN(Guard); } -<Command>"elif"/[ \t(] { +<Command>("elif"|"else"{B}*"if")/[ \t(] { if (!otherCaseDone()) { g_guardExpr.resize(0); @@ -1107,7 +1115,7 @@ BN [ \t\r\n] <Command>"undef"{B}+ { BEGIN(Ung_defName); } -<Command>"elif"/[ \t(] { +<Command>("elif"|"else"{B}*"if")/[ \t(] { if (!otherCaseDone()) { g_guardExpr.resize(0); @@ -1208,7 +1216,7 @@ BN [ \t\r\n] BEGIN(Start); } } -<SkipCommand>"elif"/[ \t(] { +<SkipCommand>("elif"|"else"{B}*"if")/[ \t(] { if (g_ifcount==0) { if (!otherCaseDone()) @@ -1693,6 +1701,7 @@ void preprocessFile(const char *fileName,BufStr &output) char *defStr = Config::predefined.first(); while (defStr) { + //printf("Predefined: `%s'\n",defStr); QCString ds = defStr; int i_equals=ds.find('='); int i_obrace=ds.find('('); |